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.

91 lines
1.5 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1997.
  5. //
  6. // File: testsrv.c
  7. //
  8. // Contents:
  9. //
  10. // Classes:
  11. //
  12. // Functions:
  13. //
  14. // History: 4-18-97 RichardW Created
  15. //
  16. //----------------------------------------------------------------------------
  17. #include <nt.h>
  18. #include <ntrtl.h>
  19. #include <nturtl.h>
  20. #include <wxlpc.h>
  21. #include <windows.h>
  22. char _hex[] = "0123456789abcdef" ;
  23. #define fromhex(x) _hex[x & 0xF]
  24. NTSTATUS
  25. WxGetKeyData(
  26. HANDLE Ignored,
  27. WX_AUTH_TYPE ExpectedAuth,
  28. ULONG BufferSize,
  29. PUCHAR Buffer,
  30. PULONG BufferData
  31. )
  32. {
  33. RtlCopyMemory( Buffer, _hex, BufferSize );
  34. *BufferData = BufferSize ;
  35. return STATUS_SUCCESS ;
  36. }
  37. NTSTATUS
  38. WxReportResults(
  39. HANDLE Ignored,
  40. NTSTATUS Status
  41. )
  42. {
  43. return STATUS_SUCCESS ;
  44. }
  45. VOID
  46. WxClientDisconnect(
  47. HANDLE ignored
  48. )
  49. {
  50. DbgPrint("Client Disconnect\n");
  51. }
  52. ULONG
  53. ThreadWrapper(
  54. PVOID Ignored
  55. )
  56. {
  57. NTSTATUS Status ;
  58. Status = WxServerThread( Ignored );
  59. DbgPrint( "WxServerThread returned %x\n", Status );
  60. return 0 ;
  61. }
  62. void __cdecl main (int argc, char *argv[])
  63. {
  64. HANDLE Thread ;
  65. ULONG Tid ;
  66. DbgPrint( "Starting up server thread:\n" );
  67. Thread = CreateThread( 0, NULL, ThreadWrapper, NULL, 0, &Tid );
  68. if ( Thread )
  69. {
  70. DbgPrint( "Waiting on thread\n" );
  71. WaitForSingleObject( Thread, INFINITE );
  72. }
  73. }