Retrieves the library identifier (LIBID) of a type library.
[Visual Basic] Public Shared Function GetTypeLibGuid( _ ByVal pTLB As UCOMITypeLib _ ) As Guid [C#] public static Guid GetTypeLibGuid( UCOMITypeLib pTLB ); [C++] public: static Guid GetTypeLibGuid( UCOMITypeLib* pTLB ); [JScript] public static function GetTypeLibGuid( pTLB : UCOMITypeLib ) : Guid;
- A UCOMITypeLib that represents an ITypeLib pointer.
The LIBID (that is, the Guid) of the type library pointed to by the pTLB parameter.
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 additional information about ITypeLib, see the MSDN Library.
Note This method uses SecurityAction.LinkDemand to prevent it from being called from untrusted code; only the immediate caller is required to have SecurityPermissionAttribute.UnmanagedCode permission. If your code can be called from partially trusted code, do not pass user input to Marshal class methods without validation. For important limitations on using the LinkDemand member, see Demand vs. LinkDemand.
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
.NET Framework Security:
- SecurityPermission for operating with unmanaged code. Associated enumeration: SecurityPermissionFlag.UnmanagedCode.