Classic Object Pascal for free
I've just ported some (45,000 lines) of BP7 OWL code to 32bit using VP.
Tried to run it and got a kernel.dll missing message, found one, fixed that.
But now I get a "The ordinal 114 could not be located in the DLL kernel.dll".
It does this on both 64 bit Windows 7 and XP (on virtual machine).
Couldn't find anything in the VP documentation or on the web about this.
Any ideas as any help would be appreciated as this would (hopefully) appear to be the last hurdle to clear in getting this program to run?
Don't link to functions by ordinal number (which is win3.x style, and already deprecated since Windows 95, 17 years now), but link by name.(see below example)
Windows 64-bit doesn't support 16-bit subsystems and compatibility features anymore, so in short you are finally making the move to the 32-bit world introduced by Windows 95 :-)
Look in VP's windows headers for the syntax, probably something like this:
function HeapLock(hHeap:HANDLE):WINBOOL; stdcall; external 'kernel32' name 'HeapLock';
Note that due to the extreme gap in technology (win3.x OWL and Windows 7), I would recommend a thorough inspection of the code on a line by line basis, and not just fix-by-compiler/linker error.
Fresh eyes this morning spotted the problem and just like you said. Tucked away in a unit written nearly 20 years ago, probably in TPW1.5? and called from another unit was a direct ordinal call to a kernel function. I'll remember to use grep in future. Brought the code up to date and the program now fires up in Win7 64. Running very badly, but it's a start and at least gives me hope that this is doable.