| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Driver: byte count from IOCTL |
Moin Patrick,
18.02.97 21:13, you wrote a message to Mike Bilow:
PH> [..]
MB>> The closest you can come to accomplishing this is to have the
MB>> driver allocate some memory with DevHelp_VMAlloc() and then make
MB>> it visible in process address space with
MB>> DevHelp_VMGlobalToProcess().
PH> How can I go the other way round ?
PH> Application allocates a memory buffer in process space and issues
PH> an ioctl() passing that pointer to my driver. How has that passed
PH> address to be converted so the driver can fill my application's
PH> buffer ?
The system converts the 0:32 pointer passed to DosDevIOCtl to a 16:16
pointer usable during the ioctl. Pointers inside that datapacket (pointer
to pointer, ugly) have to be translated by the driver.
If data has to be accessable at any time it has to be locked, a GDT
selector has to be allocted and mapped.
Any databuffer should be checked via DevHelp_VerifyAccess.
C-x C-s
Vitus [Team OS/2 Germany #835]
--- Sqed/rexx 229:
* Origin: Breaking Windows isn't just for kids anymore. (2:2474/424)SEEN-BY: 50/99 54/99 270/101 620/243 625/160 711/401 413 430 934 712/311 407 SEEN-BY: 712/505 506 517 623 624 704 713/317 800/1 @PATH: 2474/424 400 0 24/777 888 396/1 270/101 712/624 711/934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.