|
-
May 22nd, 2011, 12:48 PM
#1
Basic COM learner
Hello,
I have a typelibrary AAA.tlb file and its compiled into AAA.tlh and AAA.tli
Within the header file I see its defined coclass as
struct CoClassAAA;
put in a namespace NS_AAA.
I do the following in my OnInitDialog
CoInitialize(NULL);
CLSID
HRESULT hr=CLSIDFromProgID(OLESTR("AAA.CoClassAAA"),&clsid);
But during debug hr value contains 0x800401f3 which is an invalid class string and clsid is NULL
I have no idea how to find out the correct class string to pass in for the given library.
Thank you,
-
May 22nd, 2011, 01:58 PM
#2
Re: Basic COM learner
 Originally Posted by ChayKieu
I do the following in my OnInitDialog
Code:
CoInitialize(NULL);
CLSID
HRESULT hr=CLSIDFromProgID(OLESTR("AAA.CoClassAAA"),&clsid);
This code cannot be compiled. Please, show your actual code.
Victor Nijegorodov
-
May 22nd, 2011, 02:52 PM
#3
-
May 23rd, 2011, 01:34 AM
#4
Re: Basic COM learner
struct CoClassAAA;
put in a namespace NS_AAA.
CLSID in your case is __uuidof(NS_AAA::CoClassAAA).
Best regards,
Igor
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
|