The VCOMM protected-mode API (PM API) provides a set of functions that COMM.DRV calls to access communications resources. In general, Windows-based applications should use the communications functions in the Windows API.
Before calling any VxD's PM API, an application must determine the address to call by using Interrupt 2Fh Function 1684h (Get Device API Entry Point Address). The following example retrieves the calling address for the VCOMM PM API, and saves it in the 32-bit variable _VCOMMCallAddr.
xor di, di ;zero in DI mov es, di ;zero in ES mov ax, 1684h ;function number mov bx, VCOMM_Device_ID ;device ID int 2Fh ;get API entry point mov word ptr [_VCOMMCallAddr], di ;segment in high-order word mov word ptr [_VCOMMCallAddr+2], es ;offset in low-order word
To call a PM API function, place the function number in AX and call the API entry point address. Parameters are placed in other registers or on the stack. Most of the PM API functions thunk to a corresponding client VxD service.
For PM API functions that return an error value, the error value is the low 16 bits of the error that would be returned by the _VCOMM_GetLastError service. That is, it is the low 16 bits of the dwLastError field of _PortData.
See also _VCOMM_GetLastError, VCOMM_PM_API_cevt, VCOMM_PM_API_cevtget, VCOMM_PM_API_cextnfcn, VCOMM_PM_API_cFlush, VCOMM_PM_API_ctx, VCOMM_PM_API_EnableNotify, VCOMM_PM_API_OPENCOM, VCOMM_PM_API_ReadString, VCOMM_PM_API_SetCom, VCOMM_PM_API_SetMSRShadow, VCOMM_PM_API_Setup, VCOMM_PM_API_StaCom, VCOMM_PM_API_TrmCom, VCOMM_PM_API_WriteString