🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: cn.bbs.comp.program
1 messages
1 total messages Started by ikoo Tue, 04 Aug 1998 00:00
Virtual Device Declaration
#281
Author: ikoo
Date: Tue, 04 Aug 1998 00:00
27 lines
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

--
�� ��Դ:���������� BBS bbs.nease.net��[FROM: 202.96.133.150]
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads