MCPcopy Create free account
hub / github.com/OpenZWave/open-zwave / open_device

Function open_device

cpp/hidapi/windows/hid.cpp:210–227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

208#endif
209
210static HANDLE open_device(const char *path, BOOL enumerate)
211{
212 HANDLE handle;
213 DWORD desired_access = (enumerate)? 0: (GENERIC_WRITE | GENERIC_READ);
214 DWORD share_mode = (enumerate)?
215 FILE_SHARE_READ|FILE_SHARE_WRITE:
216 FILE_SHARE_READ;
217
218 handle = CreateFileA(path,
219 desired_access,
220 share_mode,
221 NULL,
222 OPEN_EXISTING,
223 FILE_FLAG_OVERLAPPED,/*FILE_ATTRIBUTE_NORMAL,*/
224 0);
225
226 return handle;
227}
228
229int HID_API_EXPORT hid_init(void)
230{

Callers 2

hid_enumerateFunction · 0.85
hid_open_pathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected