views:

120

answers:

1

Hi all,

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

+1  A: 

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.

Chris Brandsma
Unfortunately it is another department in our company who developed it and it is now considered a legacy product. I guess I will have to persue this further with them. Thanks for the idea! :)