Re: Running VB6 exe on Windows 7 64bit
- From: Ulrich Korndoerfer <ulrich_wants_nospam@xxxxxxxxxxxx>
- Date: Thu, 12 Nov 2009 17:26:51 +0100
Second repost, the others did not went thru.
Removed some words.
Hi,
Mike Williams schrieb:
> ... I've Googled around and discovered what data needs to go into the manifest to signify that your app is dpi-aware, but I don't know how to embed the manifest into the compiled VB exe file as MMM can do with its RegFree COM manifests. ...
The manifest file has to be embedded as a resource into the exe. You could use one of the tools (eg xxx or mt) that allows to embed files as resources into the compiled exe. Or you can do this by using the VB Ide and the VisualStudio resource compiler (rc.exe):
- Create a text file with the exension .rc, eg. xyz.rc.
- Put some content in it specifying the resource to embed and
under what name/type.
- Compile the .rc file using rc.exe, tell rc.exe to name the result
with the extension .res, eg. xyz.res
- In the VB6 IDE press Ctl-D or open Project menu and tick "Add file..."
May be its named in other way, because I only have a german version,
where it is called "Datei hinzufügen..."
- Select the xyz.res file in the following dialog and you are done.
From now on the compiled resource from the .res file is embedded
in the compiled exe on every compilation. If you want a changed
.res file, just alter the .rc file and compile it again.
Now for the hard part: what to put into the .rc file. Basically the .rc file among other things (like string tables, version information and so on) can tell the resource compiler which files to include in the compiled resource file. For our manifest we need therefore the file name/path. Thats easy. However for manifests the .rc file also must tell under which name/number and under which type the file shall be embedded (they are special for manifests). Name and type can be get by eg. using xxx: open an exe, that has an embedded manifest, and look with xxx how its named and which type it has.
Ok, and then we need to know in which format this information has to be set in the .rc file (which is a plain text file).
I will do some research, results follow later. In the meantime perhaps Google (eg. "Resource file for embedding manifests") could help.
Oops, just did this myself and got under:
<http://blogs.msdn.com/cheller/archive/2006/08/24/718757.aspx>
The .rc file has to contain following three lines:
#define RT_MANIFEST 24
#define APP_MANIFEST 1
APP_MANIFEST RT_MANIFEST ExeName.exe.manifest
where ExeName.exe.manisfest is the name of the manifest file. One could condense above three lines to one line:
1 24 ExeName.exe.manifest
I believe 1 is the number that tells the resource compiler to embed the file as the *first* resource, and 24 is the type number.
> ... Anyway, here's the manifest (watch for newsgroup text wrap on line 2). I'm not sure whether all of it is required, but I'll test that over the next few days. All I need to do now is figure out how to embed it into my compiled execs and then I won't need to distribute the manifest file with my apps :-)
>
> <asmv3:application xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
> <asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
> <dpiAware>true</dpiAware>
> </asmv3:windowsSettings>
> </asmv3:application>
> ...
Thanks for that.
--
Ulrich Korndoerfer
VB tips, helpers, solutions -> http://www.proSource.de/Downloads/
.
- References:
- Running VB6 exe on Windows 7 64bit
- From: Richard Bennice
- Re: Running VB6 exe on Windows 7 64bit
- From: Ulrich Korndoerfer
- Re: Running VB6 exe on Windows 7 64bit
- From: Mike Williams
- Re: Running VB6 exe on Windows 7 64bit
- From: Ulrich Korndoerfer
- Re: Running VB6 exe on Windows 7 64bit
- From: Mike Williams
- Re: Running VB6 exe on Windows 7 64bit
- From: Ulrich Korndoerfer
- Re: Running VB6 exe on Windows 7 64bit
- From: Mike Williams
- Running VB6 exe on Windows 7 64bit
- Prev by Date: Re: Documents & Settings restored
- Next by Date: Re: Documents & Settings restored
- Previous by thread: Re: Running VB6 exe on Windows 7 64bit
- Next by thread: Re: Running VB6 exe on Windows 7 64bit
- Index(es):
Relevant Pages
|