• 0

Function to check if


Question

4 answers to this question

Recommended Posts

  • 0
DWORD dwAtt = GetFileAttributes( lpzFileName );
	if (dwAtt == INVALID_FILE_ATTRIBUTES)
  ::MessageBox(hwnd, "File/Directory does not exist", "Exists?", MB_OK | MB_ICONINFORMATION);
	else if ( (dwAtt & FILE_ATTRIBUTE_DIRECTORY) )
  ::MessageBox(hwnd, "Directory exists", "Exists?", MB_OK | MB_ICONINFORMATION);
	else
  ::MessageBox(hwnd, "File Exists", "Exists?", MB_OK | MB_ICONINFORMATION);

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.