By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,058 Members | 1,217 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,058 IT Pros & Developers. It's quick & easy.

AccessViolationException

P: n/a
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?
Dec 9 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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?
Dec 9 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.