Find Microchip USB device with given VID and PID

Giganews Newsgroups
Subject:Find Microchip USB device with given VID and PID
Posted by: Herman vanRuitenbeek (herm…@re-tech.nl)
Date:Tue, 31 Aug 2010

Hello,

I'm trying to connect to a microchip USB device but whatever I do I get
no devices connected.
I use the demo source from Microchip and a Delphi translation
I call the function

GetDeviceCount(_cVID_PID)

which looks like

function GetDeviceCount(aVID_PID: PChar8): LongInt;
begin
  Result := -1;
  if @prcMPUSBGetDeviceCount = nil then
    @prcMPUSBGetDeviceCount := _GetProcAddress('MPUSBGetDeviceCount');
  if @prcMPUSBGetDeviceCount <> nil then
    Result := prcMPUSBGetDeviceCount(aVID_PID);
end;

It's defined like this

prcMPUSBGetDeviceCount: function(pVID_PID: PChar8): integer stdcall;

There's also a function GetDLLVersion which is called like this one that
returns the correct versionnumber

Can anyone help me on this, because I don't know what to do anymore

Thanks in advance
Herman

Replies