Question

First off I know this is probably a tall order but... :)

We have some software that interacts with the hardware our company produces. This software loads a .NET assembly and this acts as our interface to the hardware.

Currently we have a 'Launcher' application written in C# which provides role based security. This 'Launcher' launches the C++ executable with command line arguments (the .NET assembly to use) via a process. The C++ executable then loads the supplied .NET assembly and uses it to perform its actions.

The problem is because I launch the C++ application in a process I lose the role based security context provided by the 'Launcher'.

Is there any way I can launch the C++ application and keep the role based security context?

Thanks for taking the time to read this. If you have any questions please let me know.

Thank you,

Adam

Was it helpful?

Solution

You would have to modify the C++ application to check the roles as well.

If you can do that, you might consider breaking up part of your C# application into multiple assemblies. Specifically, take the roles part the C# application, and compile that as a dll with COM/ActiveX extensions.

Then you can call the C# dll (via COM) to check permissions.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top