GUID is undefined ???

A

agrsaurabh

Code Sample:-



ATL Class



class CAtl : public IA, Public IB

{

---------

--------

virtual functions -- overridden of IA and IB

}



class MyClass : public CAtl

{

virtual methods again overridden

}

DEFINE_GUID(CLSID_MyClass, {---GUID---})



My Problem:

I have written a class (CAtl) which is deriving some COM interfaces
(IA and IB).

I have written one more class (MyClass) which is derived from
CAtl class.



I have overridden those virtual function of Interfaces in both of my
classes (in CAtl and also in MyClass).



I defined a new GUID for MyClass class.



Now i have to create Object of my class (CAtl) using CocreateInstance.
which is not working .....

it is saying that CLSID is undefined..what shud i do to register my
class and create its object.

Output file is a .lib

Please help me out

thanx





Now i want to create "Myclass" object using CoCreateInstance and error
is comming that GUID is undefined. How should i create its obj?
 
V

Victor Bazarov

agrsaurabh said:
Code Sample:-



ATL Class



class CAtl : public IA, Public IB

{
[...]

DEFINE_GUID(CLSID_MyClass, {---GUID---})



My Problem:

I have written a class (CAtl) which is deriving some COM interfaces
(IA and IB).

I have written one more class (MyClass) which is derived from
CAtl class.



I have overridden those virtual function of Interfaces in both of my
classes (in CAtl and also in MyClass).



I defined a new GUID for MyClass class.

GUID has nothing to do with C++.
Now i have to create Object of my class (CAtl) using CocreateInstance.
which is not working .....

'CocreateInstance' is not defined by C++ language.
it is saying that CLSID is undefined..what shud i do to register my
class and create its object.

Output file is a .lib

Please help me out

Please post to a newsgroup where COM (OLE) is on topic. I suggest
looking among microsoft.public.* newsgroups, with 'com' in the name.

Victor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,145
Messages
2,570,824
Members
47,371
Latest member
Brkaa

Latest Threads

Top