PURPOSE
• Calls a routine in the Kernel PlugIn to be executed.
PROTOTYPE
DWORD WD_KernelPlugInCall(
HANDLE hWD,
WD_KERNEL_PLUGIN_CALL *pKernelPlugInCall);
PARAMETERS
DESCRIPTION
RETURN VALUE
Returns
WD_STATUS_SUCCESS(0) on success, or
an appropriate error code otherwise [
A].
REMARKS
Calling the
WD_KernelPlugInCall [
6.3] function in the user mode will call your
KP_Call callback function in the Kernel kernel. The
KP_Call function in the Kernel PlugIn will determine what routine
to execute according to the message passed to it in the
WD_KERNEL_PLUGIN_CALL structure.
EXAMPLE
WD_KERNEL_PLUGIN_CALL kpCall;
BZERO (kpCall);
/* Prepare the kpCall structure from WD_KernelPlugInOpen(): */
kpCall.hKernelPlugIn = hKernelPlugIn;
/* Set the message to pass to KP_Call(). This will determine
the action performed in the kernel: */
kpCall.dwMessage = MY_DRV_MSG;
kpCall.pData = &mydrv; /* The data to pass to the Kernel PlugIn */
dwStatus = WD_KernelPlugInCall(hWD, &kpCall);
if (dwStatus == WD_STATUS_SUCCESS)
{
printf("Result = 0x%x\n", kpCall.dwResult);
}
else
{
printf("WD_KernelPlugInCall() failed. Error: 0x%x (%s)\n",
dwStatus, Stat2Str(dwStatus));
}