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.

52 lines
1.0 KiB

  1. //-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1993.
  5. //
  6. // File: bmtstsvr.cxx
  7. //
  8. // Contents: Test server for benchmark test
  9. //
  10. // Classes:
  11. //
  12. // Functions: WinMain
  13. //
  14. // History: 1-July-93 t-martig Created
  15. //
  16. //--------------------------------------------------------------------------
  17. #include <oletest.hxx>
  18. extern COleTestClassFactory theFactory;
  19. extern ULONG objCount, lockCount;
  20. int APIENTRY WinMain(
  21. HINSTANCE hInstance,
  22. HINSTANCE hPrevInstance,
  23. LPSTR lpCmdLine,
  24. int nCmdShow
  25. )
  26. {
  27. DWORD reg;
  28. objCount = lockCount = 0;
  29. OleInitialize (NULL);
  30. CoRegisterClassObject (CLSID_COleTestClass, (IClassFactory *)&theFactory,
  31. CLSCTX_LOCAL_SERVER,0, &reg);
  32. while (objCount==0 && lockCount==0)
  33. Sleep (1000);
  34. while (objCount || lockCount)
  35. {
  36. Sleep (3000);
  37. }
  38. CoRevokeClassObject (reg);
  39. OleUninitialize ();
  40. return 0;
  41. }