Platform SDK: Transaction Server |
GetOriginalCreatorSID, ReleaseSID Methods Example
[This product will work only on Windows NT 4.0 versions and earlier. For Windows 2000 and later, see COM+ (Component Services).]
#include <mtx.h> IObjectContext* pIObjectContext = NULL; ISecurityProperty* pISecurityProperty = NULL; PSID pSid = NULL; HRESULT hr; // Get a reference to the ISecurityProperty interface. pIObjectContext->QueryInterface(IID_ISecurityProperty, (void**)&pISecurityProperty); // Obtain the original creator's security ID. hr = pISecurityProp->GetOriginalCreatorSID(&pSid) // Do some security checking here. // Release the security ID. pISecurityProperty->ReleaseSID(pSid);