Microsoft.SMS.TSEnvironment CLSID and IID
Hi all! I want to access the COM Object "Microsoft.SMS.TSEnvironment" using C++ in the way of CoCreateInstance. I have a problem in finding the CLSID and IID of the mentioned COM Object. I tried finding it using regedit, but all I see is the CLSID which is something like this: {2D26B0A2-A1C9-4E75-84CB-9102F6842FE5}. The interface / IIDs are nowhere to be found. I tried inputting the CLSID into my program like this but it gives out an error. static const CLSID CLSID_TSEnvironment = ("{2D26B0A2-A1C9-4E75-84CB-9102F6842FE5}"); Any idea to solve this? I have tried using CLSIDFromString but I seem to be using it wrongly as it fails to connect to the COM object. When I tried to run it in a Win PE Task Sequence VM. Below is the code: CLSID CLSID_TSEnvironment; ::CLSIDFromString(_T("{2D26B0A2-A1C9-4E75-84CB-9102F6842FE5}"), &CLSID_TSEnvironment); HRESULT hr; hr=CoInitialize(NULL); hr=CoCreateInstance(CLSID_TSEnvironment, NULL, CLSCTX_INPROC_SERVER, IID_I_X, (void**)&pIX); Any help would be appreciated.Thank you very much!
February 22nd, 2010 3:48pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics