Programming 版 (精华区)
发信人: zpw (zhao), 信区: Programming
标 题: FAQ for VXD(十六)
发信站: 紫 丁 香 (Tue Jul 28 14:24:56 1998), 转信
Do I need a Device ID for my VxD?
Most developers will not need a device ID. To communicate with a VxD from a
Win32 application, use the Device IOCTL call. To obtain the VxD entry point
from a 16-bit application running under Windows 95 given the device name (1-
8 characters) without needing an ID number, do this:
AX = 1684h (Get VxD entry point)
BX = 0000h (UNDEFINED_DEVICE_ID)
ES:DI -> 8-character space-padded case-sensitive buffer with the VxD
name.
Int 2Fh
This will return ES:DI = callback address if successful, or 0 on error.
For example, if your device is called "MYDEV", you could write
MyDevName db 'MYDEV ' ; 8 characters space-padded case-sensitive
mov ax, 1684h
mov bx, 0
push ds
pop es
mov di, offset MyDevName
int 2fh
mov ax, es
or ax, di
jz error
mov word ptr EntryPoint[0], di
mov word ptr EntryPoint[2], es
If your driver provides services to be called by other VxDs, you may want a
unique device ID. Send email to vxdid@microsoft.com and an application for
a device ID will be automatically sent to you.
--
※ 来源:.紫 丁 香 bbs.hit.edu.cn.[FROM: yaoyu.hit.edu.cn]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:2.952毫秒