HANDLE hFile = CreateFile(fileName.c_str(), FILE_ALL_ACCESS, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
if (hFile == INVALID_HANDLE_VALUE)
{
/*if ( ERROR_ACCESS_DENIED == GetLastError())
{*/ 占用
CloseHandle(hFile);
return true;
//}
}
CloseHandle(hFile);