Manifest to run local dll

Started by bmclellan, October 04, 2013, 09:44:17 AM

Previous topic - Next topic

bmclellan

Hello,

I have run into my own issue with dll's, whereby another company is using the same DLL that I need, however theirs is older, and if I re-write theirs, it breaks the other application.

I was reading up on creating a local manifest which could in turn read the dll in my own directory, and not impact anything else.

I am using WeOnlyDo for my SSH automation, and they provided me with a manifest that they thought should work:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<file name="wodssh.dll">
<typelib
tlbid="{14DE957F-DF6F-46C2-9A51-6B9054E62E98}"
version="1.0"
helpdir="C:\WINDOWS\system32\"/>
<comClass description="wodSSHCom Class"
clsid="{20F48DF6-40B7-4069-8FFD-0627F8F8356E}"
progid="WeOnlyDo.wodSSHCom.1"
threadingModel="apartment"
tlbid="{14DE957F-DF6F-46C2-9A51-6B9054E62E98}" />
</file>
</assembly>

Unfortunately when I create my text file as programname.exe.manifest, it does not work (I only tried under Windows 7).

I  came across the link below: http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/tsleft.web+WinBatch/Manifest+External~Manifest~with~WinBatch.txt and thought this may be my issue but it was some time ago.

Can you tell me if we can create our own external manifests, or do I need to write some kind of program to directly modify my .exe? Or if you know of any other magic to register a dll that is already registered to an older one, that would be great too!


Thanks!
Barry


td

Windows Vista/2008 and newer will ignore any external manifests, when an executable has an embedded manifest.  You can try the executable editing solution suggested in the tech article but there is no guarantee of success.  You could use the WinBatch Browser or some other hex viewer to find the offset and the maximum size of the manifest in your compiled script.  You would then need to determine if you can fit your changes within that space.  Also remember that you cannot codesign the executable until after you modify the executable so you would need to perform codesigning outside of the WinBatch compiler.   
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

bmclellan

Thanks, that's too bad you can't choose whether or not you want to use a manifest or not.

The vendor has come back and asked me to try their ocx version instead of their com version.

I've never used an OCX, from a Winbatch perspective, is this basically the same as using a COM object?


Thanks!
Barry

stanl

Quote from: bmclellan on October 06, 2013, 05:47:12 PM
I've never used an OCX, from a Winbatch perspective, is this basically the same as using a COM object?

An OCX is a COM Object. Once registered you will be able to CreateObject("ocxobject") and use the methods and properties like working with Excel or Word.  If they do not supply the docs for the OCX you can use Tony's Wil Viewer to peek at methods/properties.
Once caution: if the OCX was generated from VB, the VB runtimes would be required in order for the OCX to function.

bmclellan