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.

40 lines
1.0 KiB

  1. #include <precomp.h>
  2. #include "WZeroConf.h"
  3. SERVICE_TABLE_ENTRY WZCServiceDispatchTable[] =
  4. {{ WZEROCONF_SERVICE, StartWZCService },
  5. { NULL, NULL}
  6. };
  7. VOID _cdecl
  8. main(VOID)
  9. {
  10. (VOID) StartServiceCtrlDispatcher(WZCServiceDispatchTable);
  11. }
  12. VOID
  13. StartWZCService(IN DWORD argc,IN LPWSTR argv[])
  14. {
  15. HMODULE hSvcDll = NULL;
  16. PWZC_SERVICE_ENTRY pfnSvcEntry = NULL;
  17. // Load the DLL that contains the service.
  18. hSvcDll = LoadLibrary(WZEROCONF_DLL);
  19. if (hSvcDll == NULL)
  20. return;
  21. // Get the address of the service's main entry point. This
  22. // entry point has a well-known name.
  23. pfnSvcEntry = (PWZC_SERVICE_ENTRY) GetProcAddress(
  24. hSvcDll,
  25. WZEROCONF_ENTRY_POINT);
  26. if (pfnSvcEntry == NULL)
  27. return;
  28. // Call the service's main entry point. This call doesn't return
  29. // until the service exits.
  30. pfnSvcEntry(argc, argv);
  31. // Unload the DLL.
  32. //FreeLibrary(hSvcDll);
  33. }