i’m usually using Win32 API in c#.NET. But not declare all in one application. Sometimes usually using user32, sometimes gdi32 … I think when i declare all api function, those use lot of memory. What is the best way using API in .NET ?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Most of the Win32 API is available through managed abstractions. Otherwise, declare the ones you need using
DllImport.LoadLibraryshould really only be used where you have provided alternate functionality, that is, your application can work even without that particular API function. If the API function is critical, usingDllImportwill let the loader worry about whether the function exists or not.