Date: Sun, 21 Sep 1997 18:37:44 -0400 (EDT) From: Laszlo Vecsey To: dwi AT netc DOT com cc: djgpp AT delorie DOT com Subject: Re: Win98 wsock.vxd (libsocket, WSock) In-Reply-To: <199709211256.IAA27205@delorie.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Sun, 21 Sep 1997, Chad Catlett wrote: > From: Laszlo Vecsey > > >Has anyone gotten the WSock classes or libsocket-0.4 to work with > >Win98? I've had a fair amount of success with stock Win95, but Win98 > >just chokes on the executables. - lv > > i have never used libsock-0.4. but wsock i have. the reason that > wsock will not work is that it goes thru the winsock vxd file instead > of thru the dll, this meaning that the offsets for functions could > change with a new version. if i remember correctly win98 uses winsock > 2.0 instead of 1.x. this would mean it has more stuff and the vxd > would must certianly change. the only way i know that this problem > could be solved is to make a program similar to mpath(quake for dos > uses this) and release it as freeware or something. mpath sets up a > software interrupt and you can communicate to winsock thru it > somehow, i dont know enough about this so i'll not make a fool outta > my self and explain it totally wrong, anyone an mpath expert here? > So in other words, the way in which a VxD is called is still done the same way (I pasted a code snipet below, from WSock) its just that the CallVxD(offsets) have changed? In the current WSock, the Socket function does the following: _farpokel (SocketP, 0 * 4, AddressFamily); // AddressFamily _farpokel (SocketP, 1 * 4, SocketType); // SocketType _farpokel (SocketP, 2 * 4, Protocol); // Protocol _farpokel (SocketP, 3 * 4, 0); // NewSocket _farpokel (SocketP, 4 * 4, 0); // NewSocket Han$ CallVxD (0x0110); This is the precise point where Win98 chokes -- it either doesn't like how the data is set up, or perhaps the function offset has changed from 0x0110 to something else.. .. is there a technical document out that explains how the new Win98 .vxd is accessed? If there is, perhaps we can just determine which vxd the user is using and call the functions the appropriate way at runtime.. rather than introduce another abstraction layer (mpath) that you mention above. -- void WSock::CallVxD (int func) { asm volatile ("pushl %%es \n\ pushl %%ecx \n\ popl %%es \n\ lcall _WSockEntry \n\ andl %%eax, 0x0000ffff \n\ popl %%es" : "=a" (_Error) : "a" (func), "b" (0), "c" (SocketP)); if (_Error && (_Error != 0xffff)) Error (); }