when do we need to define INC_OLE2?

This is a discussion on when do we need to define INC_OLE2? within the C++ Programming forums, part of the General Programming Boards category; Hello everyone, When do we need to add code, #define INC_OLE2 in our code? I can not find related information ...

  1. #1
    Registered User
    Join Date
    May 2006
    Posts
    1,579

    when do we need to define INC_OLE2?

    Hello everyone,


    When do we need to add code,

    #define INC_OLE2

    in our code? I can not find related information from MSDN.


    thanks in advance,
    George

  2. #2
    Unregistered User Yarin's Avatar
    Join Date
    Jul 2007
    Posts
    1,390
    When and where does the compiler ask for it?
    I don't see why people think Chuck Norris is so awesome. If he was really as great as they say, he would be over here slamming my head into the keybsk;lah;flksalfksdnlcslcnsldk;acklsd;glfbaskfl

    /* When I wrote this, only God and I understood what I was doing... Now, God only knows */

  3. #3
    Registered User hk_mp5kpdw's Avatar
    Join Date
    Jan 2002
    Location
    Northern Virginia/Washington DC Metropolitan Area
    Posts
    3,672
    From my meager diggings...

    You can manually include <ole2.h> in your application, or you can #define INC_OLE2 and then include <windows.h> and it (<ole2.h>) will be included for you. It simply seems to define whether or not including <windows.h> will also include <ole2.h>. If you don't define it before including <windows.h>, then it may or may not be loaded depending on other #define's that may be set.

    I could be mistaken.
    I used to be an adventurer like you... then I took an arrow to the knee.

  4. #4
    Registered User
    Join Date
    May 2006
    Posts
    1,579
    Thanks Yarin,


    Quote Originally Posted by Yarin View Post
    When and where does the compiler ask for it?
    Compiler is not asking for this. I am interested to learn. I read some other's code and sometimes they use #define INC_OLE2 and I want to know when do we need it and what is the function of INC_OLE2. Any ideas?


    regards,
    George

  5. #5
    Registered User
    Join Date
    May 2006
    Posts
    1,579
    Thanks hk_mp5kpdw,


    Quote Originally Posted by hk_mp5kpdw View Post
    From my meager diggings...

    You can manually include <ole2.h> in your application, or you can #define INC_OLE2 and then include <windows.h> and it (<ole2.h>) will be included for you. It simply seems to define whether or not including <windows.h> will also include <ole2.h>. If you don't define it before including <windows.h>, then it may or may not be loaded depending on other #define's that may be set.

    I could be mistaken.
    Your reply is very helpful. I think you mean if we want to include ole2.h, we should either include it directly or using,

    1. #define INC_OLE2;
    2. #include <windows.h>

    Right?

    What do you mean "If you don't define it before including <windows.h>, then it may or may not be loaded depending on other #define's that may be set."? I am confused about this sentence.


    regards,
    George

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Pointer within a Struct
    By Bladactania in forum C Programming
    Replies: 11
    Last Post: 04-03-2009, 10:20 PM
  2. Why?!?
    By p3rry in forum C Programming
    Replies: 3
    Last Post: 01-08-2009, 11:52 AM
  3. size of an integer pointer
    By onebrother in forum C Programming
    Replies: 5
    Last Post: 07-09-2008, 11:49 AM
  4. edit controls in dialogs
    By Homunculus in forum Windows Programming
    Replies: 10
    Last Post: 02-23-2006, 02:38 PM
  5. Please STICKY this- vital to MSVC 6 dev - BASETSD.h
    By VirtualAce in forum Game Programming
    Replies: 11
    Last Post: 03-15-2005, 08:22 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21