Сгенерируйте мне определения интерфейса _AppDomain

Тема в разделе "WASM.WIN32", создана пользователем Rel, 29 май 2018.

  1. Rel

    Rel Well-Known Member

    Публикаций:
    2
    Регистрация:
    11 дек 2008
    Сообщения:
    5.323
    у кого есть студия или windows sdk? можете мне с помощью midl-компилятора сгенерировать определения для интерфейса _AppDomain на С++? по идее он должен находиться в mscorlib.tlb... заранее спасибо, с меня плюсики в карму!
     
  2. Thetrik

    Thetrik UA6527P

    Публикаций:
    0
    Регистрация:
    25 июл 2011
    Сообщения:
    875
    Код (C++):
    1. struct __declspec(uuid("05f696dc-2b29-3663-ad8b-c4389cf2a713"))
    2. _AppDomain : IUnknown
    3. {
    4.     //
    5.     // Raw methods provided by interface
    6.     //
    7.  
    8.       virtual HRESULT __stdcall GetTypeInfoCount (
    9.         /*[out]*/ unsigned long * pcTInfo ) = 0;
    10.       virtual HRESULT __stdcall GetTypeInfo (
    11.         /*[in]*/ unsigned long iTInfo,
    12.         /*[in]*/ unsigned long lcid,
    13.         /*[in]*/ long ppTInfo ) = 0;
    14.       virtual HRESULT __stdcall GetIDsOfNames (
    15.         /*[in]*/ GUID * riid,
    16.         /*[in]*/ long rgszNames,
    17.         /*[in]*/ unsigned long cNames,
    18.         /*[in]*/ unsigned long lcid,
    19.         /*[in]*/ long rgDispId ) = 0;
    20.       virtual HRESULT __stdcall Invoke (
    21.         /*[in]*/ unsigned long dispIdMember,
    22.         /*[in]*/ GUID * riid,
    23.         /*[in]*/ unsigned long lcid,
    24.         /*[in]*/ short wFlags,
    25.         /*[in]*/ long pDispParams,
    26.         /*[in]*/ long pVarResult,
    27.         /*[in]*/ long pExcepInfo,
    28.         /*[in]*/ long puArgErr ) = 0;
    29.       virtual HRESULT __stdcall get_ToString (
    30.         /*[out,retval]*/ BSTR * pRetVal ) = 0;
    31.       virtual HRESULT __stdcall Equals (
    32.         /*[in]*/ VARIANT other,
    33.         /*[out,retval]*/ VARIANT_BOOL * pRetVal ) = 0;
    34.       virtual HRESULT __stdcall GetHashCode (
    35.         /*[out,retval]*/ long * pRetVal ) = 0;
    36.       virtual HRESULT __stdcall GetType (
    37.         /*[out,retval]*/ struct _Type * * pRetVal ) = 0;
    38.       virtual HRESULT __stdcall InitializeLifetimeService (
    39.         /*[out,retval]*/ VARIANT * pRetVal ) = 0;
    40.       virtual HRESULT __stdcall GetLifetimeService (
    41.         /*[out,retval]*/ VARIANT * pRetVal ) = 0;
    42.       virtual HRESULT __stdcall get_Evidence (
    43.         /*[out,retval]*/ struct _Evidence * * pRetVal ) = 0;
    44.       virtual HRESULT __stdcall add_DomainUnload (
    45.         /*[in]*/ struct _EventHandler * value ) = 0;
    46.       virtual HRESULT __stdcall remove_DomainUnload (
    47.         /*[in]*/ struct _EventHandler * value ) = 0;
    48.       virtual HRESULT __stdcall add_AssemblyLoad (
    49.         /*[in]*/ struct _AssemblyLoadEventHandler * value ) = 0;
    50.       virtual HRESULT __stdcall remove_AssemblyLoad (
    51.         /*[in]*/ struct _AssemblyLoadEventHandler * value ) = 0;
    52.       virtual HRESULT __stdcall add_ProcessExit (
    53.         /*[in]*/ struct _EventHandler * value ) = 0;
    54.       virtual HRESULT __stdcall remove_ProcessExit (
    55.         /*[in]*/ struct _EventHandler * value ) = 0;
    56.       virtual HRESULT __stdcall add_TypeResolve (
    57.         /*[in]*/ struct _ResolveEventHandler * value ) = 0;
    58.       virtual HRESULT __stdcall remove_TypeResolve (
    59.         /*[in]*/ struct _ResolveEventHandler * value ) = 0;
    60.       virtual HRESULT __stdcall add_ResourceResolve (
    61.         /*[in]*/ struct _ResolveEventHandler * value ) = 0;
    62.       virtual HRESULT __stdcall remove_ResourceResolve (
    63.         /*[in]*/ struct _ResolveEventHandler * value ) = 0;
    64.       virtual HRESULT __stdcall add_AssemblyResolve (
    65.         /*[in]*/ struct _ResolveEventHandler * value ) = 0;
    66.       virtual HRESULT __stdcall remove_AssemblyResolve (
    67.         /*[in]*/ struct _ResolveEventHandler * value ) = 0;
    68.       virtual HRESULT __stdcall add_UnhandledException (
    69.         /*[in]*/ struct _UnhandledExceptionEventHandler * value ) = 0;
    70.       virtual HRESULT __stdcall remove_UnhandledException (
    71.         /*[in]*/ struct _UnhandledExceptionEventHandler * value ) = 0;
    72.       virtual HRESULT __stdcall DefineDynamicAssembly (
    73.         /*[in]*/ struct _AssemblyName * name,
    74.         /*[in]*/ enum AssemblyBuilderAccess access,
    75.         /*[out,retval]*/ struct _AssemblyBuilder * * pRetVal ) = 0;
    76.       virtual HRESULT __stdcall DefineDynamicAssembly_2 (
    77.         /*[in]*/ struct _AssemblyName * name,
    78.         /*[in]*/ enum AssemblyBuilderAccess access,
    79.         /*[in]*/ BSTR dir,
    80.         /*[out,retval]*/ struct _AssemblyBuilder * * pRetVal ) = 0;
    81.       virtual HRESULT __stdcall DefineDynamicAssembly_3 (
    82.         /*[in]*/ struct _AssemblyName * name,
    83.         /*[in]*/ enum AssemblyBuilderAccess access,
    84.         /*[in]*/ struct _Evidence * Evidence,
    85.         /*[out,retval]*/ struct _AssemblyBuilder * * pRetVal ) = 0;
    86.       virtual HRESULT __stdcall DefineDynamicAssembly_4 (
    87.         /*[in]*/ struct _AssemblyName * name,
    88.         /*[in]*/ enum AssemblyBuilderAccess access,
    89.         /*[in]*/ struct _PermissionSet * requiredPermissions,
    90.         /*[in]*/ struct _PermissionSet * optionalPermissions,
    91.         /*[in]*/ struct _PermissionSet * refusedPermissions,
    92.         /*[out,retval]*/ struct _AssemblyBuilder * * pRetVal ) = 0;
    93.       virtual HRESULT __stdcall DefineDynamicAssembly_5 (
    94.         /*[in]*/ struct _AssemblyName * name,
    95.         /*[in]*/ enum AssemblyBuilderAccess access,
    96.         /*[in]*/ BSTR dir,
    97.         /*[in]*/ struct _Evidence * Evidence,
    98.         /*[out,retval]*/ struct _AssemblyBuilder * * pRetVal ) = 0;
    99.       virtual HRESULT __stdcall DefineDynamicAssembly_6 (
    100.         /*[in]*/ struct _AssemblyName * name,
    101.         /*[in]*/ enum AssemblyBuilderAccess access,
    102.         /*[in]*/ BSTR dir,
    103.         /*[in]*/ struct _PermissionSet * requiredPermissions,
    104.         /*[in]*/ struct _PermissionSet * optionalPermissions,
    105.         /*[in]*/ struct _PermissionSet * refusedPermissions,
    106.         /*[out,retval]*/ struct _AssemblyBuilder * * pRetVal ) = 0;
    107.       virtual HRESULT __stdcall DefineDynamicAssembly_7 (
    108.         /*[in]*/ struct _AssemblyName * name,
    109.         /*[in]*/ enum AssemblyBuilderAccess access,
    110.         /*[in]*/ struct _Evidence * Evidence,
    111.         /*[in]*/ struct _PermissionSet * requiredPermissions,
    112.         /*[in]*/ struct _PermissionSet * optionalPermissions,
    113.         /*[in]*/ struct _PermissionSet * refusedPermissions,
    114.         /*[out,retval]*/ struct _AssemblyBuilder * * pRetVal ) = 0;
    115.       virtual HRESULT __stdcall DefineDynamicAssembly_8 (
    116.         /*[in]*/ struct _AssemblyName * name,
    117.         /*[in]*/ enum AssemblyBuilderAccess access,
    118.         /*[in]*/ BSTR dir,
    119.         /*[in]*/ struct _Evidence * Evidence,
    120.         /*[in]*/ struct _PermissionSet * requiredPermissions,
    121.         /*[in]*/ struct _PermissionSet * optionalPermissions,
    122.         /*[in]*/ struct _PermissionSet * refusedPermissions,
    123.         /*[out,retval]*/ struct _AssemblyBuilder * * pRetVal ) = 0;
    124.       virtual HRESULT __stdcall DefineDynamicAssembly_9 (
    125.         /*[in]*/ struct _AssemblyName * name,
    126.         /*[in]*/ enum AssemblyBuilderAccess access,
    127.         /*[in]*/ BSTR dir,
    128.         /*[in]*/ struct _Evidence * Evidence,
    129.         /*[in]*/ struct _PermissionSet * requiredPermissions,
    130.         /*[in]*/ struct _PermissionSet * optionalPermissions,
    131.         /*[in]*/ struct _PermissionSet * refusedPermissions,
    132.         /*[in]*/ VARIANT_BOOL IsSynchronized,
    133.         /*[out,retval]*/ struct _AssemblyBuilder * * pRetVal ) = 0;
    134.       virtual HRESULT __stdcall CreateInstance (
    135.         /*[in]*/ BSTR AssemblyName,
    136.         /*[in]*/ BSTR typeName,
    137.         /*[out,retval]*/ struct _ObjectHandle * * pRetVal ) = 0;
    138.       virtual HRESULT __stdcall CreateInstanceFrom (
    139.         /*[in]*/ BSTR assemblyFile,
    140.         /*[in]*/ BSTR typeName,
    141.         /*[out,retval]*/ struct _ObjectHandle * * pRetVal ) = 0;
    142.       virtual HRESULT __stdcall CreateInstance_2 (
    143.         /*[in]*/ BSTR AssemblyName,
    144.         /*[in]*/ BSTR typeName,
    145.         /*[in]*/ SAFEARRAY * activationAttributes,
    146.         /*[out,retval]*/ struct _ObjectHandle * * pRetVal ) = 0;
    147.       virtual HRESULT __stdcall CreateInstanceFrom_2 (
    148.         /*[in]*/ BSTR assemblyFile,
    149.         /*[in]*/ BSTR typeName,
    150.         /*[in]*/ SAFEARRAY * activationAttributes,
    151.         /*[out,retval]*/ struct _ObjectHandle * * pRetVal ) = 0;
    152.       virtual HRESULT __stdcall CreateInstance_3 (
    153.         /*[in]*/ BSTR AssemblyName,
    154.         /*[in]*/ BSTR typeName,
    155.         /*[in]*/ VARIANT_BOOL ignoreCase,
    156.         /*[in]*/ enum BindingFlags bindingAttr,
    157.         /*[in]*/ struct _Binder * Binder,
    158.         /*[in]*/ SAFEARRAY * args,
    159.         /*[in]*/ struct _CultureInfo * culture,
    160.         /*[in]*/ SAFEARRAY * activationAttributes,
    161.         /*[in]*/ struct _Evidence * securityAttributes,
    162.         /*[out,retval]*/ struct _ObjectHandle * * pRetVal ) = 0;
    163.       virtual HRESULT __stdcall CreateInstanceFrom_3 (
    164.         /*[in]*/ BSTR assemblyFile,
    165.         /*[in]*/ BSTR typeName,
    166.         /*[in]*/ VARIANT_BOOL ignoreCase,
    167.         /*[in]*/ enum BindingFlags bindingAttr,
    168.         /*[in]*/ struct _Binder * Binder,
    169.         /*[in]*/ SAFEARRAY * args,
    170.         /*[in]*/ struct _CultureInfo * culture,
    171.         /*[in]*/ SAFEARRAY * activationAttributes,
    172.         /*[in]*/ struct _Evidence * securityAttributes,
    173.         /*[out,retval]*/ struct _ObjectHandle * * pRetVal ) = 0;
    174.       virtual HRESULT __stdcall Load (
    175.         /*[in]*/ struct _AssemblyName * assemblyRef,
    176.         /*[out,retval]*/ struct _Assembly * * pRetVal ) = 0;
    177.       virtual HRESULT __stdcall Load_2 (
    178.         /*[in]*/ BSTR assemblyString,
    179.         /*[out,retval]*/ struct _Assembly * * pRetVal ) = 0;
    180.       virtual HRESULT __stdcall Load_3 (
    181.         /*[in]*/ SAFEARRAY * rawAssembly,
    182.         /*[out,retval]*/ struct _Assembly * * pRetVal ) = 0;
    183.       virtual HRESULT __stdcall Load_4 (
    184.         /*[in]*/ SAFEARRAY * rawAssembly,
    185.         /*[in]*/ SAFEARRAY * rawSymbolStore,
    186.         /*[out,retval]*/ struct _Assembly * * pRetVal ) = 0;
    187.       virtual HRESULT __stdcall Load_5 (
    188.         /*[in]*/ SAFEARRAY * rawAssembly,
    189.         /*[in]*/ SAFEARRAY * rawSymbolStore,
    190.         /*[in]*/ struct _Evidence * securityEvidence,
    191.         /*[out,retval]*/ struct _Assembly * * pRetVal ) = 0;
    192.       virtual HRESULT __stdcall Load_6 (
    193.         /*[in]*/ struct _AssemblyName * assemblyRef,
    194.         /*[in]*/ struct _Evidence * assemblySecurity,
    195.         /*[out,retval]*/ struct _Assembly * * pRetVal ) = 0;
    196.       virtual HRESULT __stdcall Load_7 (
    197.         /*[in]*/ BSTR assemblyString,
    198.         /*[in]*/ struct _Evidence * assemblySecurity,
    199.         /*[out,retval]*/ struct _Assembly * * pRetVal ) = 0;
    200.       virtual HRESULT __stdcall ExecuteAssembly (
    201.         /*[in]*/ BSTR assemblyFile,
    202.         /*[in]*/ struct _Evidence * assemblySecurity,
    203.         /*[out,retval]*/ long * pRetVal ) = 0;
    204.       virtual HRESULT __stdcall ExecuteAssembly_2 (
    205.         /*[in]*/ BSTR assemblyFile,
    206.         /*[out,retval]*/ long * pRetVal ) = 0;
    207.       virtual HRESULT __stdcall ExecuteAssembly_3 (
    208.         /*[in]*/ BSTR assemblyFile,
    209.         /*[in]*/ struct _Evidence * assemblySecurity,
    210.         /*[in]*/ SAFEARRAY * args,
    211.         /*[out,retval]*/ long * pRetVal ) = 0;
    212.       virtual HRESULT __stdcall get_FriendlyName (
    213.         /*[out,retval]*/ BSTR * pRetVal ) = 0;
    214.       virtual HRESULT __stdcall get_BaseDirectory (
    215.         /*[out,retval]*/ BSTR * pRetVal ) = 0;
    216.       virtual HRESULT __stdcall get_RelativeSearchPath (
    217.         /*[out,retval]*/ BSTR * pRetVal ) = 0;
    218.       virtual HRESULT __stdcall get_ShadowCopyFiles (
    219.         /*[out,retval]*/ VARIANT_BOOL * pRetVal ) = 0;
    220.       virtual HRESULT __stdcall GetAssemblies (
    221.         /*[out,retval]*/ SAFEARRAY * * pRetVal ) = 0;
    222.       virtual HRESULT __stdcall AppendPrivatePath (
    223.         /*[in]*/ BSTR Path ) = 0;
    224.       virtual HRESULT __stdcall ClearPrivatePath ( ) = 0;
    225.       virtual HRESULT __stdcall SetShadowCopyPath (
    226.         /*[in]*/ BSTR s ) = 0;
    227.       virtual HRESULT __stdcall ClearShadowCopyPath ( ) = 0;
    228.       virtual HRESULT __stdcall SetCachePath (
    229.         /*[in]*/ BSTR s ) = 0;
    230.       virtual HRESULT __stdcall SetData (
    231.         /*[in]*/ BSTR name,
    232.         /*[in]*/ VARIANT data ) = 0;
    233.       virtual HRESULT __stdcall GetData (
    234.         /*[in]*/ BSTR name,
    235.         /*[out,retval]*/ VARIANT * pRetVal ) = 0;
    236.       virtual HRESULT __stdcall SetAppDomainPolicy (
    237.         /*[in]*/ struct _PolicyLevel * domainPolicy ) = 0;
    238.       virtual HRESULT __stdcall SetThreadPrincipal (
    239.         /*[in]*/ struct IPrincipal * principal ) = 0;
    240.       virtual HRESULT __stdcall SetPrincipalPolicy (
    241.         /*[in]*/ enum PrincipalPolicy policy ) = 0;
    242.       virtual HRESULT __stdcall DoCallBack (
    243.         /*[in]*/ struct _CrossAppDomainDelegate * theDelegate ) = 0;
    244.       virtual HRESULT __stdcall get_DynamicDirectory (
    245.         /*[out,retval]*/ BSTR * pRetVal ) = 0;
    246. };
    247.  
     
    Rel и Ronin_ нравится это.
  3. Rel

    Rel Well-Known Member

    Публикаций:
    2
    Регистрация:
    11 дек 2008
    Сообщения:
    5.323
    большое спасибо!