U
USB_Steve
Guest
Hi All,
I am writing a custom USB interface for a simple standalone device. It is based on a PIC uP. I have a microchip demo program that will communicate with the device - but it is a very limited demo.
I've been struggling while adapting the MS example of "How to Access a USB Device by Using WinUSB Functions" located at: Programming reference for Windows Driver Kit (WDK) - Windows driver
I would like to got the simplest part to create PC side test software to validate my code, so I have chosen the WinUsb.lib/sys path.
I can get a handle (without error) from:
*hDeviceHandle = CreateFile (
lpDevicePath[0],
GENERIC_READ | GENERIC_WRITE,
FILE_SHARE_READ | FILE_SHARE_WRITE,
NULL,
OPEN_EXISTING,
FILE_FLAG_OVERLAPPED,
NULL);
However I get the ERROR 8 - ERROR_NOT_ENOUGH_MEMORY when I call into the routine:
BOOL bResult = WinUsb_Initialize(hDeviceHandle, &hWinUSBHandle);
if(!bResult)
{
//Error.
printf("WinUsb_Initialize Error %d.", GetLastError());
return FALSE;
}
Any insight and help would be greatly appreciated..
Thanks,
Steve
Continue reading...
I am writing a custom USB interface for a simple standalone device. It is based on a PIC uP. I have a microchip demo program that will communicate with the device - but it is a very limited demo.
I've been struggling while adapting the MS example of "How to Access a USB Device by Using WinUSB Functions" located at: Programming reference for Windows Driver Kit (WDK) - Windows driver
I would like to got the simplest part to create PC side test software to validate my code, so I have chosen the WinUsb.lib/sys path.
I can get a handle (without error) from:
*hDeviceHandle = CreateFile (
lpDevicePath[0],
GENERIC_READ | GENERIC_WRITE,
FILE_SHARE_READ | FILE_SHARE_WRITE,
NULL,
OPEN_EXISTING,
FILE_FLAG_OVERLAPPED,
NULL);
However I get the ERROR 8 - ERROR_NOT_ENOUGH_MEMORY when I call into the routine:
BOOL bResult = WinUsb_Initialize(hDeviceHandle, &hWinUSBHandle);
if(!bResult)
{
//Error.
printf("WinUsb_Initialize Error %d.", GetLastError());
return FALSE;
}
Any insight and help would be greatly appreciated..
Thanks,
Steve
Continue reading...