Share via


IVsTypeLibraryWrapper.WrapTypeLibrary Method

Definition

Finds or encapsulates wrappers for the requested type library as well as any dependent type libraries.

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

Parameters

pTypeLibToWrap
TLIBATTR[]

[in] Pointer to a type library you want to wrap.

wszDestinationDirectory
String

[in] Specifies wszdestination folder.

wszKeyFile
String

[in] Specifies wszkey file.

wszKeyContainer
String

[in] Specifies wszkey container.

bDelaySign
Int32

[in] Byte containing the delay sign.

pCallback
IVsTypeLibraryWrapperCallback

[in] Pointer to a callback object. For more information see, IVsTypeLibraryWrapperCallback.

rgbstrWrapperPaths

IntPtr[]

nativeint[]

[out] Indicates the type library wrapper path(s).There may be more than one generated wrapper since the method also wraps the dependencies of the type library.

rgWrappedTypeLibs

IntPtr[]

nativeint[]

[out] Holds a TLIBATTR structure for each wrapped type library. Only the GUID, LCID, and major/minor versions are guaranteed to be set in this structure, the rest of the parameters are zero.

rgbGenerated

IntPtr[]

nativeint[]

[out] If the wrapper about to be generated already exists on disk and has not expired, the wrapper is not regenerated and corresponding entry in rgbGenerated is set to false. If the wrapper does not exist on disk, rgbGenerated is set to true and the wrapped is generated.

rgbstrWrapperTools

IntPtr[]

nativeint[]

[out] This array indicates which tool was used for each returned wrapper. The possible return values are "Tlbimp", "Aximp", and "Primary".

pcWrappedTypeLibs
UInt32

[out] Pointer to the size of wrapped type libraries.

Returns

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From 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  
);  

The ith element in rgbstrWrapperPaths corresponds to the ith element in rgWrapperTypeLibs, rgbGenerated, and corresponding entry in rgbstrWrapperTools. Never assume that first element in each of the above arrays corresponds to the type library you requested to be wrapped.

Applies to