Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
27413 Discussions

Registration free COM with COMCreateObjectByGUID not working


I have inherited a fortran executable that makes function calls to a VB.NET dll (called Linker.dll). It looks like the Fortran Module Wizard was used to create an interface module. COMCreateObjectByGUID is then used to create new instances of the COM object. The problem I have is that the executable needs to be deployed on machines that might not have admin rights (meaning I can't register the dll). I've looked into registration free COM using manifests but I can't seem to get this to work. The first question I have is: Does COMCreateObjectByGUID support registration free COM (i.e. am i going down a deadend)? If Registration free COM is possible is there something I'm missing:

  1. I created a dependancy to linker.dll in the additional dependancies section of properties>Linker>Manifest. I set the generate manifest to "Yes" (i also set the embed manifest to "No". partly to check xml and partly because my antivirus was interfering with the embedding process)
  2. I used mt.exe to create a manifest file for linker.dll which contains reference to the clsid and the tlbid
  3. I ran the executable with sxstrace running. The log file shows that it sucessfully loaded and found the necessary manifests.

The application, however, failed to create the necessary object suggesting that either my manifests are not working as intended or the COMCreateObjectByGUID is completely ignoring them and instead looking in the registry. I've attached the two manifests and the sxstrace log.

I'm very new to Fortran and so I don't know what I'm missing

0 Kudos
2 Replies

I have successfully used the tools and advice available on this site to implement regfree com.  They also have a tool available for a small price to generate the manifest (I have no commercial association with mazecomputer by the way).

In my experience the manifest has to be attached to the primary executable.  You don't need a manifest for the COM dlls.  The dlls are listed in the manifest attached to the primary executable.


Hi Peter. Thank you for the reply

I used the maze computer site, and others, to generate the necessary manifest files (attached to the original post). The side by side trace, also attached, confirmed that it had registered everything correctly. I even tested it with minor mistakes in the manifests and the program failed to load with SxS errors. However, when it came to actually using the COM object in the Fortran executable, it refused to load. in your post you say:

"The dlls are listed in the manifest attached to the primary executable."

I think I've correctly registered the COM dll in the solve.exe.manifest file but maybe I haven't?

I also tried strong signing all the components as well to see if this made a difference, but I ran into a few problems with this (a whole other kettle of fish).