CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: COleSafeArray

  1. #1
    Join Date
    Dec 2002
    Posts
    5

    COleSafeArray

    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

  2. #2
    Join Date
    Oct 2002
    Location
    Singapore
    Posts
    3,128
    #include <afxdisp.h>

  3. #3
    Join Date
    Dec 2002
    Posts
    5
    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?

  4. #4
    Join Date
    Oct 2002
    Location
    Singapore
    Posts
    3,128
    :\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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured