Solved

AfxOleInit

Posted on 2001-08-28
4
300 Views
Last Modified: 2008-03-17
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.
0
Comment
Question by:bebonham
  • 2
4 Comments
 

Expert Comment

by:Kevin_Elrod
ID: 6433115
I don't think so.  The "Afx" prefix usually means MFC land and takes you out of console app into Windows land.
0
 
LVL 86

Accepted Solution

by:
jkr earned 50 total points
ID: 6433153
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
 
LVL 8

Author Comment

by:bebonham
ID: 6433229
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
 
LVL 8

Author Comment

by:bebonham
ID: 6433260
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

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

806 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question