Hello: because it gives me this error? in HLA with RAdAsm :(
hla -w -c Prueba2
Warning in file "Prueba2.hla" at line 71 [errid:8000/codegen.c]:
Non-NULL numeric constant passed as string parameter.
Near: << , >>
Assembling: Prueba2.asm
Make finished.
Total compile time 1391 ms
the code is:
begin Dialog;
68 w.InitCommonControls ();
69 w.GetModuleHandle ( 0 );
70 mov ( eax , hInstance );
71 w.DialogBoxParam ( eax ,IDD_DLG01 , 0 , &DialogProc , 0 );
72 w.ExitProcess ( 0 );
end Dialog;
(I have put the number of lines ... which does not mean that it is in the code the numbers of lines) :'(
Hi
The problem is that hla by default wants the dialog name as a string, radasm default uses name as a number.
There are several ways to solve this. One is to create a new prototype in hla.
DialogBoxParam : Procedure ( P0 : DWORD;P1 : DWORD;P2 : DWORD;P3 : DWORD;P4 : DWORD );@stdcall;returns( "eax" );external( "__imp__DialogBoxParamA@20");
Included a test project.
KetilO
[attachment deleted by admin]
Thank you KetilO ... but it gives me more errors ... the code that you sent to me.
Expected ':', encountered '.'
(Possible undefined ID 'w').
Near: << . >>
Make error(s) occured.
Total compile time 234 ms
here:
begin RADebug;
pushfd;
pushad;
w.GetLastError (); <--------------------ERROR HERE
pushd (eax);
mov ([esp+52], ebx);
pushd (esp);
pushd (52);
pushd (0);
w.SendMessage (ebx, w.WM_COPYDATA, -1, esp);
Hello,
That's just a 'warning' which in this case is harmless, you can ignore it.
To quiet it down, just insert the HLA keyword "val" just before IDD_DLGO1
w.DialogBoxParam ( eax , val IDD_DLG01 , 0 , &DialogProc , 0 );