IGroupPolicyObject

2260阅读 0评论2010-09-14 leibniz_zsu
分类:WINDOWS

#define INITGUID
 
#include <Guiddef.h>
 #include <Gpedit.h>

#define INITGUID
#include
#include


void main()
{
CoInitialize(NULL);

IGroupPolicyObject* p = NULL;
HRESULT hr = CoCreateInstance(CLSID_GroupPolicyObject, NULL, CLSCTX_ALL,
IID_IGroupPolicyObject, (LPVOID*)&p);
if (SUCCEEDED(hr))
{
DWORD dwSection = GPO_SECTION_USER;
HKEY key = NULL;

p->GetRegistryKey(dwSection, &key);

p->Release();
}

CoUninitialize();

return;
}
上一篇:u-boot-2008.10移植到mini2440详解及源代码
下一篇:Serial port redirection through Remote Desktop