The MASM Forum Archive 2004 to 2012

Miscellaneous Forums => 16 bit DOS Programming => Topic started by: marco1974 on March 11, 2005, 03:22:19 PM

Title: Passing arguments to a vxd.
Post by: marco1974 on March 11, 2005, 03:22:19 PM
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]
Title: Re: Passing arguments to a vxd.
Post by: Kayaker on March 11, 2005, 07:48:16 PM
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
Title: Re: Passing arguments to a vxd.
Post by: marco1974 on March 13, 2005, 02:40:58 PM
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 ;-)




Title: Re: Passing arguments to a vxd.
Post by: Kayaker on March 13, 2005, 05:24:31 PM
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?
Title: Re: Passing arguments to a vxd.
Post by: MichaelW on March 13, 2005, 08:55:50 PM
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.