© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
28 replies
Kleidukos

❔ system.accessviolationexception: attempted to read or write protected memory

I created an c++ dll to call this -> https://pastes.dev/MIdnPDHsBs from C#
But i get this exception
system.accessviolationexception: "attempted to read or write protected memory. this is often an indication that other memory is corrupt."
What i am doing wrong and how can i solve this
Should i try to code this in C# ?
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

System.AccessViolationException: Attempted to read or write protected memory.
C#CC# / help
2y ago
System.AccessViolationException: Attempted to read or write protected memory.
C#CC# / help
2y ago
❔ System.AccessViolationException: 'Attempted to read or write protected memory.
C#CC# / help
4y ago
System.AccessViolationException
C#CC# / help
4y ago