次の方法で共有


IVsTypeLibraryWrapperCallback.GetComClassicByTypeLibName Method

Definition

Returns a COM classic wrapper name for a given type library and wrapper tool combination.

public:
 int GetComClassicByTypeLibName(System::String ^ wszTypeLibName, cli::array <Microsoft::VisualStudio::OLE::Interop::TLIBATTR> ^ pTypeLibAttr, [Runtime::InteropServices::Out] int % pDelaySigned, [Runtime::InteropServices::Out] System::String ^ % pbstrWrapperTool, [Runtime::InteropServices::Out] System::String ^ % pbstrPath);
int GetComClassicByTypeLibName(std::wstring const & wszTypeLibName, std::Array <Microsoft::VisualStudio::OLE::Interop::TLIBATTR> const & pTypeLibAttr, [Runtime::InteropServices::Out] int & pDelaySigned, [Runtime::InteropServices::Out] std::wstring const & & pbstrWrapperTool, [Runtime::InteropServices::Out] std::wstring const & & pbstrPath);
public int GetComClassicByTypeLibName (string wszTypeLibName, Microsoft.VisualStudio.OLE.Interop.TLIBATTR[] pTypeLibAttr, out int pDelaySigned, out string pbstrWrapperTool, out string pbstrPath);
abstract member GetComClassicByTypeLibName : string * Microsoft.VisualStudio.OLE.Interop.TLIBATTR[] * int * string * string -> int
Public Function GetComClassicByTypeLibName (wszTypeLibName As String, pTypeLibAttr As TLIBATTR(), ByRef pDelaySigned As Integer, ByRef pbstrWrapperTool As String, ByRef pbstrPath As String) As Integer

Parameters

wszTypeLibName
String

[in] Specifies type library name.

pTypeLibAttr
TLIBATTR[]

[out] Pointer to a type library attribute object.

pDelaySigned
Int32

[out] Pointer to a delay signed object.

pbstrWrapperTool
String

[out] Pointer to a string containing the wrapper tool name.

pbstrPath
String

[out] Pointer to a string containing the path for the wrapper.

Returns

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 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.

Applies to