Results 1 to 39 of 39

Thread: [VB6] Tutorial: Using OCX Files with SxS Technology

Threaded View

  1. #5

    Thread Starter
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    10,909

    Re: [VB6] Tutorial: Using OCX Files with SxS Technology

    (Associating a Manifest File with a VB6 Project, continued)

    You will want to drag your prepared manifest file onto the Resource Editor’s window in just this way. After you’ve done this, you will need to rename its “Type” and “ID”. To do this, double-click the 101 for the manifest file you just added. An “Edit Properties” window will open…

    Name:  resed6.png
Views: 41296
Size:  8.0 KB

    You must change the “Type” to #24 (the # is essential). And then the ID must be changed to 1 (and it must be numeric). Then hit “OK”, and then save the Resource file…

    Name:  resed7.png
Views: 38669
Size:  3.5 KB

    Once you save your resource file, it will be associated with your VB6 project. For example, if your project is named MyProject, your resource file will typically be named MyProject.res, and this will be recorded in the project’s VBP file.

    Furthermore, when you compile your project, this resource file will be wrapped into the executable.

    These resource files can have all kinds of information in them. However, anytime there’s a resource file with a Type of #24 and an ID of 1, the compiled executable will attempt to read and interpret this file as a manifest file.

    If all is done correctly, you will be using OCX files that you have specified (with no referencing of the Windows registry), rather than the OCX files found in C:\Windows\System32 (or C:\Windows\SysWOW64).

    Also, it's been noted that there may be a Windows registry flag named PreferExternalManifest. It might be found under the...

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SideBySide

    ...registry entry as a DWORD entry. If it's found, it'll just be a 0 or 1 boolean-type entry. If it's there, and set to 1, and you have both an internal and external manifest, the external will be preferred. Also, there are a couple of reports (here and here, etc.) for certain versions of Windows that external manifests won't work correctly unless this PreferExternalManifest flag is set to 1. This is all yet another reason that internal manifests (with no external manifest found) are the superior way to go.

    And that's about it. Hopefully, I've provided you with all the information you need to use any/all OCX files you use in a SxS way.

    Good Luck,
    Elroy
    Last edited by Elroy; Oct 1st, 2017 at 02:11 PM.
    Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width