Microsoft
Software
Hardware
Network
Question : Security Exception in P/Invoke from C# to Win32 DLL
Background:
I created a DLL using C++ and am calling the functions using Managed C# code with P/Invoke. I am receiving the below error after calling a Win32 API Function from within the DLL:
Unhandled Exception: System.AccessViolationExce
ption: Attempted to read or write
protected memory. This is often an indication that other memory is corrupt.
at GetFileSecurityW(Char* , UInt32 , Void* , UInt32 , UInt32* )
at Query(_bstr_t* bstrPath)
at Test.Program.Query(String strPath)
at Test.Program.Main(String[]
args) in Program.cs:line 23
Is this an issue with .NET security levels?
Answer : Security Exception in P/Invoke from C# to Win32 DLL
Try the following link may help you
http://stackoverflow.co
m/question
s/732304/a
ccessviola
tionexcept
ion-during
-p-invoke-
help
Random Solutions
support sql server 2005 on a mac pro notebook?
Win 7 and home network
Printing first page on Microsoft outlook 2007
How to know when a TMemo's control has had text selected?
How can I use Remote Desktop to automatically resume a previous (idle) remote desktop session that I previously started but that was disconnected?
How to write stored procudure so it doesn't time out
Help with top 1 relational query
How can I run a stored procedure in ms sql server 2008 from excel 2003 vba
Right-click extremely slow on Windows XP
"you are about to be logged off"