Jump to content
Xtreme .Net Talk

Recommended Posts

  • Administrators
Posted

Not tried this but you should be able to compile a valid manifest (like the one in the linked article) to a .res file with the rc.exe utility. You would need to generate a .rc file that refers to the manifest.

 

Firstly create a file call .rc

#define CREATEPROCESS_MANIFEST_RESOURCE_ID 1
#define RT_MANIFEST                     24

CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST ".manifest"

Then compile it with the following command line

RC.EXE /r /fo .res .rc

 

You can then add the resulting .res file to you VB6 project. Haven't tried it (no VB6 handy) but I've used a similar trick in the past to build custom resource files for VB6 and it has worked fine....

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Posted

Hi again :)

Many thanks for your help, yes I am familiar with the rest of process, but because I have to enable visual styles also, I got a problem, here is my manifest file:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
 <assemblyIdentity version="1.0.0.0"
    processorArchitecture="X86"
    name="company.file.exe"
    type="win32"/>

 <description>My Software.</description>
 <dependency>
   <dependentAssembly>
     <assemblyIdentity processorArchitecture="X86"
         name="Microsoft.Windows.Common-Controls"
         type="win32"
         language="*"
         publicKeyToken="6595b64144ccf1df"/>
   </dependentAssembly>
 </dependency>

 <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
   <security>
     <requestedPrivileges>
       <requestedExecutionLevel
         level="requireAdministrator"
         uiAccess="false"/>
       </requestedPrivileges>
      </security>
 </trustInfo>
</assembly>

And here is my rc file:

#define CREATEPROCESS_MANIFEST_RESOURCE_ID 1
#define RT_MANIFEST                     24
#define CONTROL_PANEL_RESOURCE_ID       123

CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST             "file.exe.manifest"

But after compile and run I got this error:

 

The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log for more detail.

 

It was working correctly when I was only enabling visual styles, but not now, I think the problem is from manifest!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...