C++/Cli project crashing when calling managed from unmanaged code

Hello guys , I have a project made of c++/cli , Whenever i compile the project under 32bit build it works fine ,However when i compile it under 64bit build whenever i try to access unmanaged c++ from managed c++ "e.g call unmanaged function when the user press a button " , The project crashes and give the following error .
1
2
An unhandled exception of type 'System.AccessViolationException' occurred in Project.exe
Additional information: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Problem solved by using DWORD64 instead of DWORD , Was caused because i was reading at the wrong memory region .
Topic archived. No new replies allowed.