Hi everyone, I've just started with lazarus yesterday and I am a completely pascal newbie...
Anyway, I am trying to compile this delphi program:
https://www.ritlabs.com/en/products/tinyweb/download.phpIt comes with the source code and is easy to unpack and test.
Well, after unpacking the source code I have in a folder a .dpr file which I converted through Lazarus in a .lpi file with the delphi -> free pascal converter, now lazarus lets me open the project.
Next I press ctrl+f9 and in the message log I get this error:
srvmain.pas(2010,52) Error: Wrong number of parameters specified for call to "<Procedure Variable>"
the line is this:
if not ClassRegistered or (TempClass.lpfnWndProc <> @DefWindowProc) then
The main function where the line resides is as follow:
function AllocateHWnd(Method: TWndMethod): HWND;
var
TempClass: TWndClass;
ClassRegistered: Boolean;
begin
UtilWindowClass.hInstance := HInstance;
UtilWindowClass.lpfnWndProc := @DefWindowProc;
ClassRegistered := GetClassInfo(HInstance, UtilWindowClass.lpszClassName,
TempClass);
if not ClassRegistered or (TempClass.lpfnWndProc <> @DefWindowProc) then
begin
if ClassRegistered then
Windows.UnregisterClass(UtilWindowClass.lpszClassName, HInstance);
Windows.RegisterClass(UtilWindowClass);
end;
Result := CreateWindowEx(WS_EX_TOOLWINDOW, UtilWindowClass.lpszClassName,
'', WS_POPUP {!0}, 0, 0, 0, 0, 0, 0, HInstance, nil);
if Assigned(Method) then
SetWindowLong(Result, GWL_WNDPROC, Longint(MakeObjectInstance(Method)));
end;
That is the only error I get at this time, so I think is possible to compile this program in Lazarus
Please help me to find the way, thanks.