The following code attaches to the local computer as an SDO computer.
HRESULT hr;
CComPtr<ISdoMachine> pSdoMachine;
CLSID clsid;
hr = CLSIDFromProgID(TEXT("IAS.SdoMachine"), &clsid);
if (FAILED(hr))
{
return hr;
}
hr = CoCreateInstance(
clsid,
NULL,
CLSCTX_INPROC_SERVER,
__uuidof(ISdoMachine),
(void**)&pSdoMachine
);
if (FAILED(hr))
{
return hr;
}
//
// Pass NULL to specify local computer.
//
hr = pSdoMachine->Attach(NULL);
if (FAILED(hr))
{
return hr;
}
Attaching to a computer as an SDO computer is the first step in administering the computer through SDO.
For more information, see ISdoMachine, ISdoMachine::Attach.
Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.
