ComImport in C#, how do you find GUID for classes like IFileDialog in shell32.dll?
问题 I've been trying to setup some interop with some win32 classes in various dlls using ComImport for a C# application I'm writing. What I don't understand is how you find the GUID for a class? I found some examples of imports that work but I'm not sure how the authors found the GUID for the classes. An example of importing IFileDialog and one of its methods is listed below. [ComImport(), Guid("42F85136-DB7E-439C-85F1-E4075D135FC8"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] internal