i need to call function in CsHis.dll in order to read data from IC card. Followings are parts of coding.
Local m_par02:=3660,m_par01:=space(m_par02),;
m_par03:=1,m_par04:=60,m_par05:=60
m_secStart:=second()
*hisReadPrescriptMain(@m_par01, @m_par02, m_par03 , m_par04 ,@m_par05);
m_ermsg:=calldll32( "hisReadPrescriptMain" , "cshis.dll" ;
,@m_par01,@m_par02,1,60,@m_par05)
Following are reference of CsHis.dll about function hisReadPrescriptMain()
ERRORCODE hisReadPrescriptMain(char *pOutpatientPrescription, int *iBufferLenOutpatient, int iStartPos, int iEndPos,int *iRecCount);
ErrorCode : Error code that hisReadPrescriptMain() returns.
[out]pOutpatientPrescription : data that hisReadPrescriptMain() returns.
[in/out]iBufferLenOutpatient : length of pOutpatientPrescription.
[in]iStartPos : initial position I would like to read in ic card.
[in]iEndPos : end position I would like to read in ic card.
[in/out]*iRecCount: how many number I would to read.
Following are error message in hb_out.log
Application Internal Error - J:\ReadIC\icreader.exe
Terminated at: 2010.12.10 07:26:50
Unrecoverable error 6005: Exception error:
Exception Code:C0000005
Exception Address:10002917
EAX:00000048 EBX:00D22D4C ECX:00000000 EDX:00000000
ESI:0022F355 EDI:0022F391 EBP:0022F4F8
CS:EIP:001B:10002917 SS:ESP:0023:0022F30C
DS:0023 ES:0023 FS:003B GS:0000
Flags:00010246
CS:EIP: 66 83 38 48 66 89 8C 24 92 00 00 00 7E 05 66 C7
SS:ESP: 0022F50C 00000048 74614400 0000000E 00000000 00000000 00000000 A9B70000 0000C1A5 00000000 00000000 00000000 30323143 38383238 36303932 30393030
C stack:
EIP: EBP: Frame: OldEBP, RetAddr, Params...
10002917 0022F4F8 0022F568 004088C1 0053213B 0053214D 00000002 00D22D4C 00000048 00000000 00000000 00000000
004088C1 0022F568 0022F59C 00471A6B 00C4A41C 00C4A57C 00C4A59C 0046506D 00C4A57C 00C4A59C 00000002 0000000B
Modules:
0x00400000 0x001CF000 J:\ReadIC\icreader.exe
0x7C920000 0x00094000 C:\WINDOWS\system32\ntdll.dll
0x7C800000 0x0011F000 C:\WINDOWS\system32\kernel32.dll
0x77DA0000 0x000A7000 C:\WINDOWS\system32\ADVAPI32.DLL
0x77E50000 0x00092000 C:\WINDOWS\system32\RPCRT4.dll
0x77FC0000 0x00011000 C:\WINDOWS\system32\Secur32.dll
0x77180000 0x00103000 C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.5512_x-ww_35d4ce83\COMCTL32.DLL
0x77BE0000 0x00058000 C:\WINDOWS\system32\msvcrt.dll
0x77EF0000 0x00049000 C:\WINDOWS\system32\GDI32.dll
0x77D10000 0x0008F000 C:\WINDOWS\system32\USER32.dll
0x77F40000 0x00076000 C:\WINDOWS\system32\SHLWAPI.dll
0x76320000 0x00047000 C:\WINDOWS\system32\COMDLG32.DLL
0x7D590000 0x007F5000 C:\WINDOWS\system32\SHELL32.dll
0x73B40000 0x00020000 C:\WINDOWS\system32\MSVFW32.DLL
0x76B10000 0x0002A000 C:\WINDOWS\system32\WINMM.dll
0x76990000 0x0013D000 C:\WINDOWS\system32\OLE32.dll
0x770F0000 0x0008B000 C:\WINDOWS\system32\OLEAUT32.DLL
0x72F70000 0x00026000 C:\WINDOWS\system32\WINSPOOL.DRV
0x76300000 0x0001D000 C:\WINDOWS\system32\IMM32.DLL
0x621F0000 0x00009000 C:\WINDOWS\system32\LPK.DLL
0x73FA0000 0x0006B000 C:\WINDOWS\system32\USP10.dll
0x5A410000 0x00037000 C:\WINDOWS\system32\uxtheme.dll
0x74680000 0x0004C000 C:\WINDOWS\system32\MSCTF.dll
0x73640000 0x0002E000 C:\WINDOWS\system32\msctfime.ime
0x10000000 0x001E3000 J:\ReadIC\CsHis.dll
0x71A10000 0x00017000 C:\WINDOWS\system32\WS2_32.dll
0x71A00000 0x00008000 C:\WINDOWS\system32\WS2HELP.dll
0x00F80000 0x00009000 J:\ReadIC\HCAUtility.dll
0x010A0000 0x00013000 J:\ReadIC\Reader.dll
Called from HB_DYNACALL1(0)
Called from CALLDLL32(7930) in c:/hmg/source/h_controlmisc.prg
Called from R_PI(154) in icreader.prg
Called from COM_INIT(115) in icreader.prg
Called from (b)MAIN(27) in icreader.prg
Called from _PROCESSINITPROCEDURE(5082) in c:/hmg/source/h_windows.prg
Called from _ACTIVATEWINDOW(4838) in c:/hmg/source/h_windows.prg
Called from MAIN(102) in icreader.prg
------------------------------------------------------------------------
Plase Help!
Best Regards!