Removed reserved COM and LPT check.
@@ -993,49 +993,6 @@ BOOL WaitCommEvent(HANDLE hFile, PDWORD lpEvtMask, LPOVERLAPPED lpOverlapped)
return FALSE;
}
-
-/* Extended API */
-
-static BOOL _IsReservedCommDeviceName(LPCTSTR lpName)
-{
- int i;
-
- if (!CommInitialized())
- return FALSE;
-
- /* Serial ports, COM1-9 */
- for (i = 1; i < 10; i++)
- {
- TCHAR genericName[5];
-
- if (_stprintf_s(genericName, 5, _T("COM%d"), i) < 0)
- {
- return FALSE;
- }
-
- if (_tcscmp(genericName, lpName) == 0)
- return TRUE;
- }
-
- /* Parallel ports, LPT1-9 */
- for (i = 1; i < 10; i++)
- {
- TCHAR genericName[5];
-
- if (_stprintf_s(genericName, 5, _T("LPT%d"), i) < 0)
- {
- return FALSE;
- }
-
- if (_tcscmp(genericName, lpName) == 0)
- return TRUE;
- }
-
- /* FIXME: what about PRN ? */
- return FALSE;
-}
-
-
/**
* Returns TRUE on success, FALSE otherwise. To get extended error
* information, call GetLastError.
@@ -1063,15 +1020,6 @@ BOOL DefineCommDevice(/* DWORD dwFlags,*/ LPCTSTR lpDeviceName,
goto error_handle;
}
- if (_tcsncmp(lpDeviceName, _T("\\\\.\\"), 4) != 0)
- {
- if (_IsReservedCommDeviceName(lpDeviceName))
- {
- SetLastError(ERROR_INVALID_DATA);
- goto error_handle;
- }
- }
-
storedDeviceName = _tcsdup(lpDeviceName);
if (storedDeviceName == NULL)
