AfxOleInit

can I use AfxOleInit in a plain old console app if I include afxdisp.h?


what's up with that.

it keeps giving me errors.
LVL 8
bebonhamAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
jkrConnect With a Mentor Commented:
It is possible, but that requires a lot of work (see e.g. http://support.microsoft.com/support/kb/articles/Q152/6/96.asp which describes this for DB classes, but it's mainly the same for OLE support).

But, as this function does nothing but initialize the OLE libraries, why don't you use 'OleInitialize()'? That would give the same result...
0
 
Kevin_ElrodCommented:
I don't think so.  The "Afx" prefix usually means MFC land and takes you out of console app into Windows land.
0
 
bebonhamAuthor Commented:
I am trying to take a SDK written in MFC type stuff and use it in my C++ console program.

I am probably only prolonging my suffering to continue to try...maybe I should give up and try an MFC only approach.

Thanks, I will try.

Bob
0
 
bebonhamAuthor Commented:
it is still giving errors...

this mfc stuff is really frustrating!!!

Since the SDK uses COleDispatchDriver....maybe that is why I have to use MFC?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.