Node.js | Server communication to C++ component | register C++ COM Component using manifest dependencies

Hi Experts,
We have a requirement to consume C++ COM Component from C++ DLL (MFC 64 bit DLL). This MFC DLL in turn shall be invoked via Node.exe on some action on the web browser.
WEB BROWSER ------> NODE.exe (server) -------------> MFC.DLL (64 bit) -------------> C++ COM .DLL (64 bit).
We don't want to register the COM component explicitly (using regsvr32.exe) on the deployment machine. This is an explicit requirement from our clients. Instead they want us to use the manifest dependencies (described in link below) in visual studio to achieve the same
http://blogs.msdn.com/b/yvesdolc/archive/2008/05/09/native-manifests-let-s-do-com-and-forget-the-registry.aspx?CommentPosted=true#commentmessage
However these manifest dependencies work only when it is done as part of the EXE settings in visual studio, it does not work if it is done from MFC.DLL.
Now in our case since Node server (Node.exe) shall be invoking our DLL, we wanted to know how to do the manifest settings for COM component in Node server so that we do not require to register the COM component explicitly.

Thanks and regards,
Karrtik
LVL 15
Karrtik IyerSoftware ArchitectAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jkrCommented:
You could do that by changing/editing the manifest that 'node.exe' contains or add one to the executable if there is none so far. See http://support.microsoft.com/en-us/kb/944276 ("How to embed a manifest file in an executable file in Visual Studio 2005", works equally with later versions) and https://msdn.microsoft.com/en-us/library/ms235605.aspx?f=255&MSPPError=-2147217396 ("Manifest Generation at the Command Line")
0
Karrtik IyerSoftware ArchitectAuthor Commented:
Hi JKR,

Node.exe is the node.js (www.nodejs.org) server side component. I do not think it is built using a Microsoft technology which ch we can do these settings. Hence this question.

Thanks,
Karrtik
0
jkrCommented:
It is. As long as it consist of the binary format required to run on MS Windows, you can apply all means that MS' development tools offer. I do work with node.js as well, so I'll see what it takes to add a manifest to 'node.exe' tomorow, Aquick test just now already confirms that this is possible, so following the steps linked above should get you there.
0
Acronis True Image 2019 just released!

Create a reliable backup. Make sure you always have dependable copies of your data so you can restore your entire system or individual files.

Karrtik IyerSoftware ArchitectAuthor Commented:
Thanks JRK, steps and any sample program should help.
Shall await your response.
Regards,
Karrtik
0
jkrCommented:
Well, try that yourself in the mean time - save the manifest file, use rc.exe to create a node.manifest and then

mt.exe –manifest node.exe.manifest -outputresource:node.exe;1

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jkrCommented:
OK, that worked. Only a simple error in the above, that should be

mt.exe –manifest node.exe.manifest -outputresource:node.exe;#1

Open in new window


The '#' was missing. With the manifest from the article, you get


C:\tmp\cc\node>mt -updateresource:node.exe;#1 -manifest node.exe.manifest
Microsoft (R) Manifest Tool version 5.2.3790.2075
Copyright (c) Microsoft Corporation 2005.
All rights reserved.

mt.exe : manifest authoring warning 81010002: Unrecognized Element "requestedPrivileges" in namespace "urn:schemas-microsoft-com:asm.v3".

mt.exe : manifest authoring warning 81010002: Unrecognized Element "compatibility" in namespace "urn:schemas-microsoft-com:compatibility.v1".
0
Karrtik IyerSoftware ArchitectAuthor Commented:
Thanks JKR, we were able to achieve it using your hint yesterday. Thanks once again.

Regards,
Karrtik
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.