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.

65 lines
1.1 KiB

  1. /*++
  2. Copyright (c) 2001 Microsoft Corporation
  3. All rights reserved
  4. Module Name:
  5. common.hxx
  6. Abstract:
  7. utils
  8. Author:
  9. Larry Zhu (LZhu) December 1, 2001 Created
  10. Environment:
  11. User Mode -Win32
  12. Revision History:
  13. --*/
  14. #ifndef COMMON_HXX
  15. #define COMMON_HXX
  16. BOOL
  17. DllMainDefaultHandler(
  18. IN HANDLE hModule,
  19. IN DWORD dwReason,
  20. IN DWORD dwReserved
  21. );
  22. int
  23. Start(
  24. IN ULONG cbParameters,
  25. IN VOID* pvParameters
  26. );
  27. inline int
  28. RunItDefaultHandler(
  29. IN ULONG cbParameters,
  30. IN VOID* pvParameters
  31. )
  32. {
  33. NTSTATUS Status = STATUS_SUCCESS;
  34. DebugPrintf(SSPI_LOG, "RunIt: Hello world!\n");
  35. DebugPrintHex(SSPI_LOG, "Parameters", cbParameters, pvParameters);
  36. __try
  37. {
  38. return Start(cbParameters, pvParameters);
  39. }
  40. __except (EXCEPTION_EXECUTE_HANDLER)
  41. {
  42. Status = GetExceptionCode();
  43. DebugPrintf(SSPI_ERROR, "RunIt hit exception %#x\n", Status);
  44. }
  45. return RtlNtStatusToDosError(Status);
  46. }
  47. #endif // #ifndef COMMON_HXX