IVsTypeLibraryWrapper.WrapTypeLibrary(TLIBATTR[], String, String, String, Int32, IVsTypeLibraryWrapperCallback, IntPtr[], IntPtr[], IntPtr[], IntPtr[], UInt32) Método

Definição

Localiza ou encapsula wrappers para a biblioteca de tipos solicitada, bem como quaisquer bibliotecas de tipos dependentes.

public:
 int WrapTypeLibrary(cli::array <Microsoft::VisualStudio::OLE::Interop::TLIBATTR> ^ pTypeLibToWrap, System::String ^ wszDestinationDirectory, System::String ^ wszKeyFile, System::String ^ wszKeyContainer, int bDelaySign, Microsoft::VisualStudio::Shell::Interop::IVsTypeLibraryWrapperCallback ^ pCallback, cli::array <IntPtr> ^ rgbstrWrapperPaths, cli::array <IntPtr> ^ rgWrappedTypeLibs, cli::array <IntPtr> ^ rgbGenerated, cli::array <IntPtr> ^ rgbstrWrapperTools, [Runtime::InteropServices::Out] System::UInt32 % pcWrappedTypeLibs);
public int WrapTypeLibrary (Microsoft.VisualStudio.OLE.Interop.TLIBATTR[] pTypeLibToWrap, string wszDestinationDirectory, string wszKeyFile, string wszKeyContainer, int bDelaySign, Microsoft.VisualStudio.Shell.Interop.IVsTypeLibraryWrapperCallback pCallback, IntPtr[] rgbstrWrapperPaths, IntPtr[] rgWrappedTypeLibs, IntPtr[] rgbGenerated, IntPtr[] rgbstrWrapperTools, out uint pcWrappedTypeLibs);
abstract member WrapTypeLibrary : Microsoft.VisualStudio.OLE.Interop.TLIBATTR[] * string * string * string * int * Microsoft.VisualStudio.Shell.Interop.IVsTypeLibraryWrapperCallback * nativeint[] * nativeint[] * nativeint[] * nativeint[] * uint32 -> int
Public Function WrapTypeLibrary (pTypeLibToWrap As TLIBATTR(), wszDestinationDirectory As String, wszKeyFile As String, wszKeyContainer As String, bDelaySign As Integer, pCallback As IVsTypeLibraryWrapperCallback, rgbstrWrapperPaths As IntPtr(), rgWrappedTypeLibs As IntPtr(), rgbGenerated As IntPtr(), rgbstrWrapperTools As IntPtr(), ByRef pcWrappedTypeLibs As UInteger) As Integer

Parâmetros

pTypeLibToWrap
TLIBATTR[]

no Ponteiro para uma biblioteca de tipos que você deseja encapsular.

wszDestinationDirectory
String

no Especifica a pasta wszdestination.

wszKeyFile
String

no Especifica o arquivo wszkey.

wszKeyContainer
String

no Especifica o contêiner wszkey.

bDelaySign
Int32

no Byte que contém o sinal de atraso.

pCallback
IVsTypeLibraryWrapperCallback

no Ponteiro para um objeto de retorno de chamada. Para obter mais informações, consulte IVsTypeLibraryWrapperCallback.

rgbstrWrapperPaths
IntPtr[]

fora Indica os caminhos do wrapper da biblioteca de tipos. Pode haver mais de um wrapper gerado, pois o método também encapsula as dependências da biblioteca de tipos.

rgWrappedTypeLibs
IntPtr[]

fora Mantém uma TLIBATTR estrutura para cada biblioteca de tipos encapsulado. Somente as versões GUID, LCID e principal/secundária têm garantia de serem definidas nessa estrutura, o restante dos parâmetros são zero.

rgbGenerated
IntPtr[]

fora Se o wrapper prestes a ser gerado já existir no disco e não tiver expirado, o wrapper não será regenerado e a entrada correspondente no rgbGenerated será definida como false . Se o wrapper não existir no disco, rgbGenerated será definido como true e o encapsulado será gerado.

rgbstrWrapperTools
IntPtr[]

fora Essa matriz indica qual ferramenta foi usada para cada wrapper retornado. Os possíveis valores de retorno são "Tlbimp", "aximp" e "Primary".

pcWrappedTypeLibs
UInt32

fora Ponteiro para o tamanho das bibliotecas de tipo encapsulado.

Retornos

Int32

Se o método for bem-sucedido, retornará S_OK. Se falhar, retornará um código de erro.

Comentários

Assinatura COM

De VSShell. idl:

HRESULT IVsTypeLibraryWrapper::WrapTypeLibrary(  
   [in] TLIBATTR* pTypeLibToWrap,  
   [in] LPCOLESTR wszDestinationDirectory,  
   [in] LPCOLESTR wszKeyFile,  
   [in] LPCOLESTR wszKeyContainer,  
   [in] BOOL bDelaySign,  
   [in] IVsTypeLibraryWrapperCallback* pCallback,  
   [out] BSTR** rgbstrWrapperPaths,  
   [out] TLIBATTR** rgWrappedTypeLibs,  
   [out] BOOL** rgbGenerated,  
   [out] BSTR** rgbstrWrapperTools,  
   [out] ULONG* pcWrappedTypeLibs  
);  

O elemento i em rgbstrWrapperPaths corresponde ao elemento i em rgWrapperTypeLibs , rgbGenerated e à entrada correspondente no rgbstrWrapperTools . Nunca presuma que o primeiro elemento em cada uma das matrizes acima corresponde à biblioteca de tipos que você solicitou para ser encapsulado.

Aplica-se a