Home All Groups Group Topic Archive Search About

AccessViolationException

Author
2 Feb 2006 1:11 PM
Subramanian
I get the following exception when i am trying to call an unmanaged
code{using pointers to generate ID} from c#

INFO: Initializing UUID generator...
*** exception in native code ***
System.AccessViolationException: Attempted to read or write protected
memory. This is often an indication that other memory is corrupt.
   at com.esecurity.uuid.UUIDGenerator.assignUUID(Byte[] , Int32 )

And just before the method call i am using the following attribute

[SecurityPermission(SecurityAction.Demand,Flags=SecurityPermissionFlag.UnmanagedCode)]

Is this the way to use it.  Need more information on this

Can any body help me with this.


Regards
Subbu

Author
2 Feb 2006 6:13 PM
Cowboy (Gregory A. Beamer) - MVP
Is this in an unsafe block?

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************


Show quote
"Subramanian" wrote:

> I get the following exception when i am trying to call an unmanaged
> code{using pointers to generate ID} from c#
>
> INFO: Initializing UUID generator...
> *** exception in native code ***
> System.AccessViolationException: Attempted to read or write protected
> memory. This is often an indication that other memory is corrupt.
>    at com.esecurity.uuid.UUIDGenerator.assignUUID(Byte[] , Int32 )
>
> And just before the method call i am using the following attribute

> [SecurityPermission(SecurityAction.Demand,Flags=SecurityPermissionFlag.UnmanagedCode)]
>
>  Is this the way to use it.  Need more information on this
>
> Can any body help me with this.
>
>
> Regards
> Subbu
>

AddThis Social Bookmark Button