|
-
Mar 20th, 2010, 12:12 PM
#1
Fanatic Member
Re: Asynchronous Open and Close of COM port
Originally Posted by IanS
So, in theory, one could use that sample code to do practically 'anything' on an async basis.
 Originally Posted by Dave Sell
Yes!
This sounds interesting. I don't have a slow port ready to test so I thought of some 'other' api call I could test this with. Sleep() should do it. So I added the declaration for the API Sleep() function.
So, calling Sleep(10000) instead of CreateFile would make the application hang for 10 seconds - but, according to you, the main form should remain responsive while we're waiting for the API call to return.
But it doesn't, the call makes everything hang for 10 seconds.
Maybe Sleep isn't a good one to test this with - can you think of some other slow api call we could use to test this ?
Last edited by IanS; Mar 20th, 2010 at 12:15 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|