Device Manager Security
Collapse the table of content
Expand the table of content

Device Manager Security (Windows CE 5.0)

Windows CE 5.0
Send Feedback

Input/Output Buffer Validation

Device Manager calls the MapCallerPtr function to validate all input and output buffers passed to DeviceIoControl. Because Device Manager validates these buffers, individual drivers that use DeviceIoControl do not need to validate their input and output buffers. The following Device Manager code excerpt shows when and how Device Manager validates the input and output buffers.

BOOL DM_DevDeviceIoControl(
  fsopendev_t *fsodev,
  DWORD dwIoControlCode,
  LPVOID lpInBuf,
  DWORD nInBufSize,
  LPVOID lpOutBuf,
  DWORD nOutBufSize,
  LPDWORD lpBytesReturned,
  LPOVERLAPPED lpOverlapped)
  BOOL retval = FALSE;
  DWORD dodec = 0;

  lpInBuf = MapCallerPtr(lpInBuf,nInBufSize);
  lpOutBuf = MapCallerPtr(lpOutBuf,nOutBufSize);
  //  End of code excerpt.

See Also


Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.

© 2016 Microsoft