rt 3ks

解决方案 »

  1.   

    //Get Window Directory
    GetWindowsDirectory(m_syspath,MAX_PATH);
      

  2.   

    GetSystemDirectory
    The GetSystemDirectory function retrieves the path of the system directory. The system directory contains such files as dynamic-link libraries, drivers, and font files. UINT GetSystemDirectory(
      LPTSTR lpBuffer,  // address of buffer for system directory
      UINT uSize        // size of directory buffer
    );
     
    Parameters
    lpBuffer 
    Pointer to the buffer to receive the null-terminated string containing the path. This path does not end with a backslash unless the system directory is the root directory. For example, if the system directory is named WINDOWS\SYSTEM on drive C, the path of the system directory retrieved by this function is C:\WINDOWS\SYSTEM. 
    uSize 
    Specifies the maximum size of the buffer, in characters. This value should be set to at least MAX_PATH. 
      

  3.   

    UINT GetWindowsDirectory(
      LPTSTR lpBuffer,  // buffer for Windows directory
      UINT uSize        // size of directory buffer
    );
    ===========================================================
    我要学好C++啊 \(-o-)/
    ===========================================================
      

  4.   

    直接用WIN API:GetSystemDirectory(str,num);
      str :接受字符串,结果为:C:\WINDOWS\SYSTEM
      

  5.   

    楼上的是得到系统目录就是如C:\winnt\system32,而前面说的才是如c:\winnt