Jump to content

DevHelp_RegisterPDD

From EDM2
Revision as of 14:18, 2 January 2020 by Ak120 (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This service registers a 16:16 physical device driver with a virtual device driver for physical device driver/virtual device driver (PDD/VDD) communication. The function is used by a physical device driver to register its name and a communication entry point with the DOS Session Manager. Later, a virtual device driver can use VDHOpenPDD to open communication with the physical device driver.

Syntax

C

USHORT APIENTRY DevHelp_RegisterPDD (NPSZ PhysDevName, PFN HandlerRoutine)

Assembler

MOV   DS,SEGMENT PDD_Name        ; DS:SI = Pointer to ASCIIZ name for
                                 ; the physical device driver
LEA   SI,PDD_Name
MOV   DI,SEGMENT PDD_Function
MOV   ES,DI                      ; ES:DI = Pointer to physical device driver's
                                 ; communication function
LEA   DI,PDD_Function
MOV   DL,DevHlp_RegisterPDD

CALL  [Device_Help]

Parameters

C

PhysDevName (NPSZ)
input - Pointer to ASCIIZ name for the physical device driver.
HandlerRoutine (PFN)
input - Pointer to physical device driver's communication function.

Assembler

MOV   DS,SEGMENT PDD_Name        ; DS:SI = Pointer to ASCIIZ name for
                                 ; the physical device driver
LEA   SI,PDD_Name
MOV   DI,SEGMENT PDD_Function
MOV   ES,DI                      ; ES:DI = Pointer to physical device driver's
                                 ; communication function

Return Code

C

Success Indicator: 0 - The data area is filled in.

Possible errors:

System Halts if the function fails.

Assembler

  'C' Clear if successful.
      AX = 0.
   If the function fails, a system halt will occur.

Remarks

If ES:DI is NULL (0:0), this call removes the registration of the name of this physical device driver. The physical device driver name supplied to this service does not need to match the string in the physical device driver's header.

If a physical device driver deactivates itself, it must close down any interaction with virtual device drivers. If a physical device driver registers an entry point during initialization, but fails later during initialization, it must call this function with a NULL function pointer in order to remove the registration.

Example Code

C

#include  "dhcalls.h"

USHORT APIENTRY DevHelp_RegisterPDD (NPSZ PhysDevName,
                                     PFN HandlerRoutine)