Note that there are some explanatory texts on larger screens.

plurals
  1. USRichard Baxter
    primarykey
    data
    text
    plurals
    1. This table or related slice is empty.
    1. COI spoke to an old colleague who is experienced in writing USB code, he gave me some direction. The code I mention above occurs in callback from the USB device whenever new data is received, what appears to be happening is that the comparison is genuinely failing, but by the time the breakpoint has been hit and the values displayed in the debugger a second callback has fired which is modifying the currentRequest variable so the debugger displays the changed value, not the comparison value. This was proven by writing the values of the two variables to the console. Thanks everyone who replied!
      singulars
    2. COAs you rightly pointed out dictionaryWithObjects is an autoreleased object, so you do need to retain it, otherwise it will be released automatically (hence the autorelease) sometime in a subsequent run loop (unless it's not in the main thread in which case your code will need to manage an autorelease pool). The alloc/init combination you replaced it with inherrently does a retain so does not need subsequently retaining. Btw, if you just intend to call alloc/init you can just call [NSMutableDictionary new] instead (which also does an inherrent retain).
      singulars
    3. COThis indeed seems to be the problem. If I check last error I get the code 0x6f8, the supplied buffer is not valid for the requested operation. The size of the buffer being passed is indeed 28 bytes, if I fix the error in the sample code so that the reserved value is declared as long as per the win32 definition (rather than int) this fixes the size and the sample code executes, well at least until it falls over on the next call - so need to figure that out now. Thanks for your help.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload