Posts

Showing posts from November, 2011

DISP_FUNCTION_ID

Hi, DISP_FUNCTION_ID : You should define dispatching map for any method in ActiveX to be used for COM. If the map is not set correctly,Method will not be seen anymore. DISP_FUNCTION_ID gets 6 parameters.These are; 1-class,method belongs to 2-External Method name,value can be method name 3-Dispatch id of method,unique number 4-Method 5- Return value should be one of VARENUM in wtypes.h 6- Parameters value defines in afxdisp.h (space is seperator of each params) for example; DISP_FUNCTION_ID(C_X_OleLibraryCtrl, "GetIDLMsg", 1, GetIDLMsg, VT_BSTR /* return type*/, VTS_PVARIANT VTS_BSTR /* two parameters are seperated by empty*/) good luck, P.S. If you have any comments please do not hesitate share.

error LNK2001: unresolved external symbol and error LNK1120: 1 unresolved externals

if you get errors while linking compiled code and making project output file (such as .exe,.dll) in MVC++ with subject of "error LNK2001: unresolved external symbol and error LNK1120: 1 unresolved externals",It seems there is missing library definition in addition if the message is related with "DEFINE_GUID" ,There is unordered including headers. Please check belows; 1-Check all headers that may use,are included 2-Check directories of referenced files are set in project (Right Click to Project in Micosoft Visual Studio 2010>Properties>Configuration Properties>VC++Directories and 3- check Libraries dependencies (Right Click to Project in Micosoft Visual Studio 2010>Properties>Configuration Properties>Linker>Input>Additional Dependencies) 4-Please follow the exact code and if it is about "DEFINE_GUID", initialize GUID (#include ) before include any project based headers. ( http://support.microsoft.com/kb/130869/en-us ) obtains d

A surprise from Microsoft Visual Studio 2010 to the developers

Hi, if you create Windows From Application based on C++ environment in Microsoft Visual Studio 2010.You will not use Intellisense. you will face a good message : 'IntelliSense unavailable for C++/CLI' But do not worry,You can look for 3rd party tools.There are great tools to help you. regards, P.S:Please do not hesitate to share your comments.

error C2065: 'CW2A' : undeclared identifier if atlconv.h is added into project

Selam (Hi in Turkish), if you get an Error : 'error C2065: 'CW2A' : undeclared identifier' in your C++ project(either ActiveX) while compiling the line which is included COLE2T statement (#define COLE2T CW2T in atlconv.h). please check below within your project; 1- Be sure that your project is supported by ATL (if it is ActiveX). To prepare your project for working with ATL , just add class via right click of Project in Microsoft Visual Studio Solution Explorer and select add>class>'Add ATL Support to MFC'.Visual Studio will set up the current project. 2- use statement with ATL:: prefix ( ATL::COLE2T lpszIID(lpszOleIID) ). Gule Gule (Bye Bye in Turkish). P.S:Please do not hesitate to share your comments.

error MIDL2020 : error generating type library : SaveAllChanges Failed

If you get an error while importing IDL into COM (dll) by midl command. check; -dll file is not read only -dll file is not used by other aopplications -Each GUI should not obtain { or } in IDL file. Good Lucks... P.S:Please do not hesitate to share your comments.