I need the GUID for IShellItem
. I've actually found it on pinvoke, but would like to confirm that from an official MSDN page. Unfortunately, the IShellItem page doesn't seem to include that information. So how do I get this (and other GUID's)?
(And do I have to declare it explicitly, or is there a way to import it?)
GUIDs are rarely documented in MSDN, they are subject to change. A hard requirement in COM.
You can always find them back in the Windows SDK, either an .h file or the IDL file that Microsoft used to build their own code. The MSDN article tells you where to look, note how it mentions Shobjidl.h at the bottom of the article. Where you'll find:
MIDL_INTERFACE("43826d1e-e718-42ee-bc55-a1e261c37bfe")
IShellItem : public IUnknown
{
// etc..
}
Fwiw, this file was auto-generated from Shobjidl.idl, the more readable version of it and also included in the SDK. That is not always the case btw.