Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
478 B

  1. #include <windows.h>
  2. #include <userenv.h>
  3. #include <userenvp.h>
  4. int __cdecl main( int argc, char *argv[])
  5. {
  6. HANDLE hToken;
  7. HANDLE hEvent;
  8. OpenProcessToken (GetCurrentProcess(), TOKEN_ALL_ACCESS, &hToken);
  9. hEvent = CreateEvent (NULL, TRUE, FALSE, TEXT("some event"));
  10. ApplyGroupPolicy (GP_APPLY_DS_POLICY | GP_BACKGROUND_REFRESH, hToken, hEvent, HKEY_CURRENT_USER, NULL);
  11. for (;;) ;
  12. CloseHandle (hEvent);
  13. return 0;
  14. }