Article View: cn.bbs.comp.program
Article #379Declaring Services
From: ikoo
Date: Fri, 14 Aug 1998 00:00
Date: Fri, 14 Aug 1998 00:00
45 lines
3540 bytes
3540 bytes
DECLARING SERVICES : A virtual device uses the Begin_Service_Table and End_Service_Table macors to : declare its services. The macors mark the start and end of a list containing the names : of the services and optionally the names of the segments containing the services. The : declaration must be made in the same file as the virtual device declaration (that is, in : the file containing the Declare_Virtual_Device macro) and must be preceded with the : definition of a device-specific symbol. The following example shows service table : declaration for the sample virtual device, VSAMPLED: : Create_FSAMPLED_Service_Table equ 1 : Begin_Service_Table VSAMPLED : VSAMPLED_Service VSAMPLED_Get_Version, LOCAL : VSAMPLED_Service VSAMPLED_Service_1 : VSAMPLED_Service VSAMPLED_Servie_2,VxD_ICODE : End_Service_Table VSAMPLED : In this example, the Create_VSAMPLED_Service_Table symbol, defined just before the : service table declaration, directs the Begin_Service_Table macro to create a service : table for VSAMPLED. Once the declaration starts, the VSAMPLED_Service macro : actually declares the services. This required macro is created by the : Begin_Service_Table macro, and is only available within the servie table declaration. : The name of each service must exactly match the service's defined name, that is, the : name given with the BeginProc macro. : When declaring a service, the LOCAL option must be given after the service name if the : service is defined in the same source file containing the service table declaration. In : other words, the service table automatically declares a service as an external service : unless the LOCAL option is given. In the preious example, the : VSAMPLED_Get_Version serivce is define in the same file containing the service : table. : Similarly, a segment name must be given afters the service name if the service is not : defined in the VxD_CODE segment. In the previous example, the VSAMPLE_Service_2 : service is defined in the VxD_ICODE segment. : The order in which services are declared is important. The first declared service : for a virtual device must be the Get_Version service.( This service clears the carry flag and : returns with the virtual device's version number in the AX register.) Also, any new : services added to the virtual device must be declared at the end of the table(or in : explicitly reserved slots in the table). Since the VMM relies on the order of the servies : in the table to correctly link to the services, inserting a new service in the middle of the : table requires that all virtual devices using the virtual device's service be rebuilt. for : convenience, the service table declaration should be placed in an include file so that : other virtual devices can import the services by including the file rather than recreating the declaration. -- [m[1;36m�� ��Դ:���������� BBS bbs.nease.net��[FROM: 202.96.190.124][m
Technical Details
Message-ID:
<3Q61cA$S98@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,f2f9a7c453227013,start X-Google-Attributes: gidfc86e,public From: ikoo.bbs@bbs.nease.net (ikoo) Subject: Declaring Services Date: 1998/08/14 Message-ID: <3Q61cA$S98@bbs.nease.net> X-Deja-AN: 381082639 X-Filename: Program/M.903098410.A X-Complaints-To: usenet@news.nease.net X-Trace: news.nease.net 903098937 2402 202.96.152.195 (14 Aug 1998 12:48:57 GMT) Organization: Net Ease NNTP-Posting-Date: 14 Aug 1998 12:48:57 GMT Newsgroups: cn.bbs.comp.program,