[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Alternative to CancelIo under Win95

Posted on 1998-02-23
6
Medium Priority
?
318 Views
Last Modified: 2013-12-03
I have built a DLL that can be used for serial communications under NT4 and I want to use it under Win95 also.

If I call to CancelIo() anywhere in the code, the DLL fails to load under Windows 95 (GetLastError returns 31). It works fine under NT4.

The Visual C++ 5.0 help states that this function is not supported under Windows 95 (even though it compiles and links).

Are there any alternative ways to cancel any previous asynchronous Read() and Write() calls under 95?


Thanks,


Jamie Robb
Senior Software Analyst
C-C-C Technology Ltd
0
Comment
Question by:JamieR
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 32

Accepted Solution

by:
jhance earned 480 total points
ID: 1411468
Take a look at the PurgeComm() function.
0
 
LVL 1

Author Comment

by:JamieR
ID: 1411469
I really need to be able to cancel IO operations on a per thread basis. Purge cancels all operations on the port.

Jamie
0
 
LVL 32

Expert Comment

by:jhance
ID: 1411470
Well, in that case, close the handle to the device you have open.  If the thread opened the device in non-overlapped mode, kill the thread first.
0
Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

 
LVL 1

Author Comment

by:JamieR
ID: 1411471
Again, good answer but the point of the DLL is to let multiple clients access the port. I am using CancelIo to end the asynchronous operations for a particular client before it terminates. There may be other clients available so I can't close the port - if I did I would lose any buffered data.

(This has to be one of the hardest pieces of code I've ever written!)

Jamie
0
 
LVL 32

Expert Comment

by:jhance
ID: 1411472
Hmmmm, in that case I'm out of ideas.  Sorry.
0
 
LVL 1

Author Comment

by:JamieR
ID: 1411473
Wait a mo. The help keeps talking about IO calls on a thread basis when it seems (from trial and error)  that only one thread can start an overlapped operation when a previous operation has completed. If each thread could do it's own read I wouldn't have any of these problems. Any ideas?
0

Featured Post

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have ever found yourself doing a repetitive action with the mouse and keyboard, and if you have even a little programming experience, there is a good chance that you can use a text editor to whip together a sort of macro to automate the proce…
zlib is a free compression library (a DLL) on which the popular gzip utility is built.  In this article, we'll see how to use the zlib functions to compress and decompress data in memory; that is, without needing to use a temporary file.  We'll be c…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question