News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Passing arguments to a vxd.

Started by marco1974, March 11, 2005, 03:22:19 PM

Previous topic - Next topic

marco1974

Hello ,


I am trying to pass a structure to a vxd to call inside the vxd int 21h dos services.

Its verry difficult to pass DATA to a VXD.

Hmm does anybody know how to pass a complete structure to the vxd like
dioc_regs???



look at the source.


[attachment deleted by admin]

Kayaker

Hi

The data you send to or from a vxd can simply be accessed through the DIOC params struct:


.ELSEIF [esi].dwIoControlCode==1
   
mov pDIOC,esi            ;save pointer to DIOC params struct
...

;use the data you sent from user mode:
mov esi, pDIOC
mov eax, [esi].lpvInBuffer   ; passed as lpInBuffer of your DeviceIoControl call
mov eax, [eax]
; "assume" the pointer to your structure and use it as normal
...


       
;return data to user mode:       
mov esi, pDIOC 
mov eax, [esi].lpvOutBuffer   ; lpOutBuffer of your DeviceIoControl call
mov [eax], -1         ; return some data

ret

Kayaker

marco1974

Thanx.

I find it verry difficult to pass a struct and use interupts.

This sample is verry good!

Do you know more about vxd`s?
I am trying to get some results from bios like 'vendor strings'.

For info tools it handy if a function can load a vxd and check some data.

The BIOS holds many secret strings uhh things ;-)





Kayaker

You're welcome. Do you mean BIOS information you can get from a standard CMOS RAM memory map, using IN/OUT commands?
Or something else?

MichaelW

If you are trying to access strings that are encoded into the BIOS, you should be able to do this from a DOS program running under any version of Windows. If you are trying to locate the BIOS ID string, many systems will display it at the lower-left corner of the screen during startup.
eschew obfuscation