I'm fiddling with COM and as a first program I thought I'd have a fiddle with IActiveDesktop. According to MSDN I need to include shlobj.h, which I do, but this code fails to compile:
(I was looking at IShellLink too).
using namespace std;
int main(int argc, char *argv)
HRESULT hr = 0;
hr = CoCreateInstance(CLSID_ShellLink,
NULL, // no aggregation
(void **) &pISL);
cout << "Error creating COM object [" << hr << "]" << endl;
Am I missing something here? If I right click IActiveDesktop and "Go to definition" it takes me to shlobj.h so I know it's there.
c:\Documents and Settings\lee\Desktop\COMStuff\COMStuff.cpp(12) : error C2065: 'IActiveDesktop' : undeclared identifier
c:\Documents and Settings\lee\Desktop\COMStuff\COMStuff.cpp(12) : error C2065: 'pIAD' : undeclared identifier