Retrieving a Service SDO

Note

Internet Authentication Service (IAS) was renamed Network Policy Server (NPS) starting with Windows Server 2008.

 

The following code retrieves a Server Data Object (SDO) for the Network Policy Server .

   HRESULT hr;
   CComPtr<IUnknown> pServiceUnknown;
   _bstr_t bstrServiceName = L"IAS";

   hr = pSdoMachine->GetServiceSDO(
      DATA_STORE_LOCAL,
      bstrServiceName,
      (IUnknown**) &amp;pServiceUnknown
   );
   if (FAILED(hr))
   {
      return hr;
   }

   CComPtr<ISdoServiceControl>  pSdoServiceControl;
   hr = pServiceUnknown->QueryInterface(
      __uuidof(ISdoServiceControl),
      (void**) &amp;pSdoServiceControl
   );
   if (FAILED(hr))
   {
      return hr;
   }

Remarks

You must attach to a computer before you can call any of the ISdoMachine methods.

Attaching to an SDO-Enabled Computer

ISdoMachine::GetServiceSDO

ISdoServiceControl