Subj : Re: Using CancelIo in BC++ 5 To : borland.public.cpp.borlandcpp From : "Tim Jackson" Date : Wed Aug 06 2003 11:28 pm Interesting. BC's winbase.h includes "CancelIo" as you wrote it, and that seems to link OK in my copy of BC5.02, but the Windows API docs calls it "CancelIO", which does not exist in the .h and gives an 'undefined' error. Looks like a typo. I don't know why you are having trouble with PurgeComm, it worked OK for me last time I used - it to flush (overlapped/async) reads on an RS232 port whenever a corrupt record was read. Are you reading from a comms device? What error code are you getting from GetlLastError? Tim Jackson "John W" wrote in message news:3f31642f$1@newsgroups.borland.com... > > I'm using BC++ 5.02 and want to use CancelIo to abort pending > async reads on a messaging queue. CancelIo is is located in > kernel32.dll and defined in winbase.h in the Visual Studio set > of include files. BC's winbase.h, however, does not include it. > > I tried copying its definition from the MS SDK files and > recreating what I thought was the correct lib file, but the > linker still can't find CancelIo and reports it as an > unresolved external. > > I also tried PurgeComm, which is defined in BC's winbase.h, as > a substitute, but it returns with a "failed" code. > > Any ideas? .