News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

MASM32 version 11 pre-Release 3

Started by hutch--, November 24, 2011, 07:36:25 AM

Previous topic - Next topic

hutch--

mineiro,

Thanks for making the effort, it is appreciated. I had to track down an unusual quirk in the MASM macro engine and what I have done is minimise the conditional blocks and in this instance avoid the use of GOTO even though it is valid MASM macro syntax. There appears to be an obscure bug in some of the conditional block operators that generate an ELSE clause error even when there is no else clause. This is the version that is test up OK at the moment.



  ; -----------------------------------------
  ; non branching version with no ELSE clause
  ; -----------------------------------------
      chr$ MACRO any_text:VARARG
        LOCAL txtname
        .data
          IFDEF __UNICODE__
            WSTR txtname,any_text
            align 4
            .code
            EXITM <OFFSET txtname>
          ENDIF

          txtname db any_text,0
          align 4
          .code
          EXITM <OFFSET txtname>
      ENDM
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

Biterider

Hi Hutch
I want to report a bug in the new Windows.inc file (Version 1.5 RELEASE October 2011).

The lines IFDEF __UNICODE__
    TBBUTTONINFO equ TBBUTTONINFOW
    LPTBBUTTONINFO typedef ptr TBBUTTONINFOW
ELSE
    TBBUTTONINFO equ TBBUTTONINFOA
    LPTBBUTTONINFO typedef ptr TBBUTTONINFOA
ENDIF


should beIFDEF __UNICODE__
    TBBUTTONINFO equ <TBBUTTONINFOW>
    LPTBBUTTONINFO typedef ptr TBBUTTONINFOW
ELSE
    TBBUTTONINFO equ <TBBUTTONINFOA>
    LPTBBUTTONINFO typedef ptr TBBUTTONINFOA
ENDIF


Regards, Biterider

dedndave

QuoteI want to report a bug in the new Windows.inc file (Version 1.5 RELEASE October 2011).

has it officially been released ?

Biterider

Hi Hutch
Another minor problem is the IUnknown declaration in winextra.inc, which stays in conflict with the most basic COM interface/structure definition.

IUnknown   equ  void


I would suggest to comment it out.

Regards, Biterider

hutch--

Biterider,

Thanks, that makes sense, I cannot find any form of "typedef void" that even comes close to anything that can be defined in MASM.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

xandaz

   Where's the masm11 test version? I only see masm10r

Gunner

~Rob (Gunner)
- IE Zone Editor
- Gunners File Type Editor
http://www.gunnerinc.com

xandaz


Biterider

Hi Hutch
I have another catch. Should be:

IFDEF __UNICODE__
    NMHDDISPINFO equ <NMHDDISPINFOW>
    LPNMHDDISPINFO typedef ptr NMHDDISPINFOW
ELSE
    NMHDDISPINFO equ <NMHDDISPINFOA>
    LPNMHDDISPINFO typedef ptr NMHDDISPINFOA
ENDIF


Biterider

hutch--

If you need the extra pointer you would be better to add it in an external file as all of the structures are done much the same way in only having the name equated to either ASCII or UNICODE depending on the __UNICODE__ equate.


  IFDEF __UNICODE__
    LPNMHDDISPINFO typedef ptr NMHDDISPINFOW
  ELSE
    LPNMHDDISPINFO typedef ptr NMHDDISPINFOA
  ENDIF


This is the format in the vc2010 header file.


typedef struct tagNMHDDISPINFOW
{
    NMHDR   hdr;
    int     iItem;
    UINT    mask;
    LPWSTR  pszText;
    int     cchTextMax;
    int     iImage;
    LPARAM  lParam;
} NMHDDISPINFOW, *LPNMHDDISPINFOW;

typedef struct tagNMHDDISPINFOA
{
    NMHDR   hdr;
    int     iItem;
    UINT    mask;
    LPSTR   pszText;
    int     cchTextMax;
    int     iImage;
    LPARAM  lParam;
} NMHDDISPINFOA, *LPNMHDDISPINFOA;
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

Biterider

Hi Hutch
Sorry, I was not clear enough. It was too late in the morning  :(
The original definition looks like
NMHDDISPINFO equ NMHDDISPINFOW
and
NMHDDISPINFO equ NMHDDISPINFOA

Here, the square brackets are missing.

Regards,
Biterider