Mail Archives: djgpp/2001/01/06/11:21:30
Hello.
Peter Remmers wrote:
> The documentation is terse. But the PM-API is basically just a wrapper
> for the VXD-to-VXD interface of VCOMM, which is documented better.
> Constants can be looked up in the header files, ans structures are
> declared there, too.
Having the header files is quite helpful. Having some DDK documentation
and header files is even better. ;)
> What I don't understand is why pointers are passed as 16:16 and not
> 16:32? Could that mean buffers have to reside in low DOS memory?
The following is based on my experience of interfacing with WSOCK.VXD and
WSOCK2.VXD. When using the protected mode entry point of WSOCK[2].VXD, you
pass in a selector:offset pair rather than a segment:offset pair. The VxD
will map the address you pass in to a flat address, using the virtual
machine ID and the selector:offset pair. I guess the 16:16 is a limitation
from Windows's old days. Changing the interface of VCOMM from expecting
16:16 to 16:32 would break a lot of things, I guess.
You can use __dpmi_allocate_memory() to allocate a chunk of memory and get
its selector. You may want to look at the libsocket code to see what it
does - see src/wsock/w_initnt.c.
Bye, Rich =]
--
Richard Dawe
[ mailto:richdawe AT bigfoot DOT com | http://www.bigfoot.com/~richdawe/ ]
- Raw text -