Article View: cn.bbs.comp.program
Article #281Virtual Device Declaration
From: ikoo
Date: Tue, 04 Aug 1998 00:00
Date: Tue, 04 Aug 1998 00:00
27 lines
2074 bytes
2074 bytes
VIRTUAL DEVICE DECLARATION
Every virtual device must declare a name, a version number, an initialization order, and
a device control procedure. Many virtual devices also declare a device identifier and API
procedures. Virtual devices typically use the Declare_Virtual_Device macro to make
these declaration as in the following example:
Declare_Virtual_Device VSAMPLED,4,0,VSAMPLED_Control, \
VSAMPLED_Device_ID, VSAMPLED_Init_Order, \
VSAMPLED_V86_API_Handler, \
VSAMPLED_PM_API_handler
This example decalres the sample virtual device, VSAMPLED, version 4.0. the device
control procedure, which must be defined in the same source file, is named
VSAMPLED_Control. The symbols VSAMPLED_Device_ID and
VSAMPLED_Init_Order specify the nonstandard virtual device identifier and initialization
order. This virtual device supports both V86-mode and protected-mode API procedures.
The VMM uses the information decalred by this macro to initialize the virtual device,
send system control messages to it. To grant access of this information to the VMM, the macro creates a
device descriptor block (DDB) and stores it in the protected-mode data segment. ( The
DDB has the same format as a VxD_Desc_Block structure.) The macro creates a label
for the DDB, which must be explicitly exported when the virtual device is linked
In the previous example, the name for the DBB is VSAMPLED_DBB
--
[m[1;31m�� ��Դ:���������� BBS bbs.nease.net��[FROM: 202.96.133.150][m
Technical Details
Message-ID:
<3PkANf$RrB@bbs.nease.net>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: fc86e,73e21f085c69ebf8,start X-Google-Attributes: gidfc86e,public From: ikoo.bbs@bbs.nease.net (ikoo) Subject: Virtual Device Declaration Date: 1998/08/04 Message-ID: <3PkANf$RrB@bbs.nease.net> X-Deja-AN: 378458621 X-Filename: Program/M.902233721.A X-Complaints-To: usenet@news.nease.net X-Trace: news.nease.net 902367825 17077 202.96.152.195 (6 Aug 1998 01:43:45 GMT) Organization: Net Ease NNTP-Posting-Date: 6 Aug 1998 01:43:45 GMT Newsgroups: cn.bbs.comp.program,