And how c + + builder call vc write DLL!
Thank you very much!!!!!!
CodePudding user response:
What is the engineering file extensions?CodePudding user response:
Not sure what you mean to say clearlyCodePudding user response:
BCB a transformation function of vc projects, but have never used, don't know what to use is not working, if just call DLL, there are two methods:1) check vc provided lib and header files, if any, can be directly added to the project of BCB, may require the COFF to the transformation of the OMF, many articles under the search
2) if there is no.lib file, but there is a header file or know the DLL function parameters, also can use dynamic loading,
LoadLibrary cooperate GetProcAddress call
CodePudding user response:
@ 9527I feel you say the second should be a good boss also let me use the loadlibarary he said just now let me write a small program and then use his header files and. DLL dynamic library to raise an example again? Thank you!
CodePudding user response:
The operation of my original packaging card reader code:The header file
//-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
# # ifndef __T6_ULC_H
# define __T6_ULC_H
#include
//-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
The class IC_T6_ULC {
Public:
IC_T6_ULC ();
~ IC_T6_ULC ();
ProcName FARPROC execT6_ULC_Proc (char *);
Typedef HANDLE __stdcall TP_IC_InitComm (*) (__int16 port);
Typedef __int16 __stdcall TP_IC_ExitComm (*) (HANDLE idComDev);
Typedef __int16 __stdcall TP_IC_Status (*) (HANDLE idComDev);
Typedef __int16 __stdcall TP_IC_Down (*) (HANDLE idComDev);
Typedef __int16 __stdcall TP_IC_InitType (*) (HANDLE idComDev, __int16 type);
Typedef __int16 __stdcall TP_IC_Read (*) (HANDLE idComDev, __int16 offset, __int16 len, unsigned char * databuffer);
Typedef __int16 __stdcall TP_IC_Write (*) (HANDLE idComDev, __int16 offset, __int16 len, unsigned char * writebuffer);
Typedef __int16 __stdcall TP_IC_CheckCard (*) (HANDLE idComDev);
Typedef __int16 __stdcall TP_IC_ReadVer (*) (HANDLE idComDev, unsigned char * Ver);
Typedef __int16 __stdcall TP_hex2asc (*) (unsigned char * strhex, unsigned char * strasc, __int16 length);
Typedef __int16 __stdcall TP_asc2hex (*) (unsigned char * strasc, unsigned char * strhex, __int16 length);
//
Typedef __int16 __stdcall TP_IC_CpuGetProtocol (*) (HANDLE idComDev);
Typedef __int16 __stdcall TP_IC_CpuReset (*) (HANDLE idComDev, unsigned char * rlen, unsigned char * databuffer);
Typedef __int16 __stdcall TP_IC_CpuApdu (*) (HANDLE idComDev, unsigned char slen, unsigned char * sendbuffer, unsigned char * rlen, unsigned char * databuffer);
Typedef __int16 __stdcall TP_IC_CpuReset_Hex (*) (HANDLE idComDev, unsigned char * rlen, unsigned char * databuffer);
Typedef __int16 __stdcall TP_IC_CpuApdu_Hex (*) (HANDLE idComDev, unsigned char slen, unsigned char * sendbuffer, unsigned char * rlen, unsigned char * databuffer);
Typedef __int16 __stdcall TP_IC_ReadProtection (*) (HANDLE idComDev, __int16 offset, __int16 len, unsigned char * protbuffer);
Typedef __int16 __stdcall TP_IC_ReadProtection_Hex (*) (HANDLE idComDev, __int16 offset, __int16 len, unsigned char * protbuffer);
Typedef __int16 __stdcall TP_IC_ReadWithProtection (*) (HANDLE idComDev, __int16 offset, __int16 len, unsigned char * protbuffer);
Typedef __int16 __stdcall TP_IC_ReadWithProtection_Hex (*) (HANDLE idComDev, __int16 offset, __int16 len, unsigned char * protbuffer);
Typedef __int16 __stdcall TP_IC_WriteProtection (*) (HANDLE idComDev, __int16 offset, __int16 len, unsigned char * protbuffer);
Typedef __int16 __stdcall TP_IC_WriteWithProtection (*) (HANDLE idComDev, __int16 offset, __int16 len, unsigned char * writebuffer);
Typedef __int16 __stdcall TP_IC_WriteProtection_Hex (*) (HANDLE idComDev, __int16 offset, __int16 len, unsigned char * protbuffer);
Typedef __int16 __stdcall TP_IC_WriteWithProtection_Hex (*) (HANDLE idComDev, __int16 offset, __int16 len, unsigned char * writebuffer);
Typedef __int16 __stdcall TP_IC_ReadPass_SLE4442 (*) (HANDLE idComDev, unsigned char * password);
Typedef __int16 __stdcall TP_IC_ReadCount_SLE4442 (*) (HANDLE idComDev);
Typedef __int16 __stdcall TP_IC_CheckPass_SLE4442 (*) (HANDLE idComDev, unsigned char * password);
Typedef __int16 __stdcall TP_IC_ChangePass_SLE4442 (*) (HANDLE idComDev, unsigned char * password);
//
Typedef __int16 __stdcall TP_IC_CheckPass_4442hex (*) (HANDLE idComDev, unsigned char * password);
Typedef __int16 __stdcall TP_IC_ChangePass_4442hex (*) (HANDLE idComDev, unsigned char * password);
Typedef __int16 __stdcall TP_IC_ReadPass_4442hex (*) (HANDLE idComDev, unsigned char * password);
//
Typedef __int16 __stdcall TP_IC_ReadCount_SLE4428 (*) (HANDLE idComDev);
Typedef __int16 __stdcall TP_IC_CheckPass_SLE4428 (*) (HANDLE idComDev, unsigned char * password);
Typedef __int16 __stdcall TP_IC_ChangePass_SLE4428 (*) (HANDLE idComDev, unsigned char * password);
//
Typedef __int16 __stdcall TP_IC_CheckPass_4428hex (*) (HANDLE idComDev, unsigned char * password);
Typedef __int16 __stdcall TP_IC_ChangePass_4428hex (*) (HANDLE idComDev, unsigned char * password);
nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull