PDA

View Full Version : How Can I Use Thunk For Reading Sectors From CD-ROM?


SmallBoy
June 4th, 2001, 03:20
After I Recieving Many Information About Reading Sectors From CD-ROM, I Want To Write A Dll And Make A 16Bits Dll But I Can't Connect It To A 32Bits Dll Because Of Low Information On Thunk In 32Bits Dlls.

Please Help Me If You Have Any Information About Reading Sectors From CD-ROM/ASPI Programming/Thunk Scripting

Most Regards
SmallBoy3000

kill3xx
June 4th, 2001, 16:58
Quote:
SmallBoy (06-04-2001 01:20):
After I Recieving Many Information About Reading Sectors From CD-ROM, I Want To Write A Dll And Make A 16Bits Dll But I Can't Connect It To A 32Bits Dll Because Of Low Information On Thunk In 32Bits Dlls.

Please Help Me If You Have Any Information About Reading Sectors From CD-ROM/ASPI Programming/Thunk Scripting

Most Regards
SmallBoy3000


U've to use QT_Thunk directly plus some under-documented api :

Load/FreeLibrary16, GetProcAddress16, MapSL/LS, ecc.. there are some articles out there (DDJ,WDJ, Pietrek/Schulman and from other non m$ sources), and some examples (ElicZ site f.e.) so i suggest u to spend a few minuts digging with google

Best Regards,

Kill3xx

p.s. u can read CD sectors ala Bleem via K32!VxDCall0 too

Smallboy3000
June 5th, 2001, 13:37
Please Help Me On K32!VxDCall0

kill3xx
June 6th, 2001, 10:53
VxDCall0 (better VxDCall0@0/@32,it's prototyped as WINAPI and expects
the service id/number as 1st param) is the undoc, but well known ,
kernel32 internal API to invoke win32 VxD services (for more infos
get/read Pietrek/Schulman books or play with sIce/TRW2k);
it's exported by kernel32.dll, win9x ver only ofcoz, by ordinal 0x01.

The method of reading cd-rom sectors is not too different from the
one u know (btw i'm guessing u've read the MSDN art. which use
the thunk compiler):
among others win32 vxd services exported by VWIN32.VXD there's
Int31_Dispatch (serv# 0x2a0029) that u can guess reflects
a request down to DMPI host:
IIRC Bleem!,or at least the ver i've played with, read raw sectors
using DPMI_Simulate_Real_Int( 0x2f + AX = 0x1510 + cmd code = 0x80);
naturally the buffers must be allocated with GlobalDosAlloc
and the ptr passed as RM address


Best regards,

kill3xx

Smallboy3000
June 6th, 2001, 15:14
Hi,
Please Help Me/Give Me Any Way/Sources About To Create Dll By Using Thunk Script.

Most Regards
SmallBoy3000

IcyDee
June 8th, 2001, 02:16
Bear in mind that thunking will not work on W2000, only W9X and ME.

An alternative would be to use the ASPI interface which would work on all W9X and ME platforms and on W2000 (if ASPI is installed) or you could use the SPTI on W2000/NT