Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1636787
  • 博文数量: 584
  • 博客积分: 13857
  • 博客等级: 上将
  • 技术积分: 11883
  • 用 户 组: 普通用户
  • 注册时间: 2009-12-16 09:34

分类: WINDOWS

2010-09-14 09:16:10

#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;
}
阅读(2196) | 评论(0) | 转发(1) |
给主人留下些什么吧!~~