Begin_Service_Table

include vmm.inc

Begin_Service_Table DeviceName, DefSegment


The Begin_Service_Table macro marks the start of the service table for a virtual device. A virtual device uses the service table to export the names and addresses of its services. Other virtual devices can use the VxDcall macro to call these services.

Parameters

DeviceName

Specifies the name of the virtual device. This name is used to create a macro, named DeviceName_Service, that is used in the table to define each exported service. For more information about the macro, see the following “Comments” section.

DefSegment

Specifies the name of the data segment to place the table. This parameter is optional. If given, the macro uses the DefSegment_LOCKED_DATA_SEG macro to define the segment. Otherwise, it uses the VxD_LOCKED_DATA_SEG macro.

Return Value

This macro has no return value.

Comments

A virtual device exports its services by defining the symbol Create_DeviceName_Service_Table before using the Begin_Service_Table macro. Virtual devices that call these service also use the Begin_Service_Table macro but must not define the Create_DeviceName_Service_Table symbol.

The complete service table has the following form:

Begin_Service_Table DeviceName, DefSegment
DeviceName_Service Procedure, LocalSeg
.
.
.
End_Service_Table DeviceName, DefSegment

The DeviceName_Service macro, created by Begin_Service_Table, adds the specified service to the table. A table may have any number of these macros.

The Procedure parameter specifies the name of the service to add to the table. If RESERVED is given, the macro reserves an entry in the table instead adding a procedure.

The LocalSeg parameter specifies which segment contains the procedure. This parameter is optional.

See Also

End_Service_Table, VxD_LOCKED_DATA_SEG