DWORD WD_KernelPlugInCall(
HANDLE hWD,
WD_KERNEL_PLUGIN_CALL *pKernelPlugInCall);
| Name | Type | Input/Output |
|---|---|---|
| hWD | HANDLE | Input |
| pKernelPlugInCall | WD_KERNEL_PLUGIN_CALL* | Input |
| • hKernelPlugIn | DWORD | Input |
| • dwMessage | DWORD | Input |
| • pData | PVOID | Input/Output |
| • dwResult | DWORD | Output |
| 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
|
Returns WD_STATUS_SUCCESS (0) on success, or an appropriate
error code otherwise [A].
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.
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));
}