TODOPIC

Lenguajes de programación para PC => Visual Basic => Mensaje iniciado por: PalitroqueZ en 29 de Octubre de 2008, 18:17:14

Título: mpusbapi.dll v1.1.0.0 no me funciona?
Publicado por: PalitroqueZ en 29 de Octubre de 2008, 18:17:14
ya salió la versión 1.1.0.0 de mpusbapi.dll entonces cuando arranco un programa hecho en vb, no me funciona!!

el programa funciona bien con la primera version que sacaron, pero con esta, me sale el error:

Error 453: No se puede encontrar el punto de entrada de la DLL MPUSBGetDLLVersion en mpusbapi.dll

a ustedes les ha funcionado?  :(



Título: Re: mpusbapi.dll v1.1.0.0 no me funciona?
Publicado por: PalitroqueZ en 30 de Octubre de 2008, 16:39:45
Ah ya se, La respuesta es por la cuestión esa de cambiar las llamadas de _cdecl a _stdcall para que el vb6 las pueda aceptar.

Hay que añadirle a todas las funciones del código fuente del DLL

DWORD _stdcall MPUSBxxxxxxx()

Recompilar y resuelto el problema.

 :)

Título: Re: mpusbapi.dll v1.1.0.0 no me funciona?
Publicado por: Slalen en 31 de Octubre de 2008, 05:21:46
Esta nueva versión, ¿sirve en el vista?
Título: Re: mpusbapi.dll v1.1.0.0 no me funciona?
Publicado por: PalitroqueZ en 01 de Noviembre de 2008, 13:50:01
Sip, en el historial del fuente, explican una serie de fixes y funciones añadidas que le hicieron.

cambiando un poco el tema, hay que ver que el manejo de las DLL´s es toda una ciencia, me puse a leer sobre las convenciones de llamadas y resulta que existen como 5, y cada lenguaje de programación tiene la suya. también tiene su historia de porque y para conocer cabalmente su uso hay que meterse hasta en ensamblador, uff

A ver si logro hacer funcionar el picusb en autoit  :?

Título: Re: mpusbapi.dll v1.1.0.0 no me funciona?
Publicado por: prodas en 09 de Septiembre de 2010, 14:30:27
Ah ya se, La respuesta es por la cuestión esa de cambiar las llamadas de _cdecl a _stdcall para que el vb6 las pueda aceptar.

Hay que añadirle a todas las funciones del código fuente del DLL

DWORD _stdcall MPUSBxxxxxxx()

Recompilar y resuelto el problema.

 :)



Estimado PalitroqueZ  como se recompila la dll
Título: Re: mpusbapi.dll v1.1.0.0 no me funciona?
Publicado por: PalitroqueZ en 10 de Septiembre de 2010, 19:15:56
prodas tienes que conseguir el borland c++ builder 6.0 porque es el lenguaje con el que compilaron la dll

Título: Re: mpusbapi.dll v1.1.0.0 no me funciona?
Publicado por: prodas en 10 de Septiembre de 2010, 20:44:09
prodas tienes que conseguir el borland c++ builder 6.0 porque es el lenguaje con el que compilaron la dll



La verdad no la hago mucho a la programación en PC, entiendo que hay que hacer cambios y recopilar, ahora el programa hecho en VB reconoce esta nueva a la del sistema   
Título: Re: mpusbapi.dll v1.1.0.0 no me funciona?
Publicado por: prodas en 11 de Septiembre de 2010, 11:18:19
prodas tienes que conseguir el borland c++ builder 6.0 porque es el lenguaje con el que compilaron la dll



La verdad no la hago mucho a la programación en PC, entiendo que hay que hacer cambios y recopilar, ahora el programa hecho en VB reconoce esta nueva a la del sistema   

Ya tengo el programa abrí el dll de la versión 1.1 pero no se en donde se cambia _cdecl a _stdcall
Título: Re: mpusbapi.dll v1.1.0.0 no me funciona?
Publicado por: PalitroqueZ en 11 de Septiembre de 2010, 21:05:36
tienes que descargar el código fuente de la dll que viene como MCHPFSUSB Framework en:

http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=2651&param=en534494


luego debes buscar el proyecto de la dll y cargarlo en el c++ builder

http://ww1.microchip.com/downloads/en/DeviceDoc/Release%20Notes%20for%20MCHPFSUSB%20v1.3.htm#_MPUSBAPI_Library_and_DLL%20Source

cuando tengas cargado el proyecto, te aparecerá el código fuente y te darás cuenta que todas las funciones tienen el _cdecl que deberás cambiar por
_stdcall y luego buscar en el menu de compilar algo que diga Rebuild, o make, no recuerdo exactamente.

al menos así lo hice en la versión 1.1.0.0 y me funcionó.

Título: Re: mpusbapi.dll v1.1.0.0 no me funciona?
Publicado por: prodas en 12 de Septiembre de 2010, 19:51:27
ese es el problema no encuentro el  _cdecl   :(

ya hice todo lo que me describes, se abre pero en las funciones están sin eso.
Título: Re: mpusbapi.dll v1.1.0.0 no me funciona?
Publicado por: PalitroqueZ en 12 de Septiembre de 2010, 20:12:07
umm, pues no se que decirte. el que tengo a la mano asi viene

Código: C
  1. DWORD _stdcall MPUSBGetDLLVersion(void)
  2. {
  3.     return MPUSBAPI_VERSION;
  4. }//end MPUSBGetDLLVersion
  5.  
  6.  
  7. ...
  8. DWORD _stdcall MPUSBIsVidPidEqual(PCHAR pDevicePath, PCHAR pVID_PID)
  9. {
  10. ...
  11.  
  12. DWORD _stdcall MPUSBGetDeviceLink(DWORD instance,    // Input
  13. ...
  14. DWORD _stdcall MPUSBGetDeviceCount(PCHAR pVID_PID)
  15. {
  16.    ...
  17.  
  18. HANDLE _stdcall MPUSBOpen(DWORD instance,    // Input

si quieres te puedes guiar con este:

http://www.mediafire.com/?qs8cbu5rcawzxws

nota: este código no es de mi autoría.


Título: Re: mpusbapi.dll v1.1.0.0 no me funciona?
Publicado por: prodas en 12 de Septiembre de 2010, 22:51:42
umm, pues no se que decirte. el que tengo a la mano asi viene

Código: C
  1. DWORD _stdcall MPUSBGetDLLVersion(void)
  2. {
  3.     return MPUSBAPI_VERSION;
  4. }//end MPUSBGetDLLVersion
  5.  
  6.  
  7. ...
  8. DWORD _stdcall MPUSBIsVidPidEqual(PCHAR pDevicePath, PCHAR pVID_PID)
  9. {
  10. ...
  11.  
  12.  
  13.  
  14. DWORD _stdcall MPUSBGetDeviceLink(DWORD instance,    // Input
  15. ...
  16. DWORD _stdcall MPUSBGetDeviceCount(PCHAR pVID_PID)
  17. {
  18.    ...
  19.  
  20. HANDLE _stdcall MPUSBOpen(DWORD instance,    // Input

si quieres te puedes guiar con este:

http://www.mediafire.com/?qs8cbu5rcawzxws

nota: este código no es de mi autoría.




Muchas gracias voy a probar
Título: Re: mpusbapi.dll v1.1.0.0 no me funciona?
Publicado por: jmi48 en 01 de Octubre de 2010, 12:56:52
he intentado cargar la libreria en matlap r2009a ó r2010b, de la siguiente forma:
[notfound, warnings] =loadlibrary ('mpusbapi', '_mpusbapi', 'alias', 'libreria')
si bien , desde la linea decomandos de matlab carga la libreria perfectamente y se puede usar perfectamente, pero:
da los sigueintes warnings
notfound =

   Empty cell array: 0-by-1


warnings =


Type 'PCHAR' was not found.  Defaulting to type error.

Found on line 49 of input from line 92 of file C:\Documents and Settings\Mis documentos\Adquisicion\_mpusbapi.h

Type 'HANDLE' was not found.  Defaulting to type error.

Found on line 142 of input from line 185 of file C:\Documents and Settings\Mis documentos\Adquisicion\_mpusbapi.h

Type 'PCHAR' was not found.  Defaulting to type error.

Found on line 142 of input from line 185 of file C:\Documents and Settings\Mis documentos\Adquisicion\_mpusbapi.h

Type 'PCHAR' was not found.  Defaulting to type error.

Found on line 142 of input from line 185 of file C:\Documents and Settings\Mis documentos\Adquisicion\_mpusbapi.h

Type 'HANDLE' was not found.  Defaulting to type error.

Found on line 173 of input from line 216 of file C:\Documents and Settings\Mis documentos\Adquisicion\_mpusbapi.h

Type 'PVOID' was not found.  Defaulting to type error.

Found on line 173 of input from line 216 of file C:\Documents and Settings\Mis documentos\Adquisicion\_mpusbapi.h

Type 'PDWORD' was not found.  Defaulting to type error.

Found on line 173 of input from line 216 of file C:\Documents and Settings\Mis documentos\Adquisicion\_mpusbapi.h

Type 'HANDLE' was not found.  Defaulting to type error.

Found on line 205 of input from line 248 of file C:\Documents and Settings\Mis documentos\Adquisicion\_mpusbapi.h

Type 'PVOID' was not found.  Defaulting to type error.

Found on line 205 of input from line 248 of file C:\Documents and Settings\Mis documentos\Adquisicion\_mpusbapi.h

Type 'PDWORD' was not found.  Defaulting to type error.

Found on line 205 of input from line 248 of file C:\Documents and Settings\Mis documentos\Adquisicion\_mpusbapi.h

Type 'HANDLE' was not found.  Defaulting to type error.

Found on line 236 of input from line 279 of file C:\Documents and Settings\Mis documentos\Adquisicion\_mpusbapi.h

Type 'PVOID' was not found.  Defaulting to type error.

Found on line 236 of input from line 279 of file C:\Documents and Settings\Mis documentos\Adquisicion\_mpusbapi.h

Type 'PDWORD' was not found.  Defaulting to type error.

Found on line 236 of input from line 279 of file C:\Documents and Settings\Mis documentos\Adquisicion\_mpusbapi.h

Type 'BOOL' was not found.  Defaulting to type error.

Found on line 246 of input from line 289 of file C:\Documents and Settings\Mis documentos\Adquisicion\_mpusbapi.h

Type 'HANDLE' was not found.  Defaulting to type error.

Found on line 246 of input from line 289 of file C:\Documents and Settings\Mis documentos\Adquisicion\_mpusbapi.h

Type 'HANDLE' was not found.  Defaulting to type error.

Found on line 267 of input from line 310 of file C:\Documents and Settings\Mis documentos\Adquisicion\_mpusbapi.h

Type 'PVOID' was not found.  Defaulting to type error.

Found on line 267 of input from line 310 of file C:\Documents and Settings\Mis documentos\Adquisicion\_mpusbapi.h

Type 'PDWORD' was not found.  Defaulting to type error.

Found on line 267 of input from line 310 of file C:\Documents and Settings\Mis documentos\Adquisicion\_mpusbapi.h

Ty


El problema esta que al compilar el .m no anda el ejecutable debido a estos warning.

Agrege _stdcall  (ya que cuando abri el proyecto no tenia stdcall ni _cdecl )   esto en el _mpusbapi.h y en _mpusbapi.cpp y compilar todo con c++ builder 6.

COMO RESULTADO LO MISMO QUE ANTES.

AGRADECIRIA ALGUN TIPO DE AYUDA.

SALUDOS
Título: Re: mpusbapi.dll v1.1.0.0 no me funciona?
Publicado por: saveuc_siul en 21 de Abril de 2012, 00:00:55
Hola, encontraste alguna solución??? ahora mismo estoy teniendo ese problema, me puedes ayudar??

he intentado cargar la libreria en matlap r2009a ó r2010b, de la siguiente forma:
[notfound, warnings] =loadlibrary ('mpusbapi', '_mpusbapi', 'alias', 'libreria')
si bien , desde la linea decomandos de matlab carga la libreria perfectamente y se puede usar perfectamente, pero:
da los sigueintes warnings
notfound =

   Empty cell array: 0-by-1


warnings =


Type 'PCHAR' was not found.  Defaulting to type error.

Found on line 49 of input from line 92 of file C:\Documents and Settings\Mis documentos\Adquisicion\_mpusbapi.h

Type 'HANDLE' was not found.  Defaulting to type error.

Found on line 142 of input from line 185 of file C:\Documents and Settings\Mis documentos\Adquisicion\_mpusbapi.h

Type 'PCHAR' was not found.  Defaulting to type error.

Found on line 142 of input from line 185 of file C:\Documents and Settings\Mis documentos\Adquisicion\_mpusbapi.h

Type 'PCHAR' was not found.  Defaulting to type error.

Found on line 142 of input from line 185 of file C:\Documents and Settings\Mis documentos\Adquisicion\_mpusbapi.h

Type 'HANDLE' was not found.  Defaulting to type error.

Found on line 173 of input from line 216 of file C:\Documents and Settings\Mis documentos\Adquisicion\_mpusbapi.h

Type 'PVOID' was not found.  Defaulting to type error.

Found on line 173 of input from line 216 of file C:\Documents and Settings\Mis documentos\Adquisicion\_mpusbapi.h

Type 'PDWORD' was not found.  Defaulting to type error.

Found on line 173 of input from line 216 of file C:\Documents and Settings\Mis documentos\Adquisicion\_mpusbapi.h

Type 'HANDLE' was not found.  Defaulting to type error.

Found on line 205 of input from line 248 of file C:\Documents and Settings\Mis documentos\Adquisicion\_mpusbapi.h

Type 'PVOID' was not found.  Defaulting to type error.

Found on line 205 of input from line 248 of file C:\Documents and Settings\Mis documentos\Adquisicion\_mpusbapi.h

Type 'PDWORD' was not found.  Defaulting to type error.

Found on line 205 of input from line 248 of file C:\Documents and Settings\Mis documentos\Adquisicion\_mpusbapi.h

Type 'HANDLE' was not found.  Defaulting to type error.

Found on line 236 of input from line 279 of file C:\Documents and Settings\Mis documentos\Adquisicion\_mpusbapi.h

Type 'PVOID' was not found.  Defaulting to type error.

Found on line 236 of input from line 279 of file C:\Documents and Settings\Mis documentos\Adquisicion\_mpusbapi.h

Type 'PDWORD' was not found.  Defaulting to type error.

Found on line 236 of input from line 279 of file C:\Documents and Settings\Mis documentos\Adquisicion\_mpusbapi.h

Type 'BOOL' was not found.  Defaulting to type error.

Found on line 246 of input from line 289 of file C:\Documents and Settings\Mis documentos\Adquisicion\_mpusbapi.h

Type 'HANDLE' was not found.  Defaulting to type error.

Found on line 246 of input from line 289 of file C:\Documents and Settings\Mis documentos\Adquisicion\_mpusbapi.h

Type 'HANDLE' was not found.  Defaulting to type error.

Found on line 267 of input from line 310 of file C:\Documents and Settings\Mis documentos\Adquisicion\_mpusbapi.h

Type 'PVOID' was not found.  Defaulting to type error.

Found on line 267 of input from line 310 of file C:\Documents and Settings\Mis documentos\Adquisicion\_mpusbapi.h

Type 'PDWORD' was not found.  Defaulting to type error.

Found on line 267 of input from line 310 of file C:\Documents and Settings\Mis documentos\Adquisicion\_mpusbapi.h

Ty


El problema esta que al compilar el .m no anda el ejecutable debido a estos warning.

Agrege _stdcall  (ya que cuando abri el proyecto no tenia stdcall ni _cdecl )   esto en el _mpusbapi.h y en _mpusbapi.cpp y compilar todo con c++ builder 6.

COMO RESULTADO LO MISMO QUE ANTES.

AGRADECIRIA ALGUN TIPO DE AYUDA.

SALUDOS