473,588 Members | 2,574 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

AccessViolation Exception on a malloc(UInt32)

4 New Member
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 AccessViolation Exception

I followed the code, and found that the problem is originated on a simple malloc call:

LPBYTE imData = (unsigned char *)malloc(100);


Does anybody has an idea of why this happening?
Mar 23 '07 #1
0 1225

Sign in to post your reply or Sign up for a free account.

Similar topics

0
961
by: Rob Van Zant | last post by:
I have a 3rd party library (.lib) file with two header files which I have wrapped in a c++ .net dll. I am trying to use that dll in an asp.net project but I get the error "Object reference not set to an instance of an object." I added the dll to my project as a .net reference and I can see all exposed functions in the object browser. The function call(s) that causes the error is sweep_output_t* sweep_output = new sweep_output_t;
2
2521
by: Fernando Barsoba | last post by:
Dear all, I have been posting about a problem trying to encrypt certain data using HMAC-SHA1 functions. I posted that my problem was solved, but unfortunately, I was being overly optimistic. I am really desperate now, because I havent' been able to locate the origin of the problem for a couple of days now.. PROBLEM: the message digest obtained differs each time I execute the code, but works perfectly when applying the "control", that...
2
4170
by: Pieter | last post by:
Hi, Since 10 days (the first time was the 10th of november) I have some weird exception happening in an application here: All (except 1 of the total of 5) users had this error now 1 of 2 times during the last 10 days. It happens mostly during startup or closing of the application, but sometimes just in the middle of nowhere. It doesn't point to anyting special. I don't get a clue... It's a Windows Forms VB.NET 2005 application. I roll...
4
1364
by: Daniel Rudy | last post by:
Hello Group, Consider the following code fragment: #define PSM_TABLESIZE 2441 /* size of hash table (prime number) */ #define uint32 unsigned long int typedef struct psmalloc_table_tag
0
4544
by: mike1402 | last post by:
Hi ! I get the error below sometimes when retrieving a big amount of data using Datadapter.Fill(dataset,"table"). But when I send the command Fill again, there is no error. Is it a fault of IBM.Data.DB2.iSeries; Version: v1.0.3705 (is there an newer one for OS/400 Version ist V5R3 ?) or is it a hardware faoult (memory of as400 or pc) ? br mike Es wurde versucht, im geschützten Speicher zu lesen oder zu schreiben. Dies ist häufig ein...
0
1345
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 AccessViolationException I followed the code, and found that the problem is originated on a simple malloc call: LPBYTE imData = (unsigned char *)malloc(100); Does anybody has an idea of why this is happening?
5
4303
by: Jef Driesen | last post by:
I have a C DLL that I want to use from a C# project. The C header file contains these declarations: typedef void (*callback_t) (const unsigned char *data, unsigned int size, void *userdata); void myfunction (callback_t callback, void *userdata); How do I translate this to C#? I tried with:
5
14985
by: SSekar | last post by:
Hi, I am getting this exceptions when I am trying to access the Frotran dll. Here is sample code for that. using System; using System.Collections.Generic; using System.Text; using System.Runtime.InteropServices; namespace TestApplicationFracEngine {
2
1260
by: kevinwebster83 | last post by:
Hi Please could someone help me with the following, i'm trying to port the unmanaged C++ below into either VB.Net or C# (i don't mind which). typedef struct { U32 Size; U32 Start; U32 Reserved1;
0
7927
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7857
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8352
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7981
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
5396
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3882
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2367
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1457
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1194
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.