I'm trying to use Common Item Dialog on Windows 7 using PellesC 6.5 RC3.
The code can be found in: http://msdn.microsoft.com/en-us/library/bb776913(v=vs.85).aspx (http://msdn.microsoft.com/en-us/library/bb776913(v=vs.85).aspx)
("Basic Usage" paragraph)
(Source code is attached)
When compiled, it gives me this error:
Type error in argument 1 to 'CoCreateInstance'; expected 'LPCGUID const' but found 'GUID'.
There is some other errors regarding accessing the class methods, I think I can fix them. But now I'm concerned about this error only.
Any help will be really appreciated.
Try the attached - I don't have vista so can't test.
Had to add uuid.lib and ole32.lib to the build.
John
QuoteHad to add uuid.lib and ole32.lib to the build
You're right, but still there is something missing.
A call to CoInitializeEx() must be done before calling CoCreateInstance(). After I added that, it worked perfectly.
So, you put me in the right direction.
Thank you very much, John.
(The final working project is attached)