IVsTypeLibraryWrapper::WrapTypeLibrary Method (array<TLIBATTR>^, String^, String^, String^, Int32, IVsTypeLibraryWrapperCallback^, array<IntPtr>^, array<IntPtr>^, array<IntPtr>^, array<IntPtr>^, UInt32)
This API supports the product infrastructure and is not intended to be used directly from your code.
Finds or encapsulates wrappers for the requested type library as well as any dependent type libraries.
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
int WrapTypeLibrary( array<TLIBATTR>^ pTypeLibToWrap, String^ wszDestinationDirectory, String^ wszKeyFile, String^ wszKeyContainer, int bDelaySign, IVsTypeLibraryWrapperCallback^ pCallback, array<IntPtr>^ rgbstrWrapperPaths, array<IntPtr>^ rgWrappedTypeLibs, array<IntPtr>^ rgbGenerated, array<IntPtr>^ rgbstrWrapperTools, [OutAttribute] unsigned int% pcWrappedTypeLibs )
Parameters
- pTypeLibToWrap
-
Type:
array<Microsoft.VisualStudio.OLE.Interop::TLIBATTR>^
[in] Pointer to a type library you want to wrap.
- wszDestinationDirectory
-
Type:
System::String^
[in] Specifies wszdestination folder.
- wszKeyFile
-
Type:
System::String^
[in] Specifies wszkey file.
- wszKeyContainer
-
Type:
System::String^
[in] Specifies wszkey container.
- bDelaySign
-
Type:
System::Int32
[in] Byte containing the delay sign.
- pCallback
-
Type:
Microsoft.VisualStudio.Shell.Interop::IVsTypeLibraryWrapperCallback^
[in] Pointer to a callback object. For more information see, IVsTypeLibraryWrapperCallback.
- rgbstrWrapperPaths
-
Type:
array<System::IntPtr>^
[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
-
Type:
array<System::IntPtr>^
[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
-
Type:
array<System::IntPtr>^
[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
-
Type:
array<System::IntPtr>^
[out] This array indicates which tool was used for each returned wrapper. The possible return values are "Tlbimp", "Aximp", and "Primary".
- pcWrappedTypeLibs
-
Type:
System::UInt32
[out] Pointer to the size of wrapped type libraries.
Return Value
Type: System::Int32If the method succeeds, it returns S_OK. If it fails, it returns an error code.
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.