home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 40 / IOPROG_40.ISO / SOFT / NETFrameworkSDK.exe / comsdk.cab / samples1.exe / smc / cor-temp.c < prev    next >
Encoding:
C/C++ Source or Header  |  2000-06-23  |  3.8 KB  |  87 lines

  1. typedef  char * AnsiStr;
  2. typedef wchar * wideStr;
  3.  
  4. const   wideStr COR_REQUIRES_SECOBJ_CUSTOM_VALUE      = L"REQ_SO";
  5. const   AnsiStr COR_REQUIRES_SECOBJ_CUSTOM_VALUE_ANSI = A"REQ_SO";
  6.  
  7. #if 0
  8.  
  9. const   size_t          MAX_PACKAGE_NAME = 255;
  10. const   size_t          MAX_CLASS_NAME   = 255;
  11.  
  12. const
  13. uint   COR_ILMETHOD_SECT_SMALL_MAX_DATASIZE = 0xFF;
  14.  
  15. #endif
  16.  
  17. struct  COR_ILMETHOD_SECT_SMALL : IMAGE_COR_ILMETHOD_SECT_SMALL
  18. {
  19. public:
  20.         const BYTE* Data() { return(((const BYTE*) this) + sizeof(COR_ILMETHOD_SECT_SMALL)); }
  21. };
  22.  
  23. struct  COR_ILMETHOD_SECT_FAT : IMAGE_COR_ILMETHOD_SECT_FAT
  24. {
  25. public:
  26.         const BYTE* Data() { return(((const BYTE*) this) + sizeof(COR_ILMETHOD_SECT_FAT)); }
  27. };
  28.  
  29. struct  COR_ILMETHOD_SECT
  30. {
  31.     const COR_ILMETHOD_SECT_FAT  * AsFat  () { return((COR_ILMETHOD_SECT_FAT  *) this); }
  32.     const COR_ILMETHOD_SECT_SMALL* AsSmall() { return((COR_ILMETHOD_SECT_SMALL*) this); }
  33.     const COR_ILMETHOD_SECT      * Align  () { return((COR_ILMETHOD_SECT      *) ((int)(((uint*)this) + 3) & ~3));  }
  34. };
  35.  
  36. struct  COR_ILMETHOD_FAT : IMAGE_COR_ILMETHOD_FAT
  37. {
  38. public:
  39.  
  40.         bool     IsFat() { return((Flags & CorILMethod_FormatMask) == CorILMethod_FatFormat); }
  41.         unsigned GetMaxStack() { return(MaxStack); }
  42.         unsigned GetCodeSize() { return(CodeSize); }
  43.         unsigned GetLocalVarSigTok() { return(LocalVarSigTok); }
  44.         BYTE*    GetCode() { return(((BYTE*) this) + 4*Size); }
  45.         const COR_ILMETHOD_SECT* GetSect() {
  46.                 if (!(Flags & CorILMethod_MoreSects)) return(NULL);
  47.                 return(((COR_ILMETHOD_SECT*) (GetCode() + GetCodeSize()))->Align());
  48.                 }
  49. };
  50.  
  51. struct  OSINFO
  52. {
  53.         DWORD           dwOSPlatformId;                 // Operating system platform.
  54.         DWORD           dwOSMajorVersion;               // OS Major version.
  55.         DWORD           dwOSMinorVersion;               // OS Minor version.
  56. };
  57.  
  58. struct  ASSEMBLYMETADATA
  59. {
  60.         USHORT          usMajorVersion;                 // Major Version.
  61.         USHORT          usMinorVersion;                 // Minor Version.
  62.         USHORT          usRevisionNumber;               // Revision Number.
  63.         USHORT          usBuildNumber;                  // Build Number.
  64.         LCID            *rLocale;                               // Locale array.
  65.         ULONG           ulLocale;                               // [IN/OUT] Size of the locale array/Actual # of entries filled in.
  66.         DWORD           *rProcessor;                    // Processor ID array.
  67.         ULONG           ulProcessor;                    // [IN/OUT] Size of the Processor ID array/Actual # of entries filled in.
  68.         OSINFO          *rOS;                                   // OSINFO array.
  69.         ULONG           ulOS;                                   // [IN/OUT]Size of the OSINFO array/Actual # of entries filled in.
  70.         LPWSTR          szConfiguration;                // Configuration.
  71.         ULONG           cbConfiguration;                // [IN/OUT]Size of the configuration buffer in wide chars/Actual size of configuration.
  72. };
  73.  
  74. inline
  75. unsigned    TypeFromToken(mdToken tk) { return (tk & 0xff000000); }
  76.  
  77. const mdToken mdTokenNil             = ((mdToken)0);
  78. const mdToken mdModuleNil            = ((mdModule)mdtModule);
  79. const mdToken mdTypeDefNil           = ((mdTypeDef)mdtTypeDef);
  80. const mdToken mdInterfaceImplNil     = ((mdInterfaceImpl)mdtInterfaceImpl);
  81. const mdToken mdTypeRefNil           = ((mdTypeRef)mdtTypeRef);
  82. const mdToken mdCustomValueNil       = ((mdCustomValue)mdtCustomValue);
  83. const mdToken mdLocalVarScopeNil     = ((mdLocalVarScope)mdtLocalVarScope);
  84. const mdToken mdMethodDefNil         = ((mdMethodDef)mdtMethodDef);
  85. const mdToken mdFieldDefNil          = ((mdFieldDef)mdtFieldDef);
  86. const mdToken mdExecutionLocationNil = ((mdExecutionLocation)mdtExecutionLocation);
  87.