Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

how to create CNiFieldPointNetwork module in Multithreaded apartment

Hi thatsalok,

Since CNiDataSocket encapsulates the NI-DataSocket interface (simply a c++ wrapper around the CWDataSocket ActiveX object), you need to be using the interface IDs found in the type library for the CWDataSocket object. Use the OLE/COM Object Viewer to look up this information. Once inside the viewer, expand the Type Libraries category and navigate to National Instruments CW DataSocket. This should provide you with all the information you need.

Best Regards,
Jonathan N.
National Instruments
0 Kudos
Message 11 of 13
(2,846 Views)
Hello Sir,
  thanks for reply.. i have checked out what you have said.. INIDSCtl interface which CWDataSocket is encapsulating is Hidden from outer world.. as it idl says
 [
  odl,
  uuid(A7C10FE3-E3FC-11D0-80E8-00A02454310A),
  helpstring("Connects to data sources for reading data or data targets for writing data."),
  helpcontext(0x0000289d),
  hidden,
  dual,
  oleautomation
]

..  now how to create instance of same from outside world i.e. from my application..

Thanks and Regards
Alok
0 Kudos
Message 12 of 13
(2,841 Views)
thanks of lot.. i got it ..
 i used following method and it is working for me
CLSID clSid;
CLSIDFromString(L"CWDSLib.CWDataSocket",&clSid);
INIDSCtl* pInidsctlPtr;
CoCreateInstance(clSid,NULL,CLSCTX_ALL,__uuidof(INIDSCtl),(LPVOID*)&pInidsctlPtr);
0 Kudos
Message 13 of 13
(2,840 Views)