IVsTypeLibraryWrapperCallback.GetComClassicByTypeLibName Method
This API supports the .NET Framework 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.
Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
Syntax
'Declaración
Function GetComClassicByTypeLibName ( _
wszTypeLibName As String, _
<OutAttribute> pTypeLibAttr As TLIBATTR(), _
<OutAttribute> ByRef pDelaySigned As Integer, _
<OutAttribute> ByRef pbstrWrapperTool As String, _
<OutAttribute> ByRef pbstrPath As String _
) As Integer
'Uso
Dim instance As IVsTypeLibraryWrapperCallback
Dim wszTypeLibName As String
Dim pTypeLibAttr As TLIBATTR()
Dim pDelaySigned As Integer
Dim pbstrWrapperTool As String
Dim pbstrPath As String
Dim returnValue As Integer
returnValue = instance.GetComClassicByTypeLibName(wszTypeLibName, _
pTypeLibAttr, pDelaySigned, pbstrWrapperTool, _
pbstrPath)
int GetComClassicByTypeLibName(
string wszTypeLibName,
TLIBATTR[] pTypeLibAttr,
out int pDelaySigned,
out string pbstrWrapperTool,
out string pbstrPath
)
int GetComClassicByTypeLibName(
[InAttribute] String^ wszTypeLibName,
[OutAttribute] array<TLIBATTR>^ pTypeLibAttr,
[OutAttribute] int% pDelaySigned,
[OutAttribute] String^% pbstrWrapperTool,
[OutAttribute] String^% pbstrPath
)
abstract GetComClassicByTypeLibName :
wszTypeLibName:string *
pTypeLibAttr:TLIBATTR[] byref *
pDelaySigned:int byref *
pbstrWrapperTool:string byref *
pbstrPath:string byref -> int
function GetComClassicByTypeLibName(
wszTypeLibName : String,
pTypeLibAttr : TLIBATTR[],
pDelaySigned : int,
pbstrWrapperTool : String,
pbstrPath : String
) : int
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.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.
Remarks
COM Signature
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 nulla null reference (Nothing in Visual Basic), 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 nulla null reference (Nothing in Visual Basic).
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
IVsTypeLibraryWrapperCallback Interface