MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / open_device

Function open_device

lib/hidapi/windows/hid.c:330–345  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

328}
329
330static HANDLE open_device(const wchar_t *path, BOOL open_rw)
331{
332 HANDLE handle;
333 DWORD desired_access = (open_rw)? (GENERIC_WRITE | GENERIC_READ): 0;
334 DWORD share_mode = FILE_SHARE_READ|FILE_SHARE_WRITE;
335
336 handle = CreateFileW(path,
337 desired_access,
338 share_mode,
339 NULL,
340 OPEN_EXISTING,
341 FILE_FLAG_OVERLAPPED,/*FILE_ATTRIBUTE_NORMAL,*/
342 0);
343
344 return handle;
345}
346
347HID_API_EXPORT const struct hid_api_version* HID_API_CALL hid_version(void)
348{

Callers 1

hid.cFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected