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.

76 lines
2.8 KiB

  1. //=--------------------------------------------------------------------------=
  2. // LocalServer.H
  3. //=--------------------------------------------------------------------------=
  4. // Copyright 1995 Microsoft Corporation. All Rights Reserved.
  5. //
  6. // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
  7. // ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
  8. // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
  9. // PARTICULAR PURPOSE.
  10. //=--------------------------------------------------------------------------=
  11. //
  12. // global routines that are specific to the inproc server itself, such as
  13. // registration, object creation, object specification, etc...
  14. //
  15. #ifndef _LOCALSERVER_H_
  16. void InitializeLibrary(void);
  17. void UninitializeLibrary(void);
  18. #ifdef MDAC_BUILD
  19. BOOL CanUnloadLibraryNow(void);
  20. HRESULT LibraryGetClassObject(REFCLSID rclsid, REFIID riid, void **ppvObjOut);
  21. #endif
  22. BOOL RegisterData(void);
  23. BOOL UnregisterData(void);
  24. BOOL CheckForLicense();
  25. BOOL CheckLicenseKey(LPWSTR wszCheckme);
  26. BSTR GetLicenseKey(void);
  27. // global variables that various people use to get information about the control.
  28. //
  29. extern const char g_szLibName [];
  30. extern const CLSID *g_pLibid;
  31. //=--------------------------------------------------------------------------=
  32. // Global object information table
  33. //=--------------------------------------------------------------------------=
  34. // for each object in your application, you have an entry in this table. they
  35. // do not necessarily have to be CoCreatable, but if they are used, then they
  36. // should reside here. use the macros to fill in this table.
  37. //
  38. typedef struct tagOBJECTINFO {
  39. unsigned short usType;
  40. void *pInfo;
  41. } OBJECTINFO;
  42. extern OBJECTINFO g_ObjectInfo[];
  43. //=--------------------------------------------------------------------------=
  44. // these things are used to set up our objects in our global object table
  45. //
  46. #define OI_UNKNOWN 0
  47. #define OI_AUTOMATION 1
  48. #define OI_CONTROL 2
  49. #define OI_PROPERTYPAGE 3
  50. #define OI_BOGUS 0xffff
  51. #define OBJECTISCREATABLE(index) (((UNKNOWNOBJECTINFO *)(g_ObjectInfo[(index)]).pInfo)->rclsid != NULL)
  52. #define ISEMPTYOBJECT(index) (g_ObjectInfo[index].usType == OI_BOGUS)
  53. // these are the macros you should use to fill in the table. Note that the name
  54. // must be exactly the same as that used in the global structure you created
  55. // for this object.
  56. //
  57. #define UNKNOWNOBJECT(name) { OI_UNKNOWN, (void *)&(name##Object) }
  58. #define AUTOMATIONOBJECT(name) { OI_AUTOMATION, (void *)&(name##Object) }
  59. #define CONTROLOBJECT(name) { OI_CONTROL, (void *)&(name##Control) }
  60. #define PROPERTYPAGE(name) { OI_PROPERTYPAGE, (void *)&(name##Page) }
  61. #define EMPTYOBJECT { OI_BOGUS, NULL }
  62. #define _LOCALSERVER_H_
  63. #endif // _LOCALSERVER_H_
  64.