473,320 Members | 2,083 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

AccessViolationException

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
1 2273
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: mark.milley | last post by:
Hi all - I'm working on an app, and as a feature, I'd like to include thumbnail images of web pages. As directed on several web pages, I've added the following interface: Imports...
0
by: oarrocha | last post by:
I'm trying to use a DLL that was built with Visual C++.NET 7.1 on a new program that I'm developing in VS2005 C# program. Every time I call a function of the 7.1 DLL I receive an anoying...
5
by: deepakkumarb | last post by:
I am getting this exception while executing non query from .NET code to oracle 10g DB. Can you plz help System.AccessViolationException: Attempted to read or write protected memory. This is...
1
by: Marc Bartsch | last post by:
Hi, My C# app throws the following exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. From...
1
by: =?Utf-8?B?SmFzb24gUm9kbWFu?= | last post by:
I have a wierd problem in my application where any call to Assembly.GetFullName of the currently running assembly fails with an AccessViolationException. This only happens on windows vista, all...
8
by: SSix2 | last post by:
.Net 2005 Managed C++ Background. I am writing a managed c++ wrapper for legacy unmanaged code. I created a test application in C# to create the legacywrapper and I am attempting to get some value...
12
by: rmiller407 | last post by:
I am getting an AccessViolationException when calling an old legacy fortran dll from c# in vs2008 express, but the same code worked fine in vs2005. If I create a vs2005 c# wrapper dll to call...
0
by: Dilip | last post by:
I have cross-posted this question to 3 newsgroups since I am not sure exactly where it belongs (and some NG's have very less activity). Apologies in advance for this. I have set the followup to...
2
by: =?Utf-8?B?VHJpc3RhbiBNU0ROIEtlZW4=?= | last post by:
I've written a test harness in C# to test one of our company's products, which is written in C. If the application crashes, the Instruction Address, Memory Address and the Access Type are stored...
0
by: mikeosoft | last post by:
Hi there, this is my first post here! I hope someone can help me. What I'm trying to do is : Storing Fonts in SQL Server And recalling them without installing the file in Windows\Fonts So I...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.