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.

42 lines
638 B

  1. #include <windows.h>
  2. #include <winioctl.h>
  3. #include <stdio.h>
  4. #include <malloc.h>
  5. #include <Shlwapi.h>
  6. #include <ntddsac.h>
  7. #include <sacapi.h>
  8. int _cdecl wmain(int argc, WCHAR **argv)
  9. {
  10. HANDLE SacHandle;
  11. BOOL Status;
  12. //
  13. // Open the SAC
  14. //
  15. // SECURITY:
  16. //
  17. // this handle cannot be inherited
  18. //
  19. SacHandle = CreateFile(
  20. L"\\\\.\\SAC\\",
  21. 0x1F01FF,
  22. 0,
  23. NULL,
  24. OPEN_EXISTING,
  25. 0,
  26. NULL
  27. );
  28. if (SacHandle == INVALID_HANDLE_VALUE) {
  29. Status = FALSE;
  30. }
  31. return 0;
  32. }