flat assembler
Message board for the users of flat assembler.

Index > Windows > Can't run dialog based app with xpstyle

Author
Thread Post new topic Reply to topic
viki



Joined: 03 Jan 2006
Posts: 40
Location: Czestochowa, Poland
viki 23 Feb 2007, 22:37
Hello,

I've tried to run this madmatt example and it dosn't start until I remove manifest. What is going wrong?

Code:
;** Displays "Hello, Windows Assembly Programmer!" in a message box

format PE GUI 4.0
entry WinMain

include 'win32a.inc'
include 'equates\kernel32.inc'
include 'equates\gdi32.inc'
include 'equates\user32.inc'

section '.data' data readable writeable

msg1 db 'Hello, Windows Assembly Programmer!',0
msg2 db 'Hello Message',0
align 4

section '.code' code readable executable

proc WinMain   hInstance, hPrevInstance, szCmdLine, iCmdShow
     invoke  MessageBox, NULL, msg1, msg2, MB_OK+MB_ICONASTERISK
     return  0
endp

section '.rsrc' resource data readable

directory 24,manifest
resource  manifest,\
          1, LANG_NEUTRAL, winxp
resdata winxp
        file 'C:\fasm\viki\INCLUDE\winxpstyle2.xml'
endres

section '.idata' import data readable writeable

  library kernel32,'KERNEL32.DLL',\
          user32,'USER32.DLL',\
          gdi32,'GDI32.DLL'

  include 'apia/kernel32.inc'
  include 'apia/user32.inc'
  include 'apia/gdi32.inc'
    
Post 23 Feb 2007, 22:37
View user's profile Send private message Reply with quote
Ehtyar



Joined: 26 Sep 2006
Posts: 51
Ehtyar 24 Feb 2007, 00:09
Your manifest is most likely incorrect. This has always worked for me:
Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="x86" publicKeyToken="6595b64144ccf1df" language="*" />
</dependentAssembly>
</dependency>
</assembly>    


Hope this helps, Ehtyar.
Post 24 Feb 2007, 00:09
View user's profile Send private message Reply with quote
viki



Joined: 03 Jan 2006
Posts: 40
Location: Czestochowa, Poland
viki 24 Feb 2007, 01:37
sorry but this is not a point.
Post 24 Feb 2007, 01:37
View user's profile Send private message Reply with quote
Yardman



Joined: 12 Apr 2005
Posts: 244
Location: US
Yardman 24 Feb 2007, 03:38
[ Post removed by author. ]


Last edited by Yardman on 04 Apr 2012, 02:08; edited 1 time in total
Post 24 Feb 2007, 03:38
View user's profile Send private message Reply with quote
madmatt



Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt 24 Feb 2007, 07:07
Hello Viki, What kind of error are you getting?
Post 24 Feb 2007, 07:07
View user's profile Send private message Reply with quote
viki



Joined: 03 Jan 2006
Posts: 40
Location: Czestochowa, Poland
viki 24 Feb 2007, 08:49
Just like Yardman said I was a problem with comctl32. Thanks a lot.

ps. To madmatt I don't know how to check error number becouse I have no message at all.(only let say click and nothing else)
Post 24 Feb 2007, 08:49
View user's profile Send private message Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4624
Location: Argentina
LocoDelAssembly 24 Feb 2007, 13:38
You can also do
Code:
dummy = InitCommonControls    
and that will add such function in the import table and since the DLL will be loaded even if you don't call the function with that is enough.
Post 24 Feb 2007, 13:38
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.