flat assembler
Message board for the users of flat assembler.
Index
> Windows > How to set a xp manifest sigh? |
Author |
|
Reverend 06 Nov 2005, 17:03
|
|||
06 Nov 2005, 17:03 |
|
BXM 06 Nov 2005, 19:00
Here's how to update the example /FASM/EXAMPLES/DIALOG
This code is from an elder update of Thomas Grysztar but today obsolete due to the evolution of FASM syntax http://board.flatassembler.net/topic.php?t=170 Ok here we go. Open the folder /FASM/EXAMPLES/DIALOG Add a new file called manifest.xml which contains Code: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> <assemblyIdentity processorArchitecture="x86" version="5.1.0.0" type="win32" name="DIALOG.exe"/> <description>Mx XP Program</description> <dependency> <dependentAssembly> <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" publicKeyToken="6595b64144ccf1df" language="*" processorArchitecture="x86"/> </dependentAssembly> </dependency> </assembly> Now Open DIALOG.ASM it is in /FASM/EXAMPLES/DIALOG After label "start:" just above "invoke GetModuleHandle,0" add: Code: invoke InitCommonControls In section '.idata' add a new library (Dont forget the ,\ to continue the same line): Code: comctl,'COMCTL32.DLL' To declare the function we want to import (that we invoked at the beginning) add after the imports from user: Code: import comctl,\ InitCommonControls,'InitCommonControls Lastly in the section '.rsrc' add Code: RT_MANIFEST = 24 Modify the line Code: directory RT_DIALOG,dialogs So that it looks like this: Code: directory RT_DIALOG,dialogs,\ RT_MANIFEST,manifests Then add a new ressource entry: Code: resource manifests,\ 1,LANG_ENGLISH+SUBLANG_DEFAULT,manifest At the very end of the file add Code: resdata manifest
file 'manifest.xml'
endres At this point, the code is ready for compile. But you can have the same result without an external XML file: Just modify the latest section "resdata manifest" to be like this: Code: resdata manifest db '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>',13,10 db '<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">',13,10 db '<assemblyIdentity name="DIALOG2.exe" processorArchitecture="x86" version="5.1.0.0" type="win32"/> ',13,10 db '<description>no</description>',13,10 db '<dependency>',13,10 db '<dependentAssembly>',13,10 db '<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="x86" publicKeyToken="6595b64144ccf1df" language="*" />',13,10 db '</dependentAssembly>',13,10 db '</dependency>',13,10 db '</assembly>',13,10 endres In both cases you won't need to release the XML file with your application as the XML code is embedded in the exe. |
|||
06 Nov 2005, 19:00 |
|
shism2 06 Nov 2005, 23:22
C:\Documents and Settings\Owner\Desktop\crap\fasmexp\freaker.asm [331]:
directory RT_DIALOG,dialogs,\ C:\WinAsm\Assemblers\fasm\INCLUDE\macro/resource.inc [19] directory [14]: dd type,80000000h+label-root@resource error: undefined symbol. This is what I have right now.. section '.rsrc' resource from 'res1.res' data readable RT_MANIFEST = 24 directory RT_DIALOG,dialogs,\ RT_MANIFEST,manifests resource manifests,\ 1,LANG_ENGLISH+SUBLANG_DEFAULT,manifest resdata manifest db '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>',13,10 db '<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">',13,10 db '<assemblyIdentity name="DIALOG2.exe" processorArchitecture="x86" version="5.1.0.0" type="win32"/> ',13,10 db '<description>no</description>',13,10 db '<dependency>',13,10 db '<dependentAssembly>',13,10 db '<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="x86" publicKeyToken="6595b64144ccf1df" language="*" />',13,10 db '</dependentAssembly>',13,10 db '</dependency>',13,10 db '</assembly>',13,10 endres |
|||
06 Nov 2005, 23:22 |
|
madmatt 07 Nov 2005, 06:58
Here is a converted fasmw examlple that uses the WindowsXP '.xml' style sheet.
|
|||
07 Nov 2005, 06:58 |
|
shism2 07 Nov 2005, 20:38
App just closes...Doesn't even start
where you do the cmp eax,0 after dialogparama.. eax = FFFFFFFF |
|||
07 Nov 2005, 20:38 |
|
shism2 08 Nov 2005, 01:51
So Im guessing it doesnt work with external resources?
|
|||
08 Nov 2005, 01:51 |
|
madmatt 08 Nov 2005, 08:57
Here's an even simpler example. Run the executable first, and see if this works. Shouldn't try to recompile the code, I modified many things in my include files/macros. Just gave the source so you can have an idea of how to do it.
|
|||
08 Nov 2005, 08:57 |
|
shism2 08 Nov 2005, 21:06
Messagebox doesn't appear.. I don't understand why this isn't working damnit.
|
|||
08 Nov 2005, 21:06 |
|
decard 08 Nov 2005, 22:01
well, it appears on my system
|
|||
08 Nov 2005, 22:01 |
|
shism2 09 Nov 2005, 00:18
What could make this not appear?
|
|||
09 Nov 2005, 00:18 |
|
BXM 09 Nov 2005, 00:30
Sorry that I followed a certain step by step tutorial to recompile FASMW: it is cool. (By the way the exe is 112Kb, compiled in 0.3 seconds... ;^)
Perhaps you have an older compiler? |
|||
09 Nov 2005, 00:30 |
|
shism2 09 Nov 2005, 00:42
I have the newest one ... I don't understand why it won't execute ... It's very odd.. Does it work for everyone?
|
|||
09 Nov 2005, 00:42 |
|
madmatt 09 Nov 2005, 03:22
Sorry your having so much trouble shism2. Try copying the resource info from my hello example into your hello example that came with fasm. Then recompile using your compiler setup. You can also try turning off your anti-virus software temporarly.
|
|||
09 Nov 2005, 03:22 |
|
shism2 09 Nov 2005, 03:44
ya I did try that but the same thing happens. Anyone have any ideas why this is happening?
FIXED : On sp2 it seems invoke InitCommonControls is not needed I run sp1 and a call to invoke InitCommonControls is needed before any xp styles can be displayed ( the messagebox) |
|||
09 Nov 2005, 03:44 |
|
vbVeryBeginner 09 Nov 2005, 04:22
Quote: I run sp1 and a call to invoke InitCommonControls is needed before any xp styles can be displayed ( the messagebox) then they are wrong http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/common/functions/initcommoncontrolsex.asp msdn wrote:
|
|||
09 Nov 2005, 04:22 |
|
shism2 09 Nov 2005, 04:39
That is a different api and either way I tested it and that's how it works on mine
on sp1 if I don't use initcommoncontrols the messagebox doesn't even pop up. While sp2 I don't have to use the api |
|||
09 Nov 2005, 04:39 |
|
madmatt 09 Nov 2005, 22:57
Glad you got it working ! So I can understand this, sp1 (and earlier?) requires a call to initcommoncontrols so you can see the new features, but in sp2 the function is not needed? Never would have accured to me that this was the problem.
|
|||
09 Nov 2005, 22:57 |
|
shism2 09 Nov 2005, 23:53
You are using sp2?
It was really just luck I figured it out.. I remember someone before told me to use that api and I tried it and WELL it worked ! |
|||
09 Nov 2005, 23:53 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.