PICcoder.co.uk Forum  


::post new topic::
<< Start < Prev 1 2 3 4 Next > End >>
Re:Windows not recognizing .dll
Date: 2006/06/26 13:23 By: Mat Status: Admin  
Karma: 7  
Posts: 211
graph
I have posted a response for you in the other thread, let me know if it helps. Mat
reply | quote

Re:Windows not recognizing
Date: 2008/07/15 13:10 By: dat Status: Visitor  
 
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.
reply | quote

<< Start < Prev 1 2 3 4 Next > End >>
::post new topic::