[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Jim Hubbard

1/12/2003 7:04:00 PM

I am working on a calculator application that will dynamically load and run
other calculator modules (DLLs) based on the user's preference (scientific,
mortgage, stocks-specific, etc.).

The question I have is....is there any way to :
a) make sure that the 3rd party DLL can only be loaded/run by my
application (and not by another app) and
b) make sure that a 3rd party DLL can call methods of its parent, but
not instantiate an instance of the parent?

Any help that you can give would be very much appreciated.

Thanks!

Jim



2 Answers

Allen

1/12/2003 7:46:00 PM

0

Hi Jim

a) Placing a CAS LinkDemand on the classes in the 3rd Party DLL should do
the trick. But this requires the 3rd party to implement. You need to demand
the StrongName of your assembly, or a publisher certificate if you sign
them.

b) I dont really understand what you want, but you could make the parent an
abstract class if it never needs to be instantiated. Alternatively you could
put CAS LinkDemands on its constructors.

Regards
Allen

"Jim Hubbard" <not_really_my_address@msn.com> wrote in message
news:jThU9.6919$WT3.4946@news.bellsouth.net...
> I am working on a calculator application that will dynamically load and
run
> other calculator modules (DLLs) based on the user's preference
(scientific,
> mortgage, stocks-specific, etc.).
>
> The question I have is....is there any way to :
> a) make sure that the 3rd party DLL can only be loaded/run by my
> application (and not by another app) and
> b) make sure that a 3rd party DLL can call methods of its parent, but
> not instantiate an instance of the parent?
>
> Any help that you can give would be very much appreciated.
>
> Thanks!
>
> Jim
>
>
>


Jim Hubbard

1/13/2003 2:09:00 AM

0

Thanks for your suggestions.

Jim

"Allen" <agj@bigfoot.com> wrote in message
news:OM33OsmuCHA.2296@TK2MSFTNGP09...
> Hi Jim
>
> a) Placing a CAS LinkDemand on the classes in the 3rd Party DLL should do
> the trick. But this requires the 3rd party to implement. You need to
demand
> the StrongName of your assembly, or a publisher certificate if you sign
> them.
>
> b) I dont really understand what you want, but you could make the parent
an
> abstract class if it never needs to be instantiated. Alternatively you
could
> put CAS LinkDemands on its constructors.
>
> Regards
> Allen
>
> "Jim Hubbard" <not_really_my_address@msn.com> wrote in message
> news:jThU9.6919$WT3.4946@news.bellsouth.net...
> > I am working on a calculator application that will dynamically load and
> run
> > other calculator modules (DLLs) based on the user's preference
> (scientific,
> > mortgage, stocks-specific, etc.).
> >
> > The question I have is....is there any way to :
> > a) make sure that the 3rd party DLL can only be loaded/run by my
> > application (and not by another app) and
> > b) make sure that a 3rd party DLL can call methods of its parent,
but
> > not instantiate an instance of the parent?
> >
> > Any help that you can give would be very much appreciated.
> >
> > Thanks!
> >
> > Jim
> >
> >
> >
>
>