Re: Is it posible to create COM in .Net C#




"apm" <Contributor@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:1nCWe.11753$nq.2460@xxxxxxxxxxxxx
>
> What security checks are there and how can they be turned off?
>
> When an array of 10,000 double is passed from COM to .NET it is copied
> (passed by value). In order to make it behave like an array passed by
> reference the array is copied again when control returns to COM. COM
> components all running in the same process will pass arrays by passing a
> reference. This takes very little time because one pointer is passed. When
> COM passes to .NET 10,000 doubles are copied twice unless the default
> marshaling is overridden.
>
>> Now, if you take care that COM objects live in the callers apartment
>
> I'd like to know how to run a COM object in a .NET object's appartment.
>
> and if you turn-off the security checks performed when calling
>> into COM or from COM, the call overhead is some 30 instructions per call
>> (~10-15 nsec. on entry type PC ), this is what I call negligible.
>>
>> Willy.
>>
>>
>

You can apply:
[System.Security.SuppressUnmanagedCodeSecurity]
in order to suppress a security walk when calling into COM (or unmanaged
code) , note that this is not relevant when calling into .NET as unmanaged
code knows nothing about code access security.

Array's are always copied when calling into .NET from COM, see your other
thread for a more detailed answer.

Willy.


.



Relevant Pages

  • Re: Is it time for secure C ?
    ... This is certainly possible (especially with C99 VLAs ... but is the proposed "security" worth ... array out with NUL bytes is removed! ... the programmer to provide output character arrays big enough to hold ...
    (comp.lang.c)
  • Re: Passing Super Globals to functions
    ... or calling the Super Global directly in a function ... function myfunction() { ... Just curious if someone has information on the preferred way for security. ... For instance, another time you might want to get the data from the $_GET array; or maybe $_COOKIES, or possibly even your own home-built array. ...
    (comp.lang.php)
  • Re: Question about shared storage arrays
    ... If the array is correctly managed then security is ... could affect the security of your info and the integrity of the database. ... share a storage array with a company that provides other solutions for us. ... to facilitate one-on-one interaction with one of our expert instructors. ...
    (Security-Basics)
  • Re: ISA Array and URL problem
    ... If you have to access sites that use source IP for "security", then you'll have to disable CARP. ... I've 2 ISA server installed on win2k in array. ... the same array member and some site check the source IP address for ...
    (microsoft.public.isa.enterprise)
  • Re: Is it posible to create COM in .Net C#
    ... What security checks are there and how can they be turned off? ... When an array of 10,000 double is passed from COM to .NET it is copied ... reference the array is copied again when control returns to COM. ... marshaling is overridden. ...
    (microsoft.public.dotnet.languages.csharp)