Stop me if you've heard this one... I'm attempting to port a customer written in Clipper (plus a few libraries) into Harbour and running into problems.
Background: The customer app, last modified in 1999, currently runs under WinXP and is experiencing intermittent DOS Error 5 hiccups. ( At one point it seemed to be a conflict with an old virus checking program, but that's less certain now. ). In order to figure out where the problems are coming from I need to make what would normally be a few minor changes; unfortunately -- it's never easy, is it? -- I'm working with uncommented source code recovered from the EXE file and with a limited exposure to Clipper and xBase. Until I can achieve compilable source code that will create a 32-bit equivalent of the original program, I can't make any changes.
At this point I have successfully installed the Harbour Project 3.0 distribution on a fresh new Windows 8 (Gack!) machine. After some effort (mostly writing "wrapper" functions which convert the truncated function names into the longer names which Harbour recognizes) I have a set of roughly 30 source code files which compile without error. (Yes, I'm painfully aware that that isn't the same as "working". <grin> )
Unfortunately, as soon as the app attempts to issue this call:
rddRegister("DBFCDX", 1)
the app dies with these messages:
Unrecoverable error 9004: RDD invalid or failed to load
Called from RDDREGISTER(0)
Called from RDDREGISTE(83) in hb_wrap.prg
Called from MAIN(233) in hb_grant_main.prg
( These messages also get written to the app's error log, so at least some of the code I've ported executes as expected.... okay, as hoped. )
What's frustrating is that the code is blowing up so early on, even before -- as far as I can tell -- any application files are opened. If the app were dying on, say, the first file read this would make much more sense; I wouldn't necessarily understand the cause, but at least I'd recognize it as some sort of setup problem for the files.
Can anyone offer any suggestions on what sort of Harbour-new-bee error might cause this? (Or even a hint that I might be asking the wrong question; it has happened before. )
For what it's worth, the original Cliper app invoked (at least) these libraries:
HP Pro printing library
FlexFile
FUNCky
? something called "Six Driver" ?
I think I've found equivalents for all the functions I recognize as being from the FUNCky library functions, and I'm -- for now -- ignoring the HP printing. I also realize that, once FraI get past the rddRegister() problem I'll have to figure out how to deal with some other file-access routines:
v_superrdd("DBFCDX")
rddregiste("FLEXFILE", 1)
rddregiste("FXDBF", 255)
but that's for another day.
The HBP file for hbmk2 has the following parameters:
#####
-b
-otest.exe
-request=DBFCDX
-main=Main
-w0
-es2
-rebuild
-lhbnf
-lhbct
# RDD support: try throwing in everything
-lrddbm
-lrddads
-lrddcdx
-lrddfpt
-lrddnsx
-lrddntx
-lrddsql
#####
Suggestions, comments, and even a bit of pointing-out-the-obvious will be appreciated.
Frank McKenney
McKenney Associates