home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 39 / IOPROG_39.ISO / SOFT / sdkjava40.exe / data1.cab / fg_Samples / Samples / COM / jexegen / stub / jpcommon.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-05-04  |  3.1 KB  |  92 lines

  1. /*++
  2.  
  3. Copyright (c) 1999  Microsoft Corporation
  4.  
  5. Module Name:
  6.  
  7.     jpcommon.h
  8.  
  9. Abstract:
  10.  
  11.     stuff used by both the build and split engines.
  12.  
  13. --*/
  14.  
  15. #ifndef __JPCOMMON_H
  16. #define __JPCOMMON_H
  17.  
  18. #ifdef __cplusplus
  19. extern "C" {
  20. #endif
  21.  
  22.  
  23. // flags for COMRegistrationInfo.dwFlags.
  24. #define DLLREG_CONTROL              0x00000001
  25. #define DLLREG_USERREG              0x00000002
  26. #define DLLREG_TM_APARTMENT         0x00000004  // these next four flags, APARTMENT, FREE,
  27. #define DLLREG_TM_FREE              0x00000008  //  BOTH, and NEUTRAL really need only 2 bits,
  28. #define DLLREG_TM_BOTH              0x00000010  //  since they're mutually exclusive.
  29. #define DLLREG_TM_NEUTRAL           0x00000020
  30.  
  31. #define DLLREG_THREADINGMODEL_FLAGS (DLLREG_TM_APARTMENT |          \
  32.                                         DLLREG_TM_FREE |            \
  33.                                         DLLREG_TM_BOTH |            \
  34.                                         DLLREG_TM_NEUTRAL)
  35.  
  36. #define DLLREG_PERSISTABLE_FLAGS    (DLLREG_CONTROL |               \
  37.                                         DLLREG_USERREG |            \
  38.                                         DLLREG_TM_APARTMENT |       \
  39.                                         DLLREG_TM_FREE |            \
  40.                                         DLLREG_TM_BOTH |            \
  41.                                         DLLREG_TM_NEUTRAL)
  42.  
  43. // these flags are used internally by the builder and are not persisted
  44. #define DLLREG_CHECKED_FOR_CONTROL  0x20000000
  45. #define DLLREG_CHECKED_FOR_USERREG  0x40000000      // we've looked for onCOMRegister
  46. #define DLLREG_IGNORE               0x80000000      // ignore COM info for this file
  47.  
  48. // java/COM registration info version
  49. // we start with 0x80000000 (high bit set) to disambiguate
  50. //  between VJ-style DLLs that have no version, but instead
  51. //  have the class count in the same location.
  52. #define JCRI_VERSION1               0x80000000
  53.  
  54.  
  55. // Default resource ID for the COM registration information (CRI) resource.
  56. //  Unless otherwise specified, the CRI resource is looked for within a given
  57. //  PE at this ID (the type is RT_RCDATA).
  58. #define JEX_DEFAULT_CRI_RESOURCE_ID 1002
  59.  
  60.  
  61. #include <pshpack4.h>
  62.  
  63. // one of these structs per java/COM class in image.
  64. typedef struct
  65. {
  66.     DWORD   cbClassNameOffset;      // offset into resource of unicode string.
  67.     DWORD   cbProgIDOffset;         // 0 means no ProgID, otherwise offset into resource of unicode string.
  68.     DWORD   cbDescriptionOffset;    // 0 means no description, otherwise offset into resource of unicode string.
  69.     DWORD   dwFlags;                // DLLREG_* values.
  70.     GUID    guidCLSID;
  71.     GUID    guidTypelib;
  72.     WORD    wVerMajor;
  73.     WORD    wVerMinor;
  74. } COMRegistrationInfo;
  75.  
  76. // header information for java/COM registration date.
  77. typedef struct
  78. {
  79.     DWORD               dwVersion;      // must be JCRI_VERSION1.
  80.     ULONG               dwClasses;      // class count.
  81.     COMRegistrationInfo aRegInfo[ 1 ];  // dwClasses occurrances.
  82. } COMRegistrationInfoHeader;
  83.  
  84. #include <poppack.h>
  85.  
  86.  
  87. #ifdef __cplusplus
  88. }
  89. #endif
  90.  
  91. #endif
  92.