Home | Info | Community | Development | myReactOS | Contact Us
Definition at line 79 of file kernel.c.
Referenced by GetDeviceCapabilities(), GetDeviceCount(), and OpenDevice().
{ MMRESULT result; WCHAR device_name[MAX_DEVICE_NAME_LENGTH]; DWORD open_flags = 0; ASSERT(handle); /* Glue the base device name and the ID together */ result = CobbleDeviceName(device_type, device_id, device_name); DPRINT("Opening kernel device %ls\n", device_name); if ( result != MMSYSERR_NOERROR ) return result; /* We want overlapped I/O when writing */ if ( access != GENERIC_READ ) open_flags = FILE_FLAG_OVERLAPPED; /* Now try opening... */ *handle = CreateFile(device_name, access, FILE_SHARE_WRITE, NULL, OPEN_EXISTING, open_flags, NULL); if ( *handle == INVALID_HANDLE_VALUE ) return ErrorToMmResult(GetLastError()); return MMSYSERR_NOERROR; }