Iam using Vs2015, While I try to Open a file using OpenFileDialog, Iam receiving the error
"Unhandled exception of type" System.AccessViolationException" occoured in system.windows.forms.dll
Additional information: Attempted to read or write protected memory.This is often an indication other memory is currupt.
i made a library in c++/cli and beside a c# program calling it. Everything works fine when i compile on any cpu or x64 on my pc (x64os/x64proc). But if i compile for x86, c# part works fine, but when i use the c++/cli part i get the error "could not load file or assembly .... incorrect format" . I use user32.lib in the c++/cli, is it possible the problem come from here ?
I think it's ok, i activated copy reference to output project but i'm not sure it was that.
//Assuming int is on 4 bytes
typedef union u
x.b = 0 // Put first byte here
x.b = 0 // second byte here, etc.
// Then use x.i as an integer
// Keep in mind that on Intel CPUs, integer values are represented in memory in reverse order.
// This means that hex value 0x11223344 will be represented in memory as 0x44, 0x33, 0x22, 0x11
// This is called little-endian vs. big-endian representation.
// There can be CPUs that uses the other convention.
// Make a small test project and play around with some values etc.
I have never tried, but I would not expect so. If you drag a control onto a form in the designer then the designer adds it to the Form's properties. But there is nothing (at least in C# Forms) that I can see that allows you to modify it to be static.
Last Visit: 31-Dec-99 19:00 Last Update: 8-Dec-22 22:21