Bom já aviso que não sou muito experiente na linguagem, por isso peço paciência, tenho um pepino para resolver e queri ver se me dão uma Luz.
No código atual eu fazia chamadas a DLL (Bematech) apenas declarando e depois chamando a Função:
Ex:
DECLARE DLL_TYPE_INT Bematech_FI_LeituraX() IN BEMAFI32.DLL
Pois bem, apareceu uma nova Dll que tenho que consumir(Em anexo), porem com uns tipos que não tem no Declare (http://hmgextended.com/files/manual/dllfunctions.htm), uma dessas variaveis seria PINT16, que seria um Point de unsigned short*. Então eu declarei como short.
Vou dar um exemplo de uma função que esta no manual em anexo:
Função no Manual:
void PTI_ClearKey (LPCSTR pszTerminalId, PINT16 piRet)
Dai eu Fiz:
Declaração :
DECLARE DLL_TYPE_VOID PTI_ClearKey (DLL_TYPE_LPCSTR pszTerminalId, DLL_TYPE_USHORT piRet) IN PTI_DLL.DLL
Chamada:
public retorno
PTI_ClearKey("54387",retorno)
msginfo(retorno)
Quando executo, ele simplesmente trava. E no Diretorio aparece o TXT de erro:
Application Internal Error - D:\Auto\Visual\posto7\auto.exe
Terminated at: 2018.05.14 16:12:41
Info: Harbour MiniGUI 1.8 Extended Edition (Build 86) - 2010.08.09
Erro irrecuper vel 6005: Exception error:
Exception Code:C0000005
Exception Address:0F3F44F8
EAX:FFFFF82E EBX:0057EED5 ECX:000001F4 EDX:00000000
ESI:0057EED5 EDI:00000000 EBP:0019F184
CS:EIP:0023:0F3F44F8 SS:ESP:002B:00197460
DS:002B ES:002B FS:0053 GS:002B
Flags:00010246
CS:EIP: 66 89 07 66 85 C0 0F 88 3F 01 00 00 0F B7 F0 33
SS:ESP: 0000000A 0019F18C 0057EED5 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
C stack:
EIP: EBP: Frame: OldEBP, RetAddr, Params...
0F3F44F8 0019F184 0019F1B8 00418C38 0057EED5 00000000 0019F208 0019F28C 00000008 0019F18C 00000000 001B07D0
Modules:
0x00400000 0x0054B000 D:\Auto\Visual\posto7\auto.exe
0x77B20000 0x0018D000 C:\Windows\SYSTEM32\ntdll.dll
0x75060000 0x000D0000 C:\Windows\System32\KERNEL32.DLL
0x76DE0000 0x001D7000 C:\Windows\System32\KERNELBASE.dll
0x74D70000 0x00175000 C:\Windows\System32\USER32.DLL
0x77AB0000 0x00016000 C:\Windows\System32\win32u.dll
0x75550000 0x00022000 C:\Windows\System32\GDI32.dll
0x76B10000 0x0015F000 C:\Windows\System32\gdi32full.dll
0x77430000 0x0007C000 C:\Windows\System32\msvcp_win.dll
0x752C0000 0x00117000 C:\Windows\System32\ucrtbase.dll
0x76CD0000 0x00078000 C:\Windows\System32\ADVAPI32.DLL
0x75200000 0x000BD000 C:\Windows\System32\msvcrt.dll
0x755C0000 0x00043000 C:\Windows\System32\sechost.dll
0x774B0000 0x000BE000 C:\Windows\System32\RPCRT4.dll
0x74540000 0x00020000 C:\Windows\System32\SspiCli.dll
0x74530000 0x0000A000 C:\Windows\System32\CRYPTBASE.dll
0x74D10000 0x00057000 C:\Windows\System32\bcryptPrimitives.dll
0x76D50000 0x00066000 C:\Windows\System32\WS2_32.DLL
0x74F80000 0x000D4000 C:\Windows\System32\COMDLG32.DLL
0x77030000 0x00246000 C:\Windows\System32\combase.dll
0x74EF0000 0x00088000 C:\Windows\System32\shcore.dll
0x77AD0000 0x00045000 C:\Windows\System32\SHLWAPI.dll
0x756B0000 0x01334000 C:\Windows\System32\SHELL32.dll
0x75580000 0x00038000 C:\Windows\System32\cfgmgr32.dll
0x74740000 0x005C6000 C:\Windows\System32\windows.storage.dll
0x74570000 0x0000E000 C:\Windows\System32\kernel.appcore.dll
0x75660000 0x00045000 C:\Windows\System32\powrprof.dll
0x75130000 0x00014000 C:\Windows\System32\profapi.dll
0x779B0000 0x000F7000 C:\Windows\System32\OLE32.DLL
0x75150000 0x00093000 C:\Windows\System32\OLEAUT32.DLL
0x6E6C0000 0x00211000 C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.16299.431_none_5d750ac5a7e1c779\COMCTL32.dll
0x60B10000 0x00022000 C:\Windows\SYSTEM32\MSVFW32.DLL
0x73F50000 0x00019000 C:\Windows\SYSTEM32\OLEPRO32.DLL
0x73720000 0x00024000 C:\Windows\SYSTEM32\WINMM.dll
0x6E4C0000 0x0006C000 C:\Windows\SYSTEM32\WINSPOOL.DRV
0x736F0000 0x00023000 C:\Windows\SYSTEM32\winmmbase.dll
0x72E10000 0x00030000 C:\Windows\SYSTEM32\IPHLPAPI.DLL
0x74430000 0x00019000 C:\Windows\SYSTEM32\bcrypt.dll
0x74580000 0x00025000 C:\Windows\System32\IMM32.DLL
0x73D60000 0x00079000 C:\Windows\system32\uxtheme.dll
0x77280000 0x00144000 C:\Windows\System32\MSCTF.dll
0x74150000 0x00023000 C:\Windows\system32\dwmapi.dll
0x5F3B0000 0x00016000 C:\Windows\system32\asycfilt.dll
0x70630000 0x00077000 C:\Windows\System32\TextInputFramework.dll
0x712A0000 0x0008C000 C:\Windows\System32\CoreMessaging.dll
0x71330000 0x00234000 C:\Windows\System32\CoreUIComponents.dll
0x71570000 0x000CB000 C:\Windows\SYSTEM32\wintypes.dll
0x73A20000 0x00028000 C:\Windows\SYSTEM32\ntmarta.dll
0x0F3F0000 0x0EA02000 D:\Auto\Visual\posto7\PTI_DLL.DLL
Called from CALLDLL(0)
Called from PTI_CLEARKEY(15) in es_bemat.prg
Called from TEST_PTIINIT(109) in es_bemat.prg
Called from (b)POPU_MENU(1454) in auto.prg
Called from _DOCONTROLEVENTPROCEDURE(1715) in h_windows.prg
Called from EVENTS(1365) in h_events.prg
Called from _DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(1450) in h_windows.prg
Called from DOMETHOD(4462) in h_controlmisc.prg
Called from MAIN(745) in auto.prg
------------------------------------------------------------------------
Alguém poderia me dar uma Luz?