Click here to Skip to main content
15,299,443 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:

I have an EXE file(Provided by the Vendor) which will call the dll. I compiled the C code using Visual Studio 2008 Express Edition in Release Mode with neccessary settings for our Application. It compiled successfully and created an dll.

When I ran the Vendor provided Exe which references the dll(Outcome of my C code compilation), during runtime it was exiting Abnormally showing an window saying that "The Memory at "XXXXXXXX" referenced memory at "xxxxxxx". The Memory Could not be read.

It also says click ok to terminate and cancel to Debug. If I click on OK it exits. If I press on cancel it will open with VS 2008 and Debbugs the code and throws an exception saying "Unhandled exception at 0x00ec6c03 in *****.EXE: 0xC0000005: Access violation reading location 0x00001234".

Please suggest me in finding the piece of code that is creating this problem.

Hoping I could Find a solution for my problem here. Banging my head from past 1 Month.

Thanks in Advance.

Leo Chapiro 10-Oct-13 11:40am
Do you have the source code of the EXE provided by the Vendor? If not, I fear you have no chance to find the error if it occurs on the side of EXE :(
You can surely create a Debug version of your DLL and try to debug your own code hoping the error occurs on the side of dll. You know how you can do it?
Member 10328241 11-Oct-13 3:51am
I am new to MS Visual Studio 2008. I am not aware of debugging. Can you please suggest me how to debug?
My Event Viewer says that the exception was created while referncing the dll that I created.

1 solution

You need to talk to the manufacturers of the EXE - it is almost certainly that you are returning a wrong value somewhere and their code is trying to use it as a pointer: the address 1234 hex is rather suspicious - do you use that value at any time?

Certainly we can't help you - we have no idea what EXE it is, how you wrote your DLL or anything else. Sorry - but talk to them, not us!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900