Click to See Complete Forum and Search --> : COleSafeArray


xagrez
December 11th, 2002, 12:52 AM
When i use COleSafeArray the compiler seems to say undeclared identifier.

Do i need to add specific header file or code in order for COleSafeArray to be recognised?

please help and thanks in advance:)

Kheun
December 11th, 2002, 02:09 AM
#include <afxdisp.h>

xagrez
December 11th, 2002, 02:48 AM
these are my header files

#include <stdio.h>
#include <iostream.h>
#include <comdef.h>
#include <ole2.h>
#include <afxdisp.h>

this is the error
-----------------------------
:\program files\microsoft visual studio\vc98\mfc\include\afxv_w32.h(14) : fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include <windows.h>
Error executing cl.exe.

conflict of header?
:)

Kheun
December 11th, 2002, 03:25 AM
:\program files\microsoft visual studio\vc98\mfc\include\afxv_w32.h(14) : fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include <windows.h>

Did you check the stdafx.h and preprocessor? You need to ensure that windows.h is not included and _WINDOWS_ is not defined.