[ vlstefanovic @ 24.06.2003. 23:01 ] @
Znam ponesto o programiranju u win-u, a sada sam pokusao nesto i sa COM programiranjem.Konkretno: ukljucio sam heder shlobj.h i definisao jednu promenljivu
kao interfejs IActiveDesktop a pri kompajliranju dobijam gresku
" error C2065: 'IActiveDesktop' : undeclared identifier ".Ne znam u cemu je problem (koristim MFC).
[ Dragi Tata @ 24.06.2003. 23:08 ] @
Proveri da li u tvom shlobj.h postoji linija

DECLARE_INTERFACE_( IActiveDesktop, IUnknown )

Ako je nema, verovatno imaš zastarelu verziju SDK.
[ vlstefanovic @ 25.06.2003. 14:51 ] @
Ima.Zanimljivo je i to sto pri pisanju koda "Studio" prepoznaje IActiveDesktop kao interfejs, ali pri kompajliranju ne?
[ Dragi Tata @ 25.06.2003. 18:23 ] @
Hmmm, a da nije pod nekim #ifdef-om? Koliko vidim, za ovaj interfejs piše:

Windows NT/2000: Requires Windows 2000 (or Windows NT 4.0 with Internet Explorer 4.0 or later).
Windows 95/98/Me: Requires Windows 98 (or Windows 95 with Internet Explorer 4.0 or later).

To u praksi znači da moraš da definišeš neki od makroa za te verzije.

Koliko vidim na prvi pogled, IActiveDesktop je "uokviren" sa

#if (_WIN32_IE >= 0x400)


Probaj da staviš pre #include linije
#define _WIN32_IE 0x400


Više o tome na:

http://www.codeproject.com/cpp/cppforumfaq.asp#cl_apis

"If you have downloaded the latest header files and are still getting compiler errors, read on.

The Windows header files can be used to build programs for any version of Windows starting with Windows 95 and NT 3.51. Since not all APIs are present in all versions of Windows, there is a system that prevents you from using APIs that aren't available in the Windows version you are targeting.

This system uses preprocessor symbols to selectively include API prototypes. The symbols are:

WINVER: Windows version (applies to 9x/Me and NT)
_WIN32_WINDOWS: Windows 9x/Me version
_WIN32_WINNT: Windows NT version
_WIN32_IE: Common controls version
By default, you can only use functions in Windows 95, NT 3.51, and pre-IE3 common controls. To use APIs introduced in later versions of Windows or the common controls, you need to #define the above symbols correctly before including any Windows headers.
"
[ vlstefanovic @ 25.06.2003. 23:56 ] @
Nasao sam.Greska je dokumentovana u MSDN-u (Q196342) pod imenom:
"ActiveDesktop Compilation Errors Under Visual C++ 6.0 MFC"
Koji sam ja baksuz da uzmem i MFC i bas taj interfejs.
[ kviz00 @ 26.06.2003. 01:39 ] @
Hvala :)