When I assemble, link all my programs there's no output screen although the menu choice is selected. Aso no indication of error. Click execute (!), and get message box (OK), saying 'Execution Failed!'.
Using WinAsm Studio v3.0.2.4.

What's wrong?
Posted on 2004-09-24 09:09:57 by chez
Hi chez-

After you hit "Go All", hit menu item View/Output and the output window should show up. Select everything in the output window and paste it here so we can see what's going on. It would be go if you also posted a small project that had this problem that we could look at. I'm having a similar problem right now myself with compiling dos programs, it's some kind of Link problem.
Posted on 2004-09-24 14:56:04 by JimG
My experiences with WinAsm Studio v3.0.2.4 so far.

Functions WinMain, WndProc, and label start have to be named differently in each program. I number them. Eg. WinMain1,2,3 etc. start1,2,3.

If use same name for WinMain, start in two different files get message box with 'Execution Failed!' error. This error appears when try to assemble,link and run any other file on WinAsm Studio. Error cleared by deleting object file of last created file and renaming the WinMain, start etc. Try WinMain1, start1.
Posted on 2004-09-24 21:33:24 by chez
Hi,
When I assemble, link all my programs there's no output screen although the menu choice is selected.?


If View-Output is selceted then probably the settings in your WinAsm.ini are wrong. Change these in your WinAsm.ini and let me know if it is ok now:


DockedTo=4
NoDockLeft=365
NoDockTop=615
NoDockWidth=600
NoDockHeight=267
DockTopHeight=120
DockBottomHeight=180
DockLeftWidth=180
DockRightWidth=180
Visible=1
TitleStyle=0


Restart WinAsm Studio

Now, from Tools-Options-General enable "Show Out On Success"


Aso no indication of error. Click execute (!), and get message box (OK), saying 'Execution Failed!'.
Using WinAsm Studio v3.0.2.4.
What's wrong?


Select "Make-Go All". Hopefully the output window is shown now. Right click on it, select "Copy All Out Text" and paste it here. It will be much easier for me to help you this way.

Regards,

Antonis
Posted on 2004-09-25 04:04:50 by akyprian
The output works fine except when I try to assemble etc this code,



.386
.model flat,stdcall
option casemap:none

include \masm32\include\windows.inc
include \masm32\include\user32.inc
includelib \masm32\lib\user32.lib
include \masm32\include\kernel32.inc
includelib \masm32\lib\kernel32.lib
WinMain12 proto :DWORD,:DWORD,:DWORD,:DWORD

.DATA
ClassName db "MyClass11",0
AppName db "Practice Painting",0
ShowThis db "Test painting to application window",0

.DATA?
hInstance HINSTANCE ?
CommandLine LPSTR ?

.CODE
start12:
invoke GetModuleHandle,NULL
mov hInstance,eax
invoke GetCommandLine
mov CommandLine,eax
invoke WinMain12, hInstance,NULL,CommandLine,SW_SHOWDEFAULT
invoke ExitProcess,eax

WinMain12 proc hInst:HINSTANCE,hPrevInst:HINSTANCE,CmdLine:LPSTR,CmdShow:DWORD

LOCAL wc:WNDCLASSEX
LOCAL msg:MSG
LOCAL hwnd:HWND
mov wc.cbSize,SIZEOF WNDCLASSEX
mov wc.style,CS_HREDRAW or CS_VREDRAW
mov wc.lpfnWndProc, OFFSET WndProc12
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
invoke CreateWindowEx,NULL,ADDR ClassName,ADDR AppName,\
WS_OVERLAPPEDWINDOW,CW_USEDEFAULT,\
CW_USEDEFAULT,CW_USEDEFAULT,CW_USEDEFAULT,NULL,NULL,\
hInst,NULL
mov hwnd,eax
invoke ShowWindow, hwnd,SW_SHOWNORMAL
invoke UpdateWindow, hwnd
.WHILE TRUE
invoke GetMessage, ADDR msg,NULL,0,0
.BREAK.IF(!eax)
invoke TranslateMessage, ADDR msg
invoke DispatchMessage, ADDR msg
.ENDW
mov eax,msg.wParam
ret
WinMain12 endp

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

LOCAL hdc:HDC
LOCAl ps:PAINTSTRUCT
LOCAL rect:RECT

.IF uMsg == WM_DESTROY
invoke PostQuitMessage,NULL
.ELSEIF uMsg == WM_PAINT

invoke BeginPaint, hWnd, ADDR ps
mov hdc,eax
invoke GetClientRect,hWnd,ADDR rect
invoke DrawText,hdc,ADDR ShowThis,-1,ADDR rect,\
DT_SINGLELINE or DT_CENTER or DT_VCENTER
invoke EndPaint, hWnd, ADDR ps
.ELSE
invoke DefWindowProc, hWnd, uMsg, wParam, lParam
ret
.ENDIF
xor eax,eax
ret
WndProc12 endp

end start12
Posted on 2004-09-26 04:33:38 by chez
It works perfectly. 2 spaces ( ) were wrong in your code.

.386 

.model flat,stdcall
option casemap:none

Include \masm32\include\windows.inc
Include \masm32\include\user32.inc
IncludeLib \masm32\lib\user32.lib
Include \masm32\include\kernel32.inc
IncludeLib \masm32\lib\kernel32.lib
WinMain12 proto :DWORD,:DWORD,:DWORD,:DWORD

.DATA
ClassName db "MyClass11",0
AppName db "Practice Painting",0
ShowThis db "Test painting to application window",0

.DATA?
hInstance HINSTANCE ?
CommandLine LPSTR ?

.CODE
start12:
invoke GetModuleHandle,NULL
MOV hInstance,EAX
invoke GetCommandLine
MOV CommandLine,EAX
invoke WinMain12, hInstance,NULL,CommandLine,SW_SHOWDEFAULT
invoke ExitProcess,EAX

WinMain12 Proc hInst:HINSTANCE,hPrevInst:HINSTANCE,CmdLine:LPSTR,CmdShow:DWORD

LOCAL wc:WNDCLASSEX
LOCAL msg:MSG
LOCAL hwnd:HWND
MOV wc.cbSize,SizeOf WNDCLASSEX
MOV wc.style,CS_HREDRAW or CS_VREDRAW
MOV wc.lpfnWndProc, OFFSET WndProc12
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
invoke CreateWindowEx,NULL,ADDR ClassName,ADDR AppName,WS_OVERLAPPEDWINDOW,CW_USEDEFAULT,CW_USEDEFAULT,CW_USEDEFAULT,CW_USEDEFAULT,NULL,NULL,hInst,NULL
MOV hwnd,EAX
invoke ShowWindow, hwnd,SW_SHOWNORMAL
invoke UpdateWindow, hwnd
.WHILE TRUE
invoke GetMessage, ADDR msg,NULL,0,0
.BREAK.IF(!EAX)
invoke TranslateMessage, ADDR msg
invoke DispatchMessage, ADDR msg
.ENDW
MOV EAX,msg.wParam
RET
WinMain12 EndP

WndProc12 Proc hWnd:HWND, uMsg:UINT, wParam:WPARAM, lParam:LPARAM

LOCAL hdc:HDC
LOCAl ps:PAINTSTRUCT
LOCAL rect:RECT

.IF uMsg == WM_DESTROY
invoke PostQuitMessage,NULL
.ELSEIF uMsg == WM_PAINT

invoke BeginPaint, hWnd, ADDR ps
MOV hdc,EAX
invoke GetClientRect,hWnd,ADDR rect
invoke DrawText,hdc,ADDR ShowThis,-1,ADDR rect,\
DT_SINGLELINE or DT_CENTER or DT_VCENTER
invoke EndPaint, hWnd, ADDR ps
.ELSE
invoke DefWindowProc, hWnd, uMsg, wParam, lParam
RET
.ENDIF
xor EAX,EAX
RET
WndProc12 EndP

end start12


I don't understand why you use xxx12.

Regards,

Antonis
Posted on 2004-09-26 07:55:50 by akyprian
Thanks for the correction. Would like to know where those space errors were. WinAsm Studio giving error 'cannot create process' when try to assemble any of my files.

output:

C:\WinAsm\Bin\ML /c /coff /Cp /nologo /I"C:\WinASM\Include" "C:\Documents and Settings\Administrator\My Documents\ASSEMBLY_PROGRAMS\prog7.asm"

Make error: Cannot create process.

Make finished. 1 error(s) occured.


chez
Posted on 2004-09-28 08:53:59 by chez
Hi,

I guess you have already downloaded masm32 package by hutch. In the masm32 folder there is a folder called bin. In there, threre are several essential binaries (assembler, linker etc).

From within WinAsm Studio, go Tools-Options-Files and Paths and set Binary path to C:\masm32\bin. Similarly, Include path should be C:\masm32\include and Library path should be C:\masm32\Lib

I hope it helps,

Antonis
Posted on 2004-09-28 11:08:02 by akyprian
I've set the paths. Files assemble but give errors on link. linking prog7.wap give following errors. prog6.wap, and prog2.wap were assembled and linked previously and gave errors. Where can I find LNK error numbers?

Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

prog6.obj : error LNK2005: _start already defined in prog2.obj
prog7.obj : error LNK2005: _start already defined in prog2.obj
prog7.obj : error LNK2005: _WinMain@16 already defined in prog6.obj
prog7.obj : error LNK2005: _WndProc@16 already defined in prog6.obj
C:\Documents and Settings\Administrator\My Documents\ASSEMBLY_PROGRAMS\prog7.exe : fatal error LNK1169: one or more multiply defined symbols found

Make finished. 4 error(s) occured.


Files and Paths set,

Binary Path C:\masm32\Bin
Include Path C:\masm32\Include
Library Path C:\masm32\Lib
Keyword File C:\WinAsm\KeyFiles\MASM.vas
API Functions C:\WinAsm\Api\MasmApiCallLt.vaa
API Structures C:\WinAsm\Api\MasmApiStruct.vaa
API Cinstants C:\WinAsm\Api\MasmApiConst.vaa
Help File C:\WinAsm\Help\Win32.hlp
Posted on 2004-09-29 20:24:19 by chez
Hi,

MELT Add-In for WinAsm Studio can give you the error number descriptions you want. In your case it is very easy to understand what you are doing wrong. Better upload your project here and I will fix it for you.

Regards,

Antonis
Posted on 2004-09-30 01:02:20 by akyprian
Code,

.386
.model flat,stdcall
option casemap:none

include \masm32\include\windows.inc
include \masm32\include\user32.inc
includelib \masm32\lib\user32.lib
include \masm32\include\kernel32.inc
includelib \masm32\lib\kernel32.lib
WinMain proto :DWORD,:DWORD,:DWORD,:DWORD

.DATA
ClassName db "ClassName7",0
AppName db "Assembly Lang Painting",0
ShowMe db "painting to screen",0

.DATA?
hInstance HINSTANCE ?
CommandLine LPSTR ?
.CODE
start:
invoke GetModuleHandle,NULL
mov hInstance,eax
invoke GetCommandLine
mov CommandLine,eax
invoke WinMain,hInstance,NULL,CommandLine,SW_SHOWDEFAULT
invoke ExitProcess,eax

WinMain proc hInst:HINSTANCE,hPrevInst:HINSTANCE,CmdLine:LPSTR,CmdShow:DWORD
LOCAL wc:WNDCLASSEX
LOCAL msg:MSG
LOCAL hwnd:HWND

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 hInstance
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
invoke CreateWindowEx,NULL,\
ADDR ClassName,\
ADDR AppName,\
WS_OVERLAPPEDWINDOW,\
CW_USEDEFAULT,\
CW_USEDEFAULT,\
CW_USEDEFAULT,\
CW_USEDEFAULT,\
NULL,\
NULL,\
hInst,\
NULL

mov hwnd,eax
invoke ShowWindow,hwnd,CmdShow
invoke UpdateWindow, hwnd

.WHILE TRUE
invoke GetMessage,ADDR msg,NULL,0,0
.BREAK.IF(!eax)
invoke TranslateMessage,ADDR msg
invoke DispatchMessage,ADDR msg
.ENDW
mov eax,msg.wParam
ret
WinMain endp

WndProc proc hWnd:HWND,uMsg:UINT,wParam:WPARAM,lParam:LPARAM
LOCAL hdc:HDC
LOCAL ps:PAINTSTRUCT
LOCAL rect:RECT

.IF uMsg == WM_DESTROY
invoke PostQuitMessage,NULL
.ELSEIF uMsg == WM_PAINT
invoke BeginPaint,hWnd,ADDR ps
mov hdc,eax
invoke GetClientRect,hWnd,ADDR rect
invoke DrawText,hdc,ADDR ShowMe,-1,ADDR rect,\
DT_SINGLELINE or DT_CENTER or DT_VCENTER
invoke EndPaint,hWnd,ADDR ps
.ELSE
invoke DefWindowProc,hWnd,uMsg,wParam,lParam
ret
.ENDIF
xor eax,eax

Ret
WndProc EndP

end start
Posted on 2004-09-30 18:28:30 by chez
It's working for me... Maybe you've placed all files in the same folder? Just guessing here! (?)
Posted on 2004-09-30 19:16:41 by QvasiModo
Hi,

I think Qvasimodo is right. You placed many PROJECTS in the same folder. Three solutions:

1. Use WinAsm Studio V3.0.2.7

OR

2. Use Make-Clean and then Make-Go All

OR

3. Put each project (and all their files) to a different folder


Regards,

Antonis
Posted on 2004-10-01 00:20:55 by akyprian
Yes, all my projects are in the same folder. Downloaded v3.0.2.7 and all my codes are running ok.
Thanks a lot.
Posted on 2004-10-01 01:52:13 by chez