Redigera

Dela via


Marshal.GetTypeLibName Method

Definition

Retrieves the name of a type library.

Overloads

GetTypeLibName(ITypeLib)

Retrieves the name of a type library.

GetTypeLibName(UCOMITypeLib)
Obsolete.

Retrieves the name of a type library.

GetTypeLibName(ITypeLib)

Retrieves the name of a type library.

public:
 static System::String ^ GetTypeLibName(System::Runtime::InteropServices::ComTypes::ITypeLib ^ typelib);
public static string GetTypeLibName (System.Runtime.InteropServices.ComTypes.ITypeLib typelib);
[System.Security.SecurityCritical]
public static string GetTypeLibName (System.Runtime.InteropServices.ComTypes.ITypeLib typelib);
static member GetTypeLibName : System.Runtime.InteropServices.ComTypes.ITypeLib -> string
[<System.Security.SecurityCritical>]
static member GetTypeLibName : System.Runtime.InteropServices.ComTypes.ITypeLib -> string
Public Shared Function GetTypeLibName (typelib As ITypeLib) As String

Parameters

typelib
ITypeLib

The type library whose name is to be retrieved.

Returns

The name of the type library that the typelib parameter points to.

Attributes

Exceptions

The typelib parameter is null.

Remarks

The name returned by this method is the identifier used with the library statement, such as ADODB for the Microsoft ADO type library. The name is not a file name.

You can also retrieve the type library name by calling the UCOMITypeInfo.GetDocumentation method and passing -1 for its first parameter.

See also

Applies to

GetTypeLibName(UCOMITypeLib)

Caution

Use System.Runtime.InteropServices.Marshal.GetTypeLibName(ITypeLib pTLB) instead. http://go.microsoft.com/fwlink/?linkid=14202&ID=0000011.

Retrieves the name of a type library.

public:
 static System::String ^ GetTypeLibName(System::Runtime::InteropServices::UCOMITypeLib ^ pTLB);
public static string GetTypeLibName (System.Runtime.InteropServices.UCOMITypeLib pTLB);
[System.Obsolete("Use System.Runtime.InteropServices.Marshal.GetTypeLibName(ITypeLib pTLB) instead. http://go.microsoft.com/fwlink/?linkid=14202&ID=0000011.", false)]
public static string GetTypeLibName (System.Runtime.InteropServices.UCOMITypeLib pTLB);
[System.Obsolete("Use System.Runtime.InteropServices.Marshal.GetTypeLibName(ITypeLib pTLB) instead. http://go.microsoft.com/fwlink/?linkid=14202&ID=0000011.", false)]
[System.Security.SecurityCritical]
public static string GetTypeLibName (System.Runtime.InteropServices.UCOMITypeLib pTLB);
static member GetTypeLibName : System.Runtime.InteropServices.UCOMITypeLib -> string
[<System.Obsolete("Use System.Runtime.InteropServices.Marshal.GetTypeLibName(ITypeLib pTLB) instead. http://go.microsoft.com/fwlink/?linkid=14202&ID=0000011.", false)>]
static member GetTypeLibName : System.Runtime.InteropServices.UCOMITypeLib -> string
[<System.Obsolete("Use System.Runtime.InteropServices.Marshal.GetTypeLibName(ITypeLib pTLB) instead. http://go.microsoft.com/fwlink/?linkid=14202&ID=0000011.", false)>]
[<System.Security.SecurityCritical>]
static member GetTypeLibName : System.Runtime.InteropServices.UCOMITypeLib -> string
Public Shared Function GetTypeLibName (pTLB As UCOMITypeLib) As String

Parameters

pTLB
UCOMITypeLib

The type library whose name is to be retrieved.

Returns

The name of the type library that the pTLB parameter points to.

Attributes

Remarks

The name returned by this method is the identifier used with the library statement, such as ADODB for the Microsoft ADO type library. The name is not a file name.

You can also retrieve the type library name by calling the UCOMITypeInfo.GetDocumentation method and passing -1 for its first parameter.

See also

Applies to