如何获取文件路径而不是当前项目所在的文件夹的路径
我做了一个Windows forms 程序
如何获取文件的绝对路径而不是当前项目所在的文件夹的路径
声明:不是通过OpenFileDialog控件获得
求高手解答
------解决方案--------------------
用windows API:
WIN32_FIND_DATA
The WIN32_FIND_DATA structure describes a file found by the FindFirstFile, FindFirstFileEx, or FindNextFile function.
typedef struct _WIN32_FIND_DATA { DWORD dwFileAttributes; FILETIME ftCreationTime; FILETIME ftLastAccessTime; FILETIME ftLastWriteTime; DWORD nFileSizeHigh; DWORD nFileSizeLow; DWORD dwReserved0; DWORD dwReserved1; TCHAR cFileName[MAX_PATH]; TCHAR cAlternateFileName[14];
} WIN32_FIND_DATA, *PWIN32_FIND_DATA;