News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

Continuation of google maps and web control app

Started by minor28, January 30, 2014, 06:50:47 AM

Previous topic - Next topic

dedndave


minor28

I have not tested on xp before. Now I have and I got the same error as you.

I have compiled with masm32 and ml version 6.14.

jj2007

#17
Quote from: minor28 on April 20, 2014, 05:03:42 PM
I have compiled with masm32 and ml version 6.14.

fatal error A1012: error count exceeds 100; stopping assembly

- did you modify includes of the original Masm32 package?
- did you rely on environment variables, e.g. path to Masm32 includes?
- did anybody else succeed in building this?

GoneFishing

I've got the same fatal error A1012
Could you provide your build.bat or the command lines that you use to build it?

minor28


jj2007

Solar.inc:
include windows.inc
include kernel32.inc
include user32.inc
include comctl32.inc
include shlwapi.inc
include oleaut32.inc
include ole32.inc
include gdi32.inc
include gdiplus.inc
include advapi32.inc

includelib kernel32.lib
includelib user32.lib
includelib comctl32.lib
includelib shlwapi.lib
includelib oleaut32.lib
includelib ole32.lib
includelib gdi32.lib
includelib gdiplus.lib
includelib advapi32.lib


So you are using environment variables, and apparently they are not pointing to \Masm32\include or \Masm32\includelib but to some other package. That's why it doesn't build on our PCs, probably.

minor28

#21
Yes I am using RadAsm.

My makefile is:
c:/masm32/bin/rc.exe Solar.rc
c:/masm32/bin/ml.exe /c /coff /Cp Solar.asm
c:/masm32/bin/link.exe /SUBSYSTEM:WINDOWS /RELEASE /VERSION:4.0 /LIBPATH:c:\masm32\lib Solar.obj Solar.res

I attach a new Solar.inc with full path to includes.

The crash appears in the _FloatToString process written in Helpfunctions.asm ,at least for win xp. I will look into that later.

jj2007

Quote from: minor28 on April 20, 2014, 08:07:36 PM
I attach a new Solar.inc with full path to includes.

Thanks. The problem is with several "non-benign" redefinitions of structures. You include Windows.inc but redefine certain structures elsewhere, e.g.
MONITORINFO
ImageCodecInfo

GdiPlusStruct.inc, line 25: incorrect initializers : EncoderParameter

EncoderParameter struct
   pGUID GUID <>                          ; GUID of the parameter
   NumberOfValues DWORD ?                 ; Number of the parameter values; usually 1
   vType DWORD ? ; EncoderParameterValueType - Value type, like ValueTypeLONG  etc.
   value DWORD ?                          ; A pointer to the parameter values
EncoderParameter ends

EncoderParameters struct
   Count DWORD ?                         ; Number of parameters in this structure; Should be 1
   Parameter EncoderParameter <>         ; Parameter values; this CAN be an array!!!! (Use CopyMemory and a string or byte array as workaround)
EncoderParameters ends


If it works for you, then the only explanation I see is that your \Masm32\include\Windows.inc is modified. AFAIK all assemblers of the Masm/Jwasm family choke on structure redefinitions, even if they appear identical. Check this:

include \masm32\include\masm32rt.inc

RECT STRUCT
  left    DWORD      ?   ; <<<< DANGEROUSLY MODIFIED!!!
  top     dd      ?
  right   dd      ?
  bottom  dd      ?
RECT ENDS


.code
AppName   db "Masm32:", 0
rc   RECT <?>

start:   MsgBox 0, "Hello World", addr AppName, MB_OK
   exit

end start


It is therefore never a good idea to re-write structures that are already present in Windows.inc.

P.S.: Attention the snippet with the "dangerously modified" RECT does assemble with JWasm (a more intelligent assembler than ML...)

MichaelW

Quote from: minor28 on April 20, 2014, 06:55:56 PM
Nothing in masm32 is modified.

Then how did you build your app? To pick just one example windows.inc defines ARGB as:

ARGB typedef DWORD


And in your project.inc:

ifndef ARGB
ARGB macro a:REQ,r:REQ,g:REQ,b:REQ ;;ARGB(a,r,g,b)
exitm %(((a and 0ffh) shl 24) or ((r and 0ffh) shl 16) or ((g and 0ffh) shl 8) or (b and 0ffh))
endm
endif


So ML returns:

DrawDiagram.asm(36) : error A2136: too many arguments to INVOKE
DrawDiagram.asm(36) : error A2207: missing right parenthesis in expression
DrawDiagram.asm(36) : error A2114: INVOKE argument type mismatch : argument : 1

Well Microsoft, here's another nice mess you've gotten us into.

minor28

As far as I know I have never modified windows.inc. I never re-write structures I only write the structure if it is not found. I don't have the ARGB typedef DWORD in my windows.inc. Windows.inc Version 1.4c RELEASE April 2008

RECT STRUCT is in windows.inc. I have not written that structure

MichaelW

QuoteI don't have the ARGB typedef DWORD in my windows.inc. Windows.inc Version 1.4c RELEASE April 2008

Ok, that explains at least some of the problems. The current windows.inc, and the version that I expect most of us are using, is Version 1.6 RELEASE January 2012.
Well Microsoft, here's another nice mess you've gotten us into.

GoneFishing

Quote from: MichaelW on April 20, 2014, 09:40:37 PM
...
Ok, that explains at least some of the problems. The current windows.inc, and the version that I expect most of us are using, is Version 1.6 RELEASE January 2012.

That's right, I use the latest MASM32 pack with
QuoteWINDOWS.INC for 32 bit MASM (Version 1.6 RELEASE January 2012)



minor28

#27
Ok. Now I have downloaded masm32 r11 and made som adjustments in my code. I can compile and the app works for me on win7 32.

New upload and I have also attached a makefile.bat

jj2007

Great, now it assembles fine but shows a box "Requst failed", then chokes at GetLatLngStrings because ...
00409F96            ³>  803E 2C           +cmp byte ptr [esi], 2C
... there is nowhere a 2C aka "comma" in the string. Just zeros, nothing else...

So why does invoke RunMethod,ppIXMLHTTPRequest,WSTR("send"),DISPATCH_METHOD,NULL,0 fail?

minor28

Quote
So why does invoke RunMethod,ppIXMLHTTPRequest,WSTR("send"),DISPATCH_METHOD,NULL,0 fail?

This call only send a request to retrieve time zone data such as daylight saving time and time offset. It has nothing to do with the GetLatLngStrings proc. I think mouse move is causing the error. I will try to see what's wrong.