Configuration singleton ATL-COM-Server
i want to configure an ATL-COM Server as singleton. This COM-module
should be a bridge between two different applications. It should share
the data between the 2 apps.
Can someone give me a short step-by-step descrition what to do ?
I will do this with my knowledge as novice.
- Create new project "ATL-Project"
- At "Application-Settings" i will choose "Executable"
- With menu "Project" i will add a new class
- Choose class under "ATL" ATL-Simple-Object
- I will give it a shortname eq. ABC_SOW in the "Names" dialog.
- Under Options i will choose "Apartment" , "DUAL" and Aggregation on
YES. (Connectionpoints are not used for this bridge).
- In the class header-file i will add "DECLARE_CLASSFACTORY_SINGLETON"
- In the same class i will add a local attribute. "long
- in the class-wizzard i will add a property with put and get function
at the IABC_SOW- Interface. Type=LONG, Propertyname = ALong
- Now i fill in the cpp-code for the functions like this:
STDMETHODIMP CABC_SOW::get_ALong(LONG* pVal)
*pVal = m_thisisalong;
STDMETHODIMP CABC_SOW::put_ALong(LONG newVal)
m_thisisalong = newVal;
Is this the right way to make the bridge COM Component ?
Thanks in advance,