A Newbie here.

I like the concept of HLA. I'll use the resources to start programming in Assembly :alright: and thankyou.

After a lot of reading, downloading (HLA, Masm32, RadASM, Ollydbg, nmake etc) and setting paths and editing .inc files I have managed to build and run Hello World both through the console and now in RADASM.

I have downloaded the latest versions and believe I have my paths set properly.

The WPA documentation uses Borlands make. The RadASM Hla.inc file is set up for nmake.

I then tried to build the Dialog App (using nmake) supplied with RadASM. Dialog has a makefile.

I changed the line #include ("comctl32.hhf") to #include ("w.hhf") after reading a similar post below. I now get the following:-

Microsoft (R) Program Maintenance Utility Version 1.50
Copyright (c) Microsoft Corp 1988-94. All rights reserved.

hla -w -c Dialog
Error in file "Dialog.hla" at line 17 :
Could not open include file "\RadASM\Hla\Inc\RADbg.inc".
Near: << ) >>

NMAKE : fatal error U1077: 'C:\WINDOWS\system32\cmd.exe' : return code '0x1'
Stop.

Make error(s) occured.

This file exists in its directory and I can open it with Notepad. I commented the line out and then got the following:-

Error in file "Dialog.hla" at line 56 :
Expected ':', encountered '('
(Possible undefined ID 'RADbg').
Near: << ( >>

I edited RadASM. inc XX=RADbg.dll,0 to: XX=RADbg.dll,1 as suggested in the comments. Build All gave:-

Error in file "Dialog.hla" at line 73 :
Expected ':', encountered '('
(Possible undefined ID 'InitCommonControls').
Near: << ( >>

I commented out the InitCommonControls (); call line and Build All gives:-

LINK : fatal error LNK1104: cannot open file "\masm32\lib\comctl32.lib"
Error returned by link = 1104
NMAKE : fatal error U1077: 'C:\WINDOWS\system32\cmd.exe' : return code '0x450'
Stop.

This file exists in it's directory.

If I comment out
#asm
includelib \masm32\lib\comctl32.lib
#endasm

The program buiilds and runs and a small HLA Test window appears with and Exit button. Upon pushing the Exit button I get the Windows Dialog.exe has encountered a problem please tell MSoft box.

This may all seem a bit long winded but could anyone suggest where I'm going wrong.

With thanks.

OBM
Posted on 2003-09-03 21:25:55 by OBM
Originally posted by OBM
A Newbie here.

I like the concept of HLA. I'll use the resources to start programming in Assembly :alright: and thankyou.

You're Welcome!


After a lot of reading, downloading (HLA, Masm32, RadASM, Ollydbg, nmake etc) and setting paths and editing .inc files I have managed to build and run Hello World both through the console and now in RADASM.

I have downloaded the latest versions and believe I have my paths set properly.

The WPA documentation uses Borlands make. The RadASM Hla.inc file is set up for nmake.

I then tried to build the Dialog App (using nmake) supplied with RadASM. Dialog has a makefile.


Someday I'll have to get around to redoing the Dialog app that comes with RadASM. It was one of the two original applications supplied with RadASM (as opposed to being provided with HLA) and suffers a tiny bit from being a "pioneering application." There have been many changes to HLA and RadASM since Dialog was written that have broken this application. It *can* be coerced into running, but....


I changed the line #include ("comctl32.hhf") to #include ("w.hhf") after reading a similar post below. I now get the following:-

Microsoft (R) Program Maintenance Utility Version 1.50
Copyright (c) Microsoft Corp 1988-94. All rights reserved.

hla -w -c Dialog
Error in file "Dialog.hla" at line 17 :
Could not open include file "\RadASM\Hla\Inc\RADbg.inc".
Near: << ) >>

NMAKE : fatal error U1077: 'C:\WINDOWS\system32\cmd.exe' : return code '0x1'
Stop.

Make error(s) occured.


Interesting, I don't get this error at all. You might try putting a drive letter in the path appearing in the #include directive, e.g., << #include( "c:\RadASM\Hla\Inc\RADbg.inc" ) >>.



This file exists in its directory and I can open it with Notepad. I commented the line out and then got the following:-

Error in file "Dialog.hla" at line 56 :
Expected ':', encountered '('
(Possible undefined ID 'RADbg').
Near: << ( >>


That, of course, makes perfect sense as the declaration for the debugging macro no longer exists.


I edited RadASM. inc XX=RADbg.dll,0 to: XX=RADbg.dll,1 as suggested in the comments. Build All gave:-

Error in file "Dialog.hla" at line 73 :
Expected ':', encountered '('
(Possible undefined ID 'InitCommonControls').
Near: << ( >>

I commented out the InitCommonControls (); call line and Build All gives:-

LINK : fatal error LNK1104: cannot open file "\masm32\lib\comctl32.lib"
Error returned by link = 1104
NMAKE : fatal error U1077: 'C:\WINDOWS\system32\cmd.exe' : return code '0x450'
Stop.


This is one of those problems because Dialog.hla was written early on by a non-HLA programmer. When you include "w.hhf" all of the Windows' identifiers appear in the "w" namespace. This means that calls to Win32 API functions like "InitCommonControls" need a "w." prefix (i.e., w.InitCommonControls"). Originally, you could include files like "kernel32.hhf" outside of the w namespace. But that has changed in the "w.hhf" header file. So now you need to specify the "w." prefix for most Win32 API names. Note that Dialog includes its own "win.inc" file, so you can use some constants (defined in this header file) without the "w." prefix, but the API functions are a different matter. Of course, you could define the prototypes for these functions yourself, but it's just easier to stick a "w." prefix in front of the existing names.



This file exists in it's directory.

If I comment out
#asm
includelib \masm32\lib\comctl32.lib
#endasm

The program buiilds and runs and a small HLA Test window appears with and Exit button. Upon pushing the Exit button I get the Windows Dialog.exe has encountered a problem please tell MSoft box.



Interesting that it builds. You should have gotten a linker problem.
The Dialog app does fire a "RadASM" debug breakpoint, the fact that this asks you to contact MS probably means that something didn't get linked in properly.


This may all seem a bit long winded but could anyone suggest where I'm going wrong.

With thanks.

OBM


The best suggestion I can make is to give up on the dialog project. It can be made to work with a bit of effort, but it does require that you understand what's going on.
The latest WPA examples provide RadASM files for make.exe, nmake.exe, and batch files, and they all work with the latest and greatest version of HLA. So I'd recommend playing around with those RadASM projects. Like I said, I really ought to redo the dialog app that ships with RadASM (it's basically a conversion of some MASM code supplied with the MASM version of RadASM). As usual, so many projects, so little time...
Cheers,
Randy Hyde
Posted on 2003-09-05 10:34:53 by rhyde
Many Thanks - will work on AoA & WPA
Posted on 2003-09-05 22:09:02 by OBM
Randall, I made the changes you suggested and I also cleared the breakpoints (Edit/Clear BreakPoints) before building as I don't have a JIT debugger installed (KetilO's suggestion).

It worked like a treat and no Windows Error box.

Many thanks all.
:)
Posted on 2003-09-05 22:30:43 by OBM