Karrtik Iyer
asked on
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
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
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")
ASKER
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
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
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.
ASKER
Thanks JRK, steps and any sample program should help.
Shall await your response.
Regards,
Karrtik
Shall await your response.
Regards,
Karrtik
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
OK, that worked. Only a simple error in the above, that should be
The '#' was missing. With the manifest from the article, you get
mt.exe –manifest node.exe.manifest -outputresource:node.exe;#1
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:compatibi lity.v1".
ASKER
Thanks JKR, we were able to achieve it using your hint yesterday. Thanks once again.
Regards,
Karrtik
Regards,
Karrtik