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
August 3, 2004
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 !!!
About the Author
You May Also Like