Click here to Skip to main content
15,896,726 members
Home / Discussions / C#
   

C#

 
GeneralRe: question about threads please Pin
profoundwhispers30-Sep-03 3:24
profoundwhispers30-Sep-03 3:24 
GeneralRe: question about threads please Pin
Heath Stewart30-Sep-03 3:33
protectorHeath Stewart30-Sep-03 3:33 
GeneralRe: question about threads please Pin
profoundwhispers30-Sep-03 3:36
profoundwhispers30-Sep-03 3:36 
Questionis it possible? Pin
boazneon30-Sep-03 0:35
boazneon30-Sep-03 0:35 
AnswerRe: is it possible? Pin
Ryan_Roberts30-Sep-03 1:15
Ryan_Roberts30-Sep-03 1:15 
GeneralRe: is it possible? Pin
boazneon30-Sep-03 1:57
boazneon30-Sep-03 1:57 
Generalproblem with inf file Pin
Srikar Y30-Sep-03 0:35
Srikar Y30-Sep-03 0:35 
GeneralRe: problem with inf file Pin
Heath Stewart30-Sep-03 2:02
protectorHeath Stewart30-Sep-03 2:02 
.NET != ActiveX, or
.NET <> ActiveX

In order to distro a .NET control in a CAB file, it has to expose it's controls as, at most, IUnknown class interfaces (or use IDispatch class interfaces to make it scriptable, given the proper security context).

If you look at the section of the .NET Framework SDK documentation entitled "Deploying Applications", you'll see that you really should use CAB files at all. Instead, you use a slightly modified <OBJECT> tag that reference the assembly and class directly. Then, if the site or URL is allowed the proper security priviliges by the .NET framework, the control will be instantiated directly. Any public properties of the control that have a TypeConverter to read/write strings can be set using the <PARAM> tags inside the <OBJECT> tags, such as a URL to an INI or XML file to build the toolbar.

CAB files can be used, but it is generally not done because the .NET model allows for assembly bindings over the Internet in a seemless fashion. Fusion - the assembly binder - will download assemblies to a temporary assembly cache that is based on the assembly name. The next time the same version is used, it will be pulled from the cache and load / insantiate faster. A CAB file doesn't give you this functionality.

There are a number of other things, too. An embedded user control, as the method I'm describing is most often called, CANNOT use any values from the SystemColors class, as most controls do. This is documented and is because the control requires full trust and, for some reason, this class requires unrestricted access or something like that. Frankly, based on what I know about security and the CLR (which is quite a lot), Microsoft's statement has never made sense.

Also, the control has to be granted enough permissions to run. .NET basically runs in a Java-like sandbox, although .NET is much easier to use and configure. If the CLR isn't told to grant enough permissions to your control to run based on its evidence, it won't execute it.

I wrote an article about all of this some time back on a different site and haven't ported it over yet. Perhaps it would be a good time, since I could probably update some information on it. Take a look at the following URL:

http://www.devhood.com/Tutorials/tutorial_details.aspx?tutorial_id=388[^]

I hope that helps.

 

-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
GeneralWeb Services proxy class Pin
sneaky90930-Sep-03 0:08
sneaky90930-Sep-03 0:08 
GeneralRe: Web Services proxy class Pin
Ryan_Roberts30-Sep-03 1:09
Ryan_Roberts30-Sep-03 1:09 
Questionremoting server in console app? Pin
Roger Alsing29-Sep-03 22:37
Roger Alsing29-Sep-03 22:37 
AnswerRe: remoting server in console app? Pin
Blake Coverett29-Sep-03 23:09
Blake Coverett29-Sep-03 23:09 
GeneralRe: remoting server in console app? Pin
Roger Alsing29-Sep-03 23:31
Roger Alsing29-Sep-03 23:31 
GeneralControl Key Combo Pin
deanoA29-Sep-03 20:40
deanoA29-Sep-03 20:40 
GeneralRe: Control Key Combo Pin
Heath Stewart30-Sep-03 2:16
protectorHeath Stewart30-Sep-03 2:16 
QuestionPicture &amp; Streamer : closed or not? Pin
Stephane David29-Sep-03 20:24
Stephane David29-Sep-03 20:24 
GeneralCallling a dll in COM+ Component Pin
Member 83727229-Sep-03 20:16
Member 83727229-Sep-03 20:16 
GeneralSave a picture Pin
Birdy29-Sep-03 18:43
Birdy29-Sep-03 18:43 
GeneralRe: Save a picture Pin
J. Dunlap29-Sep-03 19:20
J. Dunlap29-Sep-03 19:20 
GeneralCopy file to server Pin
Anonymous29-Sep-03 10:17
Anonymous29-Sep-03 10:17 
GeneralRe: Copy file to server Pin
Daniel M. Edwards29-Sep-03 10:20
Daniel M. Edwards29-Sep-03 10:20 
GeneralTaskbar window button Pin
blade29-Sep-03 9:02
blade29-Sep-03 9:02 
QuestionWhich NUD called this MenuItem? Pin
james-cxx29-Sep-03 8:52
james-cxx29-Sep-03 8:52 
AnswerRe: Which NUD called this MenuItem? Pin
james-cxx29-Sep-03 13:16
james-cxx29-Sep-03 13:16 
Generalpostioning of printer dialog Pin
trythat29-Sep-03 8:06
trythat29-Sep-03 8:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.