Marshal.GetTypeLibGuid Method

Definition

Retrieves the library identifier (LIBID) of a type library.

Overloads

GetTypeLibGuid(ITypeLib)

Retrieves the library identifier (LIBID) of a type library.

GetTypeLibGuid(UCOMITypeLib)
Obsolete.

Retrieves the library identifier (LIBID) of a type library.

GetTypeLibGuid(ITypeLib)

Retrieves the library identifier (LIBID) of a type library.

C#
public static Guid GetTypeLibGuid(System.Runtime.InteropServices.ComTypes.ITypeLib typelib);
C#
[System.Security.SecurityCritical]
public static Guid GetTypeLibGuid(System.Runtime.InteropServices.ComTypes.ITypeLib typelib);

Parameters

typelib
ITypeLib

The type library whose LIBID is to be retrieved.

Returns

The LIBID of the specified type library.

Attributes

Remarks

GetTypeLibGuid extracts the LIBID directly from an existing type library. This action differs from that of the Marshal.GetTypeLibGuidForAssembly method, which calculates what the LIBID should be based on the current assembly.

For more information about library identifiers, see Exported Assembly Conversion.

See also

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

GetTypeLibGuid(UCOMITypeLib)

Caution

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

Retrieves the library identifier (LIBID) of a type library.

C#
public static Guid GetTypeLibGuid(System.Runtime.InteropServices.UCOMITypeLib pTLB);
C#
[System.Obsolete("Use System.Runtime.InteropServices.Marshal.GetTypeLibGuid(ITypeLib pTLB) instead. http://go.microsoft.com/fwlink/?linkid=14202&ID=0000011.", false)]
public static Guid GetTypeLibGuid(System.Runtime.InteropServices.UCOMITypeLib pTLB);
C#
[System.Obsolete("Use System.Runtime.InteropServices.Marshal.GetTypeLibGuid(ITypeLib pTLB) instead. http://go.microsoft.com/fwlink/?linkid=14202&ID=0000011.", false)]
[System.Security.SecurityCritical]
public static Guid GetTypeLibGuid(System.Runtime.InteropServices.UCOMITypeLib pTLB);

Parameters

pTLB
UCOMITypeLib

The type library whose LIBID is to be retrieved.

Returns

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

Attributes

Remarks

GetTypeLibGuid extracts the LIBID directly from an existing type library. This action differs from that of the Marshal.GetTypeLibGuidForAssembly method, which calculates what the LIBID should be based on the current assembly.

For more information about library identifiers, see Exported Assembly Conversion.

See also

Applies to

.NET Framework 4.8.1 and other versions
Product Versions (Obsolete)
.NET Framework 1.1 (2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1)