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.
:)
prodas tienes que conseguir el borland c++ builder 6.0 porque es el lenguaje con el que compilaron la dll
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
umm, pues no se que decirte. el que tengo a la mano asi vieneCódigo: C
DWORD _stdcall MPUSBGetDLLVersion(void) { return MPUSBAPI_VERSION; }//end MPUSBGetDLLVersion ... DWORD _stdcall MPUSBIsVidPidEqual(PCHAR pDevicePath, PCHAR pVID_PID) { ... DWORD _stdcall MPUSBGetDeviceLink(DWORD instance, // Input ... DWORD _stdcall MPUSBGetDeviceCount(PCHAR pVID_PID) { ... 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.
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