简体   繁体   中英

How to pass hidden data between two executables?

We have a legacy VB6 application from which we have migrated the licencing code to a Net executable. The choice for a separate executable was made because this code needs elevation. The Net executable needs to get the version number of the VB6 to check if use of this version is compliant with the licence. We are struggling with how to pass hidden or encrypted data from the VB6 app to the licence Net app. As the VB6 app runs under the credentials of the current user and the Net app needs elevation passing this information through the registry does not reliably work.

Please give some guidance on how to do this!

EDIT: The links and advice given were useful and instructive. But too much hassle to just get one hidden parameter accross the Process boundary. I implemented it differently.
Thanks!

You can always pass the sensitive data to the .NET executable using command line parameters when it is launched. You can use a free API such as CryptoSys or the .NET Framework cryptography classes to encrypt/decrypt the sensitive license data.

The VB6 application can call into the CryptoSys or .NET cryptography libraries using COM interop and of course the .NET application can call them directly.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM