PURPOSE
Calls a routine in the Kernel PlugIn to be executed.
PROTOTYPE
DWORD WD_KernelPlugInCall(
HANDLE hWD,
WD_KERNEL_PLUGIN_CALL *pKernelPlugInCall);
PARAMETERS
| Name | Type | Input/Output |
|---|---|---|
| HANDLE | Input | |
| WD_KERNEL_PLUGIN_CALL* | Input | |
| DWORD | Input | |
| DWORD | Input | |
| PVOID | Input/Output | |
| DWORD | Output |
DESCRIPTION
| Name | Description |
|---|---|
| hWD | Handle to WinDriver |
| pKernelPlugInCall | Pointer to a Kernel PlugIn message structure: |
| hKernelPlugIn | Handle to the Kernel PlugIn |
| dwMessage | Message ID to pass to the KP_Call() callback |
| pData | Pointer to data to pass between the Kernel PlugIn driver and the user-mode application, via the KP_Call() callback |
| dwResult | Value set by KP_Call() callback |
RETURN VALUE
Returns WD_STATUS_SUCCESS (0) on success, or an appropriate error code otherwise [A].
REMARKS
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));
}