IVsTypeLibraryWrapperCallback::GetComClassicByTypeLibName Method (String^, array<TLIBATTR>^, Int32, String^, String^)
This API supports the product infrastructure and is not intended to be used directly from your code.
Returns a COM classic wrapper name for a given type library and wrapper tool combination.
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
int GetComClassicByTypeLibName( String^ wszTypeLibName, array<TLIBATTR>^ pTypeLibAttr, [OutAttribute] int% pDelaySigned, [OutAttribute] String^% pbstrWrapperTool, [OutAttribute] String^% pbstrPath )
Parameters
- wszTypeLibName
-
Type:
System::String^
[in] Specifies type library name.
- pTypeLibAttr
-
Type:
array<Microsoft.VisualStudio.OLE.Interop::TLIBATTR>^
[out] Pointer to a type library attribute object.
- pDelaySigned
-
Type:
System::Int32
[out] Pointer to a delay signed object.
- pbstrWrapperTool
-
Type:
System::String^
[out] Pointer to a string containing the wrapper tool name.
- pbstrPath
-
Type:
System::String^
[out] Pointer to a string containing the path for the wrapper.
Return Value
Type: System::Int32If the method succeeds, it returns S_OK. If it fails, it returns an error code.
From compsvcspkg.idl:
HRESULT IVsTypeLibraryWrapperCallback::GetComClassicByTypeLibName(
[in] LPCOLESTR wszTypeLibName,
[out] TLIBATTR* pTypeLibAttr,
[out] BOOL* pDelaySigned,
[out] BSTR* pbstrWrapperTool,
[out,retval] BSTR* pbstrPath
);
As a VSPackage developer and a project system implementer you call wrapper tools when a user is trying to add a reference to a COM component. Which wrapping tool you call depends on the bstrWrapperTool parameter that is passed to the References::Add method:
If bstrWrapperTool is "" or null, call the Primary wrapper tool first. If that fails call the Tlbimp wrapper tool.
If bstrWrapperTool is Tlbimp, call the Tlbimp tool. If that fails do not call any other tool, return an error code instead.
If bstrWrapperTool is Aximp, call the Aximp tool. If that fails do not call any other tool, return an error code instead.
If bstrWrapperTool is Primary, call the Primary tool. If that fails do not call any other tool, return an error code instead.
If bstrWrapperTool is COM (if a user selects COM component from the Add Reference dialog), treat the situation as if bstrWrapperTool were "" or null.