Željko Perić

Željko Perić

  • 449
  • 3k
  • 202.7k

How to use Unsafe Methods with UI Permissions

Jan 23 2020 11:52 PM
Hello,
I have simple dilemma about what is propper syntax and semanthics when using  Unsafe Methods with UI Permissions. Here is example of program code :
 
https://docs.microsoft.com/sr-latn-rs/visualstudio/code-quality/ca1060-move-p-invokes-to-nativemethods-class?view=vs-2015&redirectedfrom=MSDN#unsafenativemethods-example 
 
In the essence syntax is this :
 
create NEW UI PERMISSION 
call Unsafe Method 
 
 
What I did not understand ,
Do I have to repeatedly create New UI Security Permission, each time I call Unsafe Method ?
If I have to call many different Unsafe Methods successively , do I have to create new UI Security Permission for each one of them.
 
 
All the best,
Želko Peric 

Answers (1)