谢谢了!
字符串!

解决方案 »

  1.   

    GetCurrentDirectoryThe GetCurrentDirectory function retrieves the current directory for the current process.
    DWORD GetCurrentDirectory(
      DWORD nBufferLength,
      LPTSTR lpBuffer
    );
      

  2.   

    CString   m_strPath;   
      GetModuleFileName(NULL,m_strPath.GetBufferSetLength(MAX_PATH+1),MAX_PATH);   
      m_strPath.ReleaseBuffer();
      

  3.   

    CString sPath;
    GetModuleFileName(NULL,sPath.GetBufferSetLength(MAX_PATH+1),MAX_PATH);
    sPath.ReleaseBuffer();
    int nPos=sPath.ReverseFind ('\\');
    sPath=sPath.Left(nPos);
    return _T(sPath);但这样得到的路径如果含有中文,在一些应用中会出错啊!
    大家有同样的经历吗?该如何解决呢?
      

  4.   

    我就是用GetModuleFileName的方法。 从来没有出过错。
      

  5.   

    操作odbc+access,好像有点问题