locked
Restricted access to a resource dll... RRS feed

  • Question

  • Hi,

    In my application, i have all the styles and other reusable components defined. This 'myResource.dll' is used by many application as a resource.

    I want to add a check in this dll such that it will be accessed by the few application which have permission to access. Something like if i define 10 application names in 'myResource.dll' which have permission to use it and other application wont be able to use. Its should throw an exception/error at runtime for all other applications.

    How i can do this in C#/WPF? I am using VS2010.

    Thanks,

    IamHuM


    • Edited by IamHuM Wednesday, May 9, 2012 5:28 PM Corrected typo.
    Wednesday, May 9, 2012 5:02 PM

Answers

All replies

  • On 5/9/2012 1:02 PM, IamHuM wrote:
    > Hi,
    >
    > In my application, i have all the styles and other reusable components
    > defined. This 'myResource.dll' is used by many application as a resource.
    >
    > I want to add a check in this dll such that it will be accessed by the
    > few application which have permission to access. Something like if i
    > define 10 application names in 'myResource.dll' which have permission to
    > use it and other application wont be able to use. Its should throw an
    > exception/error at runtime for all other applications.
    >
    > How i can do this in C#/WPF? I am using VS2020.
    >
     
    VS2020? :)
     
    You would have to use Reflection I would think like in the link below
    or some other function in Reflection.
     
     
    Wednesday, May 9, 2012 5:21 PM
  • Hi IamHuM,

    You can use the buildin License Components in .Net Framework to achieve your goal.  

    Link for your reference:http://stackoverflow.com/questions/955632/how-do-you-lock-a-dll

    Hope it helps.

    Have a nice day.


    Annabella Luo[MSFT]
    MSDN Community Support | Feedback to us

    • Marked as answer by Annabella Luo Thursday, May 24, 2012 4:37 AM
    Friday, May 11, 2012 8:22 AM