Page 1 of 1

Manifest - Reg-Free COM for 3rd party DLL

Posted: Wed Sep 28, 2022 9:31 am
by reganc
We originally had a simple manifest file that we gave out with our application to allow the visual elements of Windows 10 and above to be used and that worked ok.

Recently we looked into including that manifest file as a resource, so we did not have to give out the actual manifest file.

And I got that working ok.

But we also use the Chilkat ActiveX library and it was requested that we include the COM related manifest info for their ActiveX DLL so that our customers would no longer have to register the ActiveX DLL on each workstation manually (the process is referred to as Reg-Free COM).

As is often the case, I cannot get it working correctly. I have read various bits of documentation and forum posts about the subject but it is a little bewildering.

Does anyone know about this sort of stuff?
And if so, have an example of a similar manifest working with an Xbase++ EXE that I could look at to see what I have done wrong?

Re: Manifest - Reg-Free COM for 3rd party DLL

Posted: Wed Sep 28, 2022 11:51 pm
by skiman
Hi Regan,

I don't know if you have seen this?
https://ilx.alaska-software.com/index.p ... ee-com.47/

Re: Manifest - Reg-Free COM for 3rd party DLL

Posted: Thu Sep 29, 2022 8:33 am
by reganc
Thanks, Chris.

I have seen and read it and thought I had understood the general principles mentioned.

But it does not seem to cover the case where you want the manifest to be linked into your EXE as a resource.

If you did this with the example given, I presume you would still have to deploy the external 'activex' manifest file(s) to a sub-folder folder below where the EXE is installed on the users PC.

We are trying to put the whole of the manifest info into the EXE itself so we don't have to deploy the physical manifest files.

I am hoping that maybe I misunderstood something about this process.

Re: Manifest - Reg-Free COM for 3rd party DLL

Posted: Thu Sep 29, 2022 9:50 pm
by Auge_Ohr
hi Regan,

to link a Manifest "into" App use a *.ARC and add

Code: Select all

#define MANIFEST_RESID 1
#define MANIFEST 24

USERDEF MANIFEST
  MANIFEST_RESID = FILE "MY.MANIFEST"
---

for ActiveX you have to add "TAG" into your My.Manifest

Code: Select all

   <file name="my.ocx">
   ...
   </file>
---

you can NOT include *.OCX "as Resource"
*.OCX must be in same Folder as EXE

but i´m not sure if it will work when load from Server as GUID must be "known" by Client-System

Re: Manifest - Reg-Free COM for 3rd party DLL

Posted: Fri Sep 30, 2022 7:07 am
by reganc
Hi Jimmy

It's not an OCX file that is being 'included' using the manifest, it's the Chilkat ActiveX library DLL, in case that makes a difference.

I have already added those lines into our applications ARC file to include our manifest as a resource. The initial version of the manifest was only used to get the Windows Common Controls working to allow visual styles and that works fine.

Chilkat provided a copy of a manifest for their ActiveX DLL in a blog article about Reg-Free COM, so we knew it was possible to get it working.

But the manifest file they provided does not work if I follow the guidelines in the link that Chris mentioned and put it in a subfolder under where the EXE exists.
I also tried using the REGSVR42 tool to produce a new manifest from the Chilkat DLL. Andthen tried using that instead of the one that Chilkat supplied (with modifications to the assembly name as per the Alaska article) but that didn't work either.

The application seems to load Ok which means the manifest was at least properly formatted. But on loading the DLL and trying to get current version of the DLL using the Global class in the DLL, which does not need a licence key, I get an error on accessing the UnlockStatus property.

Re: Manifest - Reg-Free COM for 3rd party DLL

Posted: Sat Oct 01, 2022 3:46 am
by Auge_Ohr
reganc wrote: Fri Sep 30, 2022 7:07 am It's not an OCX file that is being 'included' using the manifest, it's the Chilkat ActiveX library DLL, in case that makes a difference.
a OCX "is" a DLL
reganc wrote: Fri Sep 30, 2022 7:07 am Chilkat provided a copy of a manifest for their ActiveX DLL in a blog article about Reg-Free COM, so we knew it was possible to get it working.
can you please upload "as CODE" Manifest provided by Chilkat

Question : do you "load" EXE from Server and want to use ActiveX this Way :?:

Re: Manifest - Reg-Free COM for 3rd party DLL

Posted: Mon Oct 03, 2022 3:19 am
by reganc
Auge_Ohr wrote: Sat Oct 01, 2022 3:46 am
reganc wrote: Fri Sep 30, 2022 7:07 am It's not an OCX file that is being 'included' using the manifest, it's the Chilkat ActiveX library DLL, in case that makes a difference.
a OCX "is" a DLL
reganc wrote: Fri Sep 30, 2022 7:07 am Chilkat provided a copy of a manifest for their ActiveX DLL in a blog article about Reg-Free COM, so we knew it was possible to get it working.
can you please upload "as CODE" Manifest provided by Chilkat

Question : do you "load" EXE from Server and want to use ActiveX this Way :?:
The Chilkat article I was mentioning is here:

https://cknotes.com/regfree-com-using-o ... gy-in-vb6/

There is a link to a zip file containing the manifest I was talking about.

I didn't quite understand what you were asking about loading the EXE.

Our application comprises of our main EXE and around 40 of our own DLLs.
We distribute these to our customers along with a couple of 3rd Party DLLs (inc Chilkat) and they all go into a single folder.
At present, the manifest file we are using only currently contains the lines to allow visual styles (shown below) and this is currently linked into the EXE and the DLLs as a resource so no external manifest file is needed.

Code: Select all

<?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="Our.exe"
                     type="win32"/>
   <description>Our Application</description>
   <dependency>
      <dependentAssembly>
         <assemblyIdentity type="win32"
                           name="Microsoft.Windows.Common-Controls"
                           version="6.0.0.0"
                           processorArchitecture="X86"
                           publicKeyToken="6595b64144ccf1df"
                           language="*"/>
      </dependentAssembly>
   </dependency>
</assembly>
We want to be able to include the Chilkat manifest 'info' in this same manifest file so that we do not have to register the Chilkat DLL on every PC that runs our application.

Does that clarify things?