Link to home
Start Free TrialLog in
Avatar of stassaf
stassaf

asked on

atl - create instance

hi,
my com atl uses one atl object that has an interface.
this object should return some recordset to the client.
i want to use a regular class that will handle all the recordset creation, so i added a class to the project that creates a recordset.
now i want to create an instance of the regular class from my atl object in order to create the recordset.
i've tried some examples:
1.
  CComObject<systemRecordset> * pConn;
  CComObject<systemRecordset>::CreateInstance (&pConn);

2.
  in another example i saw usage of CComCoClass

what's the correct way to do it?
10x,
Assaf
ASKER CERTIFIED SOLUTION
Avatar of mishka_i
mishka_i

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of stassaf
stassaf

ASKER

yes, you are right, i've made a mistake
and created an atl class instead of a regular class.
but still if i have 2 atl classes and i want to create an instance of one class from the other, what's the correct syntax?