got_string = CFStringGetCString(entry_as_string,
result, result_len,
kCFStringEncodingASCII);
-
+
CFRelease(entry_as_string);
if (got_string)
return 1;
{
CFTypeRef entry_as_number;
Boolean got_number;
-
+
entry_as_number = IORegistryEntrySearchCFProperty (object,
kIOServicePlane,
entry,
object = IOIteratorNext(list->iterator);
if (!object)
return 0;
-
+
if (!get_number (object, CFSTR(kUSBVendorID), &device->vendor) ||
!get_number (object, CFSTR(kUSBProductID), &device->product))
continue;
if (log) {
SYSTEMTIME time;
GetLocalTime(&time);
- fprintf (log, "%4d-%02d-%02d %2d:%02d:%02d. ",
+ fprintf (log, "%4d-%02d-%02d %2d:%02d:%02d. ",
time.wYear, time.wMonth, time.wDay,
time.wHour, time.wMinute, time.wSecond);
va_start(a, fmt);
altos_set_last_windows_error();
Sleep(100);
}
-
+
if (file->handle == INVALID_HANDLE_VALUE) {
free(file);
return NULL;