Topic History of: Windows not recognizing Max. showing the last posts - (Last post first)
| dat |
Minh Thanh wrote:
I try to declare MPUSBAPI in VB 2005 express, but ive found this declaration did not work:
Public Const VID_PID_NORM = "vid_04d8&pid_000c"
Public Const VID_PID_BOOT = "vid_04d8&pid_000b"
Public Const END_POINT = "\MCHP_EP1"
Declare Ansi Function MPUSBOpen Lib "MPUSBAPI.DLL" Alias "_MPUSBOpen" (ByVal DeviceInstance As UInteger, ByVal VID_PID As String, ByVal EndPoint As String, ByVal Direction As UInteger, ByVal Reserved As UInteger) As UInteger
and then i call:
OutPipe = MPUSBOpen(0, VID_PID_NORM, END_POINT, 1, 0)
It does not work because OutPipe = 0xffffffff (INVALID_HANDLE_VALUE)
so i think my declaration was wrong. I successully call MPUSBGetDeviceCount
It return 1 or 0 when i plug or unplug the board.
Sorry if i post this at wrong thread. |
| Mat |
I have posted a response for you in the other thread, let me know if it helps. Mat |
| recursos |
Me too, I got stuck with Visual C# 2005 Express and "mpusbapi.dll"
(see my post:
my post in "articles")
did you find how to add a reference the "mpusbapi.dll"?
Rec
Post edited by: mat, at: 2006/06/26 14:29 |
| majestrix |
i'm having the same prob with vb.net.. i dont know which .dll to use now..?? ...ummm, Mat, u wrote that article on solving this prob..?? if so pls direct me there. or else, may i know how the problem is solved and it would be great if i get the dll (my email is hasan_mg@hotmail.com)
thanks. |
| Mat |
Great email me the code, (mat at piccoder dot co dot uk) and ill include it, or write another short article on using vb.net.Thanks a lot Mat |
| Minh Thanh |
Yeah, at last i've solved the problem. A bit stupid i am with VB.NET. But with VB6 the compiled DLL of microchip does not work. So i have modified it a liitle.
And now everything ok. I would like to include my code in your arctile, because i've found many guys had the same problem with me.
Thanks again. |
|