include vcomm.inc mov ebx, hPort mov di, Selector ;segment address of notification shl edi, 16 ; function in high word of EDI mov di, OFFSET CommNotifyProc ; and offset address in low word mov cx, hwnd ;reference data (window handle) mov dx, recvt mov si, sendt mov ax, VCOMM_PM_API_EnableNotify ;function number call [_VCOMMCallAddr]
Calls the _VCOMM_EnableCommNotification service.
hPort
Communications resource handle.
CommNotifyProc
Address of a notification function in the VM. For more information, see CommNotifyProc.
hwnd
Reference data that is passed to the notification function. COMM.DRV specifies the handle of the window to receive notification messages.
recvt
Receive-queue notification threshold.
sendt
Transmit-queue notification threshold.
Because the notification function is in a VM, VCOMM does not pass its address to the port driver. Instead, it passes the address of an internal function. When the port driver calls the internal function, it schedules an event and the event handler uses the nested execution mechanism to call the notification function.
See also CommNotifyProc, _VCOMM_EnableCommNotification