Post

 Resources 

Console

Home | Profile | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 VBGamer
 VBGamer
 Why SuppressUnmanagedCodeSecurity?

Note: You must be registered in order to post a reply.

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List Spell Checker
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

   Insert an File
Check here to include your profile signature.
Check here to subscribe to this topic.
    

T O P I C    R E V I E W
Lachlan87 Posted - Sep 14 2004 : 4:40:50 PM
I was browsing through some of the code that came with "Managed DirectX 9 Kick Start : Graphics and Game Programming" by Tom Miller, and I came across these lines of code:

' We won't use this maliciously
    <System.Security.SuppressUnmanagedCodeSecurity()> Private Declare Function QueryPerformanceFrequency Lib "kernel32" (ByRef PerformanceFrequency As Long) As Boolean
    ' We won't use this maliciously  
    <System.Security.SuppressUnmanagedCodeSecurity()> Private Declare Function QueryPerformanceCounter Lib "kernel32" (ByRef PerformanceCount As Long) As Boolean
    ' We won't use this maliciously  
    <System.Security.SuppressUnmanagedCodeSecurity()> Public Declare Function timeGetTime Lib "winmm.dll" () As Integer
  



Does anyone know why he supresses unmanaged code security? When I use an API I usually just type:

Declare Auto Function . . . . .  


What's better/different about his way?

I thought his comments were hilarious! Rather like a school boy being made to write lines after he was bad!
2   L A T E S T    R E P L I E S    (Newest First)
Lachlan87 Posted - Sep 14 2004 : 6:21:20 PM
Interesting links Eric! Thanks!
Eric Coleman Posted - Sep 14 2004 : 5:28:11 PM
I'm not sure, but from what I've read it gives a performance boost. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/seccodeguide.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag/html/scalenetchapt05.asp

VBGamer © Go To Top Of Page
This page was generated in 0.09 seconds. Snitz Forums 2000

Copyright © 2002 - 2004 Eric Coleman, Peter Kuchnio , et. al.