Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8454963
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T12:09:48+00:00 2026-06-10T12:09:48+00:00

I’m following Iczelion’s Win32 tutorials, specifically tutorial 3 (A Simple Window), and when trying

  • 0

I’m following Iczelion’s Win32 tutorials, specifically tutorial 3 (“A Simple Window”), and when trying to “strip out” some of the error handling and unnecessary code for the sake of experimentation, I get the following error when compiling:

test.asm(38) : error A2111: conflicting parameter definition.

Here is the line:

Line 38:

WinMain proc hInst:HINSTANCE,hPrevInst:HINSTANCE,CmdShow:DWORD

My question is: What is wrong with this line of code?

Thanks in advance.

EDIT:

Here is the entire script, with the offending line commented in:

.386 

.model flat, stdcall 
option casemap :none 

WinMain proto :DWORD,:DWORD,:DWORD,:DWORD

include \masm32\include\windows.inc 
include \masm32\include\user32.inc 
include \masm32\include\kernel32.inc 
include \masm32\include\gdi32.inc 
includelib \masm32\lib\user32.lib 
includelib \masm32\lib\kernel32.lib 
includelib \masm32\lib\gdi32.lib

.data 

    ClassName db "Testwin", 0
    AppName db "Testing Window", 0

.data?

    hInstance HINSTANCE ?

.code 
start: 

    push NULL
    call GetModuleHandle
        mov  hInstance,eax
    push SW_SHOWDEFAULT
    push NULL
    push hInstance
    call WinMain
    push eax
        call ExitProcess

WinMain proc hInst:HINSTANCE,hPrevInst:HINSTANCE,CmdShow:DWORD   ; this is the line
; local vars:
LOCAL wc:WNDCLASSEX 
    LOCAL msg:MSG 
    LOCAL hwnd:HWND

; defining the window:
    mov   wc.cbSize,SIZEOF WNDCLASSEX 
    mov   wc.style, CS_HREDRAW or CS_VREDRAW 
    mov   wc.lpfnWndProc, OFFSET WndProc 
    mov   wc.cbClsExtra,NULL 
    mov   wc.cbWndExtra,NULL 
    push  hInst 
    pop   wc.hInstance 
    mov   wc.hbrBackground,COLOR_WINDOW+1 
    mov   wc.lpszMenuName,NULL 
    mov   wc.lpszClassName,OFFSET ClassName 
    invoke LoadIcon,NULL,IDI_APPLICATION 
    mov   wc.hIcon,eax 
    mov   wc.hIconSm,eax 
    invoke LoadCursor,NULL,IDC_ARROW 
    mov   wc.hCursor,eax 
    invoke RegisterClassEx, addr wc 
;create the window
    invoke CreateWindowEx,NULL,ADDR ClassName,ADDR AppName,\ 
           WS_OVERLAPPEDWINDOW,CW_USEDEFAULT,\ 
           CW_USEDEFAULT,CW_USEDEFAULT,CW_USEDEFAULT,NULL,NULL,\ 
           hInst,NULL
    invoke ShowWindow,hwnd,CmdShow
WinMain endp

WndProc proc hWnd:HWND, uMsg:UINT, wParam:WPARAM, lParam:LPARAM   
    cmp uMsg, WM_DESTROY
    jne _next
    invoke PostQuitMessage, NULL
_next:

WndProc endp      
end start    

Hope this helps.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T12:09:50+00:00Added an answer on June 10, 2026 at 12:09 pm

    The three error messages explain exactly what you did wrong.

    test.asm(38) : error A2111: conflicting parameter definition.
    

    Look at your prototype again:

    WinMain proc hInst:HINSTANCE,hPrevInst:HINSTANCE,CmdShow:DWORD
    

    The parameters to WinMain conflict with a previous declaration. If you look at the earlier declaration, you’ll see that the parameter lists are different.

    The next error:

    test.asm(69) : error A2008: syntax error: WndProc
    

    Let’s look at that line:

    WndProc WndProc proc hWnd:HWND, uMsg:UINT, wParam:WPARAM, lParam:LPARAM
    

    Syntax error means that you violated the grammar. In this case, it’s because the assembler couldn’t figure out what to do with the second WndProc; repeating WndProc is not legal here.

    Third error:

    test.asm(75) : fatal error A1010: unmatched block nesting: WndProc
    

    Since the WndProc procedure never got properly started, your attempt to end it was invalid.

    TL;DR: Read the error messages. They will explain what you did wrong.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have just tried to save a simple *.rtf file with some websites and
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
Specifically, suppose I start with the string string =hello \'i am \' me And
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I am doing a simple coin flipping experiment for class that involves flipping a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.