Avoid Calling Win32 API Functions

Win32 API calls require permission to run unmanaged code. As soon as you make a Win32 API call, your assembly instantly requires the highest possible level of permission that an assembly can have. Thi

DevPro Staff

August 3, 2004

1 Min Read
ITPro Today logo

Win32 API calls require permission to run unmanaged code. As soon as you make a Win32 API call, your assembly instantly requires the highest possible level of permission that an assembly can have. This means that it will be much harder to distribute your assembly for any but the most trusted distribution scenarios.

 

 

·          Win32 API calls are more prone to errors. Because they run in unmanaged code, you again open the door to the potential for Memory exceptions, memory and resource leaks, and all of the typical bugs that API programmers in any language are accustomed to.

 

·          It's harder to call Win32 API calls than to use equivalent framework calls.

 

Happy Learning !!! 

 

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like