CFRunLoopRun
-
I have a custom made device that I'm plugging into the
USB port. I am using CFRunLoopRun() to get info about
the device. I do get the info from the device, but
then I immediately drop out of the loop. Accoring to
Apple's documentation, this should never happen. The
CFRunLoopRun() can only be exited with a
CFRunLoopStop().
Has anyone had any experience with this?
__________________________________
Do you Yahoo!?
Yahoo! Mail - You care about security. So do we.
http://promotions.yahoo.com/new_mail -
On Mar 27, 2005, at 1:52 AM, Ian was here wrote:
> I have a custom made device that I'm plugging into the
> USB port. I am using CFRunLoopRun() to get info about
> the device. I do get the info from the device, but
> then I immediately drop out of the loop. Accoring to
> Apple's documentation, this should never happen. The
> CFRunLoopRun() can only be exited with a
> CFRunLoopStop().
>
> Has anyone had any experience with this?
>
>
You need to add a source to the run loop for it to monitor, or else it
will exit. I would guess that once you get your info, that source is
being removed from the run loop, so now the run loop has nothing else
to monitor and stops. You can probably stop that by adding the source
back to the the run loop whenever you get device information from it.
Darkshadow (aka Michael Nickerson) -
OK, I got the CFRunLoopRun to function properly. I
based my code on the USBPrivateDataSample code, which
has proven to be very helpful. Reading data from a
device is successful. One question though; how to
write data back to the device?
--- Darkshadow <darkshadow02...> wrote:
>
> On Mar 27, 2005, at 1:52 AM, Ian was here wrote:
>
>> I have a custom made device that I'm plugging into
> the
>> USB port. I am using CFRunLoopRun() to get info
> about
>> the device. I do get the info from the device, but
>> then I immediately drop out of the loop. Accoring
> to
>> Apple's documentation, this should never happen.
> The
>> CFRunLoopRun() can only be exited with a
>> CFRunLoopStop().
>>
>> Has anyone had any experience with this?
>>
>>
>
> You need to add a source to the run loop for it to
> monitor, or else it
> will exit. I would guess that once you get your
> info, that source is
> being removed from the run loop, so now the run loop
> has nothing else
> to monitor and stops. You can probably stop that by
> adding the source
> back to the the run loop whenever you get device
> information from it.
>
> Darkshadow (aka Michael Nickerson)
>
>
__________________________________
Do you Yahoo!?
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/



