ed@odi.com (Ed Schwalenberg) (03/21/91)
I'm trying to write a Windows program that uses the PCNFS toolkit to talk RPC to Sun hosts. Since the PCNFS libraries don't have Windows prolog/epilog code, I have to run them under DOS. So I have a DOS TSR, callable via INT 2F, which implements all the calls I need. I have a DOS user program that calls the functions in the TSR, and it works fine. I have a Windows user program that calls the same functions, through a DLL that copies all the arguments into a chunk of memory that's been GlobalDOSAlloc'd, so that the real-mode TSR can get them. The program does a gethostbyname, a getprotobyname, a socket, and a connect, all of which work as expected. (This confirms that I'm successfully passing data back and forth between protected mode Windows and the real-mode TSR.) The next call does a read on the socket, which works fine from a DOS program but returns an error from the Windows program. I put some debugging code in the TSR and observed that in both cases, the arguments to the sequence of functions and particularly to the read INT 21 are the same. The PSP is the same throughout the set of calls. I've tried doing the read both from Windows and from inside the TSR, with identical results. I'm stumped. Short of single-stepping through the INT 21 handler, I don't know how to proceed. Any suggestions? (Suggestions about other vendors which might have socket libraries that run under Windows would be appreciated as well.)