请问获取WINDOWS系统目录的API是什么
在XP下他获得是 c:\windows
但是在win2003 下他变成 C:\Documents and Settings\Administrator\Windows\
他调用的到底是哪一句API啊?
获取c:\windows我知道
问题点数:20、回复次数:4Top
1 楼romalio(阳春)回复于 2005-02-24 10:43:43 得分 10
是不是这个
char szPath[256]={0};
GetSystemDirectory(szPath,256);Top
2 楼spwnihao(╭∩╮(︶⌒︶)╭∩╮鄙视一切)回复于 2005-02-24 10:54:21 得分 5
The GetSystemWindowsDirectory function retrieves the path of the shared Windows directory on a multiuser system.
UINT GetSystemWindowsDirectory(
LPTSTR lpBuffer, // buffer to receive directory name
UINT uSize // size of name buffer
);
Top
3 楼mrxwh(大徐)回复于 2005-02-24 16:16:05 得分 4
UINT GetSystemWindowsDirectory(
LPTSTR lpBuffer, // buffer to receive directory name
UINT uSize // size of name buffer
);
接到后,需要进行判断缓冲区是否足够长,UINT的结果表示需要的长度,如果超常,需要按照新的长度进行重新读取。Top
4 楼smallcrocodile(大鳄鱼)回复于 2005-02-24 17:46:53 得分 1
GetSystemDirectory()就可以Top




