It depends on how you are calling the COM server. If you use the VC++
#import
directive, you can directly use the smart pointer classes it generates for you. Example, if you have a property of type
LONG
called
Bar
, you'll see something like this:
__declspec(property(get=GetBar,put=PutBar))
long Bar;
This will let you directly access it as :
object->Bar = 23;
printf("%d\r\n", object->Bar);