IeXdi2Generic::Ioctl (Windows CE 5.0)
This method provides a user-defined, nonformatted interface.
HRESULT Ioctl( [in] GUIDguidIoctl, [in] DWORD dwBuffInSize, [in, size_is(dwBuffInSize)] const BYTE *pbBufferIn, [out] DWORD *pdwBuffOutSize, [out, size_is(,*pdwBuffOutSize)] BYTE **ppbBufferOut);
Parameters
- guidIoctl
GUID for the IOCTL. - dwBuffInSize
Size in bytes of *****pbyBufferIn. - pbBufferIn
Buffer to hold raw input parameters. - pdwBuffOutSize
Effective size in bytes of *pbyBufferOut. - ppbBufferOut
Pointer to the buffer for raw output parameters. The buffer for this value is allocated by CoTaskMemAlloc.
Return Values
The following table shows return values for this method.
Value | Description |
---|---|
S_OK | Indicates the function was successful. |
E_FAIL | Indicates an unspecified failure. |
E_NOTIMPL | Indicates the error code is not implemented. |
E_INVALIDARG | Indicates one or more invalid arguments. |
E_OUTOFMEMORY | Indicates an out of memory error. |
EXDI_E_COMMUNICATION | Indicates a communication error between host driver and debugging target. |
Remarks
To avoid resource leaking, use CoTaskMemFree to free the task memory used by the buffer that this function uses to return raw output parameters, ppbBufferOut..
The following example shows how you might use CoTaskMemFree to release the memory held for the return buffers.
BYTE *pbOutputBuffer;
DWORD pdwBuffOutSize;
HRESULT hr = pieXdi2Generic->Ioctl (guidIoctl, dwBuffInSize,
pbBufferIn, &pdwBuffOutSize, &pbOutputBuffer);
if (SUCCEEDED (hr))
{
// Use ioctl result ...
CoTaskMemFree (pbOutputBuffer);
pbOutputBuffer = 0;
}
Requirements
OS Version: Windows CE 5.0 and later.
Header: eXDI2.h.
Link Library: ole32.lib, oleaut32.lib.
See Also
Send Feedback on this topic to the authors