Not
Åtkomst till denna sida kräver auktorisation. Du kan prova att logga in eller byta katalog.
Åtkomst till denna sida kräver auktorisation. Du kan prova att byta katalog.
importera korsreferensbiblioteket "type_lib1" innan du importerar "type_lib2"
Anmärkningar
Ett typbibliotek refererades till med #import-direktivet . Typbiblioteket innehöll dock en referens till ett annat typbibliotek som inte refererades till med #import. Den andra .tlb-filen hittades av kompilatorn.
Example
Givet två typbibliotek på disken som skapats från följande två filer (kompilerade med midl.exe):
// c4336a.idl
[uuid("f87070ba-c6d9-405c-a8e4-8cd9ca25c12b")]
library c4336aLib
{
[uuid("f87070ba-c6d9-405c-a8e4-8cd9ca25c12c")]
enum E_C4336
{
one, two, three
};
};
Det andra typbiblioteket:
// c4336b.idl
[uuid("f87070ba-c6d9-405c-a8e4-8cd9ca25c12d")]
library C4336bLib
{
importlib ("c4336a.tlb");
[uuid("f87070ba-c6d9-405c-a8e4-8cd9ca25c12e")]
struct S_C4336
{
enum E_C4336 e;
};
};
I följande exempel genereras C4336:
// C4336.cpp
// compile with: /W4 /LD
// #import "C4336a.tlb"
#import "C4336b.tlb" // C4336, uncomment previous line to resolve