Source code of Windows XP (NT5)
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.

68 lines
1.4 KiB

  1. #include <stdio.h>
  2. #include <nt.h>
  3. #include <ntdef.h>
  4. #include <ntrtl.h>
  5. #include <nturtl.h>
  6. #include <windows.h>
  7. #include "wmlum.h"
  8. #include "wmlmacro.h"
  9. WMILIB_REG_STRUCT ClRtlWmiReg;
  10. GUID ClRtlTraceGuid = { /* a14414bc-22d9-11d3-ba8a-00c04f8eed00 */
  11. 0xa14414bc,0x22d9,0x11d3,{0xba,0x8a,0x00,0xc0,0x4f,0x8e,0xed,0x00}};
  12. void print(int level, PCHAR str) {
  13. printf(str);
  14. }
  15. WML_DATA wml;
  16. char a[] = "Gorik&Anzhela";
  17. int __cdecl main(int argc, char** argv) {
  18. DWORD status;
  19. ULONG ProcessId = 123;
  20. WMLLOCAL;
  21. STRING as;
  22. as.Buffer = a+6;
  23. as.Length = 7;
  24. LOADWML(status, wml);
  25. printf("LOADWML status, %d\n", status);
  26. if (status != ERROR_SUCCESS) {
  27. return -1;
  28. }
  29. wml.Initialize(L"Clustering Service", print, &wml.WmiRegHandle,
  30. L"ClusRtl", &ClRtlWmiReg,
  31. 0);
  32. #if 0
  33. wml.Trace( 10, &ClRtlTraceGuid, ClRtlWmiReg.LoggerHandle,
  34. LOG(UINT, ProcessId )
  35. LOGCHARARR(5, a) 0);
  36. Sleep(1000);
  37. wml.Trace( 10, &ClRtlTraceGuid, ClRtlWmiReg.LoggerHandle,
  38. LOG(UINT, ProcessId )
  39. LOGCHARARR(5, a) 0);
  40. Sleep(1000);
  41. #endif
  42. wml.Trace( 10, &ClRtlTraceGuid, ClRtlWmiReg.LoggerHandle,
  43. LOG(UINT, ProcessId )
  44. LOGCSTR(as) 0);
  45. Sleep(1000);
  46. UNLOADWML(wml);
  47. return 0;
  48. }