Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than coredll, prefix the name with the module name and a period.
KernelIoControl (coredll)
coredll is for smart devices, not desktop Windows. Therefore, this information only applies to code using the .NET Compact Framework. To see if information for KernelIoControl in other DLLs exists, click on Find References to the right.
.
C# Signature:
[DllImport("coredll.dll", SetLastError=true)]
internal static extern bool KernelIoControl(int dwIoControlCode, byte[] inBuf, int inBufSize, byte[] outBuf, int outBufSize, ref int bytesReturned);
VB Signature:
Declare Function KernelIoControl Lib "coredll.dll" (TODO) As TODO
/// <summary>
/// This function provides the kernel with a generic I/O control for
/// carrying out I/O operations.
/// </summary>
/// <param name="dwIoControlCode">I/O control code, which should support the
/// OAL I/O controls. For a list of these I/O controls, see Supported
/// OAL APIs.</param>
/// <param name="lpInBuf">Pointer to the input buffer.</param>
/// <param name="nInBufSize">Size, in bytes, of lpInBuf.</param>
/// <param name="lpOutBuf">Pointer to the output buffer.</param>
/// <param name="nOutBufSize">Maximum number of bytes that can be returned in
/// lpOutBuf.</param>
/// <param name="lpBytesReturned">Address of a DWORD that receives the size,
/// in bytes, of the data returned.</param>
/// <returns>TRUE indicates success; FALSE indicates failure.</returns>
[DllImport("Coredll.dll")]
private extern static uint KernelIoControl
(
uint dwIoControlCode,
IntPtr lpInBuf,
uint nInBufSize,
IntPtr lpOutBuf,
uint nOutBufSize,
ref uint lpBytesReturned
);
#endregion
/// <summary>
/// the method needed to be called to actually reset the device.
/// </summary>
public static void resetDevice()
{
uint bytesReturned = 0;
uint IOCTL_HAL_REBOOT = CTL_CODE(FILE_DEVICE_HAL, 15, METHOD_BUFFERED, FILE_ANY_ACCESS);
KernelIoControl(IOCTL_HAL_REBOOT, IntPtr.Zero, 0, IntPtr.Zero, 0, ref bytesReturned);
}
TODO - a short description
4/17/2009 8:17:26 AM - anonymous
Please edit this page!
Do you have...
helpful tips or sample code to share for using this API in managed code?
corrections to the existing content?
variations of the signature you want to share?
additional languages you want to include?
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).