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.

71 lines
2.7 KiB

  1. //=--------------------------------------------------------------------------=
  2. // LocalSrv.H
  3. //=--------------------------------------------------------------------------=
  4. // Copyright 1995-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 _LOCALSRV_H_
  16. void InitializeLibrary(void);
  17. void UninitializeLibrary(void);
  18. BOOL RegisterData(void);
  19. BOOL UnregisterData(void);
  20. BOOL CheckForLicense();
  21. BOOL CheckLicenseKey(LPWSTR wszCheckme);
  22. BSTR GetLicenseKey(void);
  23. // global variables that various people use to get information about the control.
  24. //
  25. extern const char g_szLibName [];
  26. extern const CLSID *g_pLibid;
  27. //=--------------------------------------------------------------------------=
  28. // Global object information table
  29. //=--------------------------------------------------------------------------=
  30. // for each object in your application, you have an entry in this table. they
  31. // do not necessarily have to be CoCreatable, but if they are used, then they
  32. // should reside here. use the macros to fill in this table.
  33. //
  34. typedef struct tagOBJECTINFO {
  35. unsigned short usType;
  36. void *pInfo;
  37. } OBJECTINFO;
  38. extern OBJECTINFO g_ObjectInfo[];
  39. //=--------------------------------------------------------------------------=
  40. // these things are used to set up our objects in our global object table
  41. //
  42. #define OI_UNKNOWN 0
  43. #define OI_AUTOMATION 1
  44. #define OI_CONTROL 2
  45. #define OI_PROPERTYPAGE 3
  46. #define OI_BOGUS 0xffff
  47. #define OBJECTISCREATABLE(index) (((UNKNOWNOBJECTINFO *)(g_ObjectInfo[(index)]).pInfo)->rclsid != NULL)
  48. #define ISEMPTYOBJECT(index) (g_ObjectInfo[index].usType == OI_BOGUS)
  49. // these are the macros you should use to fill in the table. Note that the name
  50. // must be exactly the same as that used in the global structure you created
  51. // for this object.
  52. //
  53. #define UNKNOWNOBJECT(name) { OI_UNKNOWN, (void *)&(name##Object) }
  54. #define AUTOMATIONOBJECT(name) { OI_AUTOMATION, (void *)&(name##Object) }
  55. #define CONTROLOBJECT(name) { OI_CONTROL, (void *)&(name##Control) }
  56. #define PROPERTYPAGE(name) { OI_PROPERTYPAGE, (void *)&(name##Page) }
  57. #define EMPTYOBJECT { OI_BOGUS, NULL }
  58. #define _LOCALSRV_H_
  59. #endif // _LOCALSRV_H_
  60.