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.

95 lines
2.2 KiB

  1. /*++
  2. Copyright (c) 1991-1992 Microsoft Corporation
  3. Module Name:
  4. Rxmain.c
  5. Abstract:
  6. This is the main routine for the NT LAN Manager Workstation service.
  7. Author:
  8. --*/
  9. #include "rxdrt.h" // Service related global definitions
  10. #include "rxdevice.h" // Device init & shutdown
  11. DWORD RxDrtTrace = 0;
  12. #define RDBSS L"Rdbss"
  13. #define MRXLOCAL L"MrxLocal"
  14. #define MRXSMB L"MrxSmb"
  15. int __cdecl
  16. main( int argc , char** argv)
  17. {
  18. NTSTATUS Status;
  19. // Set up the appropriate debug tracing.
  20. RxDrtTrace = RXDRT_DEBUG_ALL;
  21. DbgPrint("[RxDrt] START\n");
  22. Status = RxLoadDriver(RDBSS);
  23. if (!NT_SUCCESS(Status)) {
  24. DbgPrint("[RxDrt] RxLoadDriver(%ws) returned %lx\n",RDBSS,Status);
  25. }
  26. Status = RxLoadDriver(MRXLOCAL);
  27. if (!NT_SUCCESS(Status)) {
  28. DbgPrint("[RxDrt] RxLoadDriver(%ws) returned %lx\n",MRXLOCAL,Status);
  29. }
  30. Status = RxLoadDriver(MRXSMB);
  31. if (!NT_SUCCESS(Status)) {
  32. DbgPrint("[RxDrt] RxLoadDriver(%ws) returned %lx\n",MRXSMB,Status);
  33. }
  34. Status = RxOpenRedirector();
  35. if (!NT_SUCCESS(Status)) {
  36. DbgPrint("[RxDrt] RxOpenRedirector() returned %lx\n",Status);
  37. }
  38. Status = RxOpenDgReceiver();
  39. if (!NT_SUCCESS(Status)) {
  40. DbgPrint("[RxDrt] RxOpenDgReceiver() returned %lx\n",Status);
  41. }
  42. Status = RxStartRedirector();
  43. if (!NT_SUCCESS(Status)) {
  44. DbgPrint("[RxDrt] RxStartRedirector() returned %lx\n",Status);
  45. }
  46. Status = RxBindToTransports();
  47. if (!NT_SUCCESS(Status)) {
  48. DbgPrint("[RxDrt] RxBindToTransports() returned %lx\n",Status);
  49. }
  50. Status = RxStopRedirector();
  51. if (!NT_SUCCESS(Status)) {
  52. DbgPrint("[RxDrt] RxShutdownRedirector() returned %lx\n",Status);
  53. }
  54. Status = RxUnloadDriver(MRXSMB);
  55. if (!NT_SUCCESS(Status)) {
  56. DbgPrint("[RxDrt] RxUnloadDriver(%ws) returned %lx\n",MRXSMB,Status);
  57. }
  58. Status = RxUnloadDriver(MRXLOCAL);
  59. if (!NT_SUCCESS(Status)) {
  60. DbgPrint("[RxDrt] RxUnloadDriver(%ws) returned %lx\n",MRXLOCAL,Status);
  61. }
  62. Status = RxUnloadDriver(RDBSS);
  63. if (!NT_SUCCESS(Status)) {
  64. DbgPrint("[RxDrt] RxUnloadDriver(%ws) returned %lx\n",RDBSS,Status);
  65. }
  66. DbgPrint("[RxDrt] END\n");
  67. return 0;
  68. }
  69.