IVsLibrary2.GetGuid Method

Returns a pointer to the GUID of the library.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop.8.0 (in Microsoft.VisualStudio.Shell.Interop.8.0.dll)

int GetGuid(
	out IntPtr ppguidLib


Type: System.IntPtr
[out] Pointer to the GUID of the current library.

Return Value

Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

COM Signature

From vsshell80.idl:

HRESULT GetGuid([out] const GUID **ppguidLib);

This method returns the GUID identifying the current library. Put the library GUID into the code that implements this method. This GUID should be unique to the library.


This method returns a pointer to the GUID, not a copy of the GUID, so the memory the GUID occupies must exist for the life of the library.

Community Additions