|
-
July 12th, 2004, 02:42 AM
#1
COM with MFC for VB programs
hi
I'm trying to create objects or structs in a DLL or OCX that can be seen by Visual Basic programs.
---These objects will be created by VB programs using either keyword New or CreateObject.
---The objects will be passed as parameters to functions inside the DLL/OCX.
---The objects will be returned by functions from the DLL/OCX.
Where should I be reading? Can anyone provide a simple sample
project?
P.S. I'm trying to avoid OLE and Variants if possible.
thank you
awni
-
July 12th, 2004, 02:04 PM
#2
Hi awni,
I find the ATL project the easiest.
You can run the DLL under the debugger. When prompted, choose VB as the executable. Start a new project under VB.
The class Wizard makes it very easy to add methods.
The books I use on COM are Box's essential com, and a book on power VB (I don't recall by whom). The later book goes into detail how VB uses the COM objects, and little nuances such as BSTR conversions going on between the object and VB.
Jeff
-
July 13th, 2004, 04:40 PM
#3
I've been told to go with ATL, I found a few articles(which i have not read yet)
here on codegure, i wonder if they're what i need, this one looks promising, not sure though..
http://www.codeguru.com/Cpp/COM-Tech...cle.php/c3565/
entitled
ATL DISPID Encoding.
Can you tell from the title if it's what I need?
thanks
awni
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|