Access Violation at addres....???

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I'm writing a C# Library that interacts with an C DLL, the resulting DLL is
used by an application and it works fine on my PC but when i copy the
resulting DLL to another PC running the same application it gives an error

Access violation at address ..... in module ..... Read of address 0000000

Help!
 
It looks like you are trying to read a null pointer somewhere. It would
be impossible to say what is causing it, but you obviously have a reference
set to null somewhere and you are trying to access it (in your unmanaged
code).

Hope this helps.
 
Hi,

If what you say is the case then why does it work perfectly on my PC.

Both the PCs have the same OS & patches installed. Runs the same application
except that my PC has Visual Studio 2003 installed and the other has the dot
net framework installed.
 
The resulting DLL (the .NET assembly) and the C DLL and it's dependent
DLL's (if any) have to be available on all PC's, do they?

Willy.
 
Hi Willy,

It worked. What I did was to copy the final (C DLL + C# Library) DLL
together with the C# Library to that program directory and then run

regasm XXX.dll /tlb: xxx.tlb (xxx - the C# library)
gacutil /i xxx.dll (xxx - the C# library)

It works!
Thanks
 
Back
Top