nick@aimed.UUCP (Nick Pemberton) (04/10/91)
Greetings all. I have a wierd problem that I can't seem to find any reference to in the SDK docs. Since I am new to windows programming, this probably doesn't deserve to be in the docs, so... I have written a DLL that provides simple read/write/execute functions for windows applications to a remote PICK based machine. It uses the serial ports to communicate, and uses the standard windows serial routines, which I presume live in COMM.DRV. I have a prototype of the application working, or at least thought I did. I developed and tested this on my machine, which is a reasonably loaded 386 box, and is thus running in enhanced mode. The DLL works just fine on that box. I had then moved it onto a 286 running in standard mode, and thats where the trouble showed up. I then ran the 386 in standard mode and got the same trouble. The problem is that in the WEP exit routine for the DLL, in standard mode, the code crashed the system (in rather dramatic style too... not the usual application error - machine just goes blank and hangs). I started trying to isolate the code that caused this and found that a final call to WriteComm() is the culprit. I have some code that signals the remote PICK machine that the PC application (and therefore the link) is shutting down. After checking some local variables, all it has to do is a single call to WriteComm(). I have checked all variables and memory validity, etc using Codeview, and I just can't find any difference that would cause this crash. Any ideas? Thanks, Nick