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.
Who is Participating?

Improve company productivity with a Business Account.Sign Up

jkrConnect With a Mentor Commented:
It is possible, but that requires a lot of work (see e.g. 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...
I don't think so.  The "Afx" prefix usually means MFC land and takes you out of console app into Windows land.
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.

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?
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.