CreateFile MSDN 번역
파일을 생성하거나 기존파일이나 I/O 디바이스를 열기 위한 win32표준 함수 I/0 디바이스 : file, file stream, directory, physical disk, volume, console buffer, tape drive, communications resource, mailslot, pipe HANDLE WINAPI CreateFile( LPCTSTR lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile ); lpFileNam..
2014. 9. 2.
파일 핸들에 대한 접근 경로 얻기
BOOL GetFileNameFromHandle(HANDLE hFile, WCHAR* lpwPath, DWORD ccSize) { BOOL bRet = FALSE; HANDLE hFileMap; DWORD dwFileSizeHi = 0; WCHAR ntName[1024] = {0,}; hFileMap = CreateFileMapping(hFile, NULL, PAGE_READONLY, 0, 1, NULL); if(!hFileMap) goto $cleanup; PVOID pMem = NULL; MAPVIEWOFFILE_(pMem, hFileMap, FILE_MAP_READ, 0, 0, 1); if(!pMem) goto $cleanup; if(!GetMappedFileNameW (GetCurrentProce..
2014. 8. 13.