Click here to Skip to main content
15,880,469 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have an interface which defines accessor functions [propget and propput]. It is named as DataItem. It is implemented as get_DataItem and put_DataItem in the interface implementing class.

To access these accessor functions, what is the name I should be using ?

Thanks,
Shishir
Posted

1 solution

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:

C++
__declspec(property(get=GetBar,put=PutBar))
long Bar;


This will let you directly access it as :

C++
object->Bar = 23;
printf("%d\r\n", object->Bar);
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900