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 );
UINT GetSystemWindowsDirectory( LPTSTR lpBuffer, // buffer to receive directory name UINT uSize // size of name buffer ); 接到后,需要进行判断缓冲区是否足够长,UINT的结果表示需要的长度,如果超常,需要按照新的长度进行重新读取。
char szPath[256]={0};
GetSystemDirectory(szPath,256);
LPTSTR lpBuffer, // buffer to receive directory name
UINT uSize // size of name buffer
);
LPTSTR lpBuffer, // buffer to receive directory name
UINT uSize // size of name buffer
);
接到后,需要进行判断缓冲区是否足够长,UINT的结果表示需要的长度,如果超常,需要按照新的长度进行重新读取。