#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;
}
#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;
}