错误信息如下:
--------------------Configuration: sportpro - Win32 Debug-----------------
Compiling...
sportproDlg.cpp
G:\mydir\sport\sportpro\sportproDlg.cpp(137) : error C2065: 'CSIDL_SYSTEM' :
 undeclared identifier
Error executing cl.exe.
sportpro.exe - 1 error(s), 0 warning(s)相关代码:
        SHGetSpecialFolderPath(NULL,strPath,CSIDL_SYSTEM,FALSE);如果CSIDL_SYSTEM换成CSIDL_PROGRAMS又不会出现错误,我用的系统是2k server
查MSDN发现:
CSIDL_SYSTEM
Version 5.0. System folder. A typical path is C:\WINNT\SYSTEM32.
~~~~~~~~~~~~这里是否表示这个Value只在V5.0的对应Dll中才有?在2k下怎样才能用它?CSIDL_PROGRAMS
File system directory that contains the user's program groups (which are als
o file system directories). A typical path is C:\Documents and Settings\user
name\Start Menu\Programs.

解决方案 »

  1.   

    In order to access Win2000 specific APIs etc, one needs the following #define in the application's stdafx.h (before any other #includes) 
    #define _WIN32_WINNT 0x0500
      

  2.   

    thank masterz for u access this forum, i'am honoured with this.to housemaster, masterz was put the axe in the helve.
      

  3.   

    After adding  this #define _WIN32_WINNT 0x0500,the problem is still
    the same. But now I have found where the problem is:I forgot the include file #include "shfolder.h",and this include file is not included in my vc6,so I have to download the latest win32 sdk pack.
      

  4.   

    u r wise, good luck