Re:Delphi 2.0 / win 95 API question
There are couple of things here...
1)
'TimeGetTime' is in 'winmm.dll'
not in 'kernel32'.
2)
Secondly, "stdcall" directive has to be included in
proc definition.
(.. i know, not obvious from the manuals..)
StdCall is used for normal Win32 API calling convention
(using stack frame for params).
By default D2 will use new "register-passing"
(also known as("fastcall"); using registers instead of stack for params)
calling convention which I think can only be used for Delphi to Delphi
linkage(ea D2's EXE calling D2 Dll).
Some C++ compilers(Symantec, Borland..) also support this calling convention
but I'm not sure that the use of registers will actually match the one in
Delphi).
For your particular instance it doesn't matter(you don't have any params).
But in the future I hope you'll find this info useful.
Corrections to your code(marked with '>>><<<')
(I checked them, runs fine(NT 4.0beta, didn't check others)):
interface
function TimeGetTime : DWORD; >>>stdcall<<<;
inplementation
Function TimeGetTime : dword; External >>>'winmm.dll'<<< name 'timeGetTime';
KN
P.S.
Another thing if you find that after you start the program de{*word*81} just sits
at the first 'begin' in your program
And after you hit continue generates some {*word*99}py error message(differs between
NT 3.51, NT 4.0b & 95) it probably means that was a problem loading the program
in Windows. So just try to run executable from Explorer or File Manager and that
will give much more informative error message like 'DLL is not found' e.t.c