
Calling an ATL COM Dll from C program
Quote:
>Ok, I've got a control that needs to be called both from scripting clients
>and a vanilla C++ (no MFC, preferably no ATL) app.
>Can someone point me to some resources on what I (or rather, the vanilla C
>app), will need to do to interface with my control?
>Is OleCreate( ) the right function?
>More importantly, is there a way to automatically generate a class wrapper
>for my control like when you use class wizard in an MFC project (but one
>that doesn't use MFC).
>Ryan Schneider
>NeoWorx Inc.
The easiest way if you're using
Visual C++ 5 or later, is to use the #import
preprocessor directive. It should be fairly well documented in MSDN. I wouldn't
use the smart pointers though, just the interface and CoCreateInstance
/erik