Creativ,
First, you are not boxing the strings or the array of strings. Arrays
and strings are reference types.
Second, there isn't enough information to go on. Without seeing the
code for the UnregisterAllItems method, or how it is called from unmanaged
code, it's very difficult to know what is going on.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Creativ" <Go*********@gmail.comwrote in message
news:1f**********************************@e4g2000h sg.googlegroups.com...
>A COM component has an method, called Register(Variant variant), which
expect an array of string via Variant. If I want to use it, I can pass
an object[] whose element boxes a string.
The UnregisterAllItems method of the component remove all registered
items.
Most of the time, UnregisterAllItems works fine but sometime
UnregisterAllItems returns an AccessViolationException.
Any idea why it goes wrong?