I have been given the task to upgrade an existing 16 Bit Desktop application originally written in GFA Basic. I want to know if there is a possibility to access the functions inside these 16 Bit Dlls via C/JNI (or any other programming language). I guess, I have to write some sort of an intermediate DLL to access the functionalities from a Java class (or any other language).
For example DLLTEST has the implementation of the functions
$Library 'LNK Exe d:\DLLtest.dll
Procedure LIBMAIN(hInst&, DSeg&, HpSz&, lpCmd%)
q_dllname$ = "DLLtext.dll" RETVAL 1 ' If LIBMAIN is used, then RETVAL must be TRUE
Return
Procedure WEP(SysExit&) ' ##############################################
// SysExit = 1 - ExitWindows
// SysExit = 0 - DLL vrijgegeven
RETVAL 0 ' ???????????
Return
Procedure TextTest(dc&)
$EXPORT TextTest
SETDC dc&
RGBColor 0
Local t$ = "Hello world" + Chr$(0)
Text 10, 10, t$ Beep
~TextOut(dc&, 10, 50, V:t$, Len(t$))
Beep
Return
The above dll file is in turn used by TESTTEXT.exe
// destination exe file
'LNK Exe d:\testtext.exe
DLL #7, "dlltest.dll"
DECL LONG TextTest(W)
ENDDLL
OpenW # 1
h& = Win(1)
SETDC GetDC(h&)
' RGBCOLOR 0
' GRAPHMODE R2_COPYPEN
~@@TextTest(_DC())
KeyGet k%
CloseW # 1
FreeDll 7
End
I want to rewrite this TESTTEXT.exe using Java/C (or any other moder programming language). I guess, I need to build a bridge between this dll and the new exe by building another dll. I was hoping to get some help about writing this intermediate dll.
Also, let me know if this kind of solution makes sense!
Your help would be highly appreciated. Thanks you for your time.