Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MASM 14: constant expected in winextra.inc

There is an opinion on the Internet that these errors are a trouble in MSVC 2019. However I not found how to solve this problem except advice to install another version of MASM.

winextra.inc from include:

; ...
STD_ALERT struct
    alrt_timestamp dd ?
    alrt_eventname WCHAR  [EVLEN + 1] dup(?)  ; Here is A2026
    alrt_servicename WCHAR [SNLEN + 1] dup(?) ; Here is A2026
STD_ALERT ends
; ...

So how to solve errors A2026 in winextra without reinstallation MASM to another version?

like image 375
iEPCBM Avatar asked Oct 20 '25 04:10

iEPCBM


1 Answers

Older versions of MASM accepted the syntax. The newer versions require replacing the square brackets with parentheses.

; ...
STD_ALERT struct
    alrt_timestamp dd ?
    alrt_eventname WCHAR  (EVLEN + 1) dup(?)  ; Corrected
    alrt_servicename WCHAR (SNLEN + 1) dup(?) ; Corrected
STD_ALERT ends
; ...
like image 89
hs takeuchi Avatar answered Oct 22 '25 03:10

hs takeuchi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!