the problem is......How can I specify which library (.lib) to be used.
I want to add ws2_32.lib.....................
I'm using MS Visual Studio 2005 to compile C codes (Win32 API)?
check out http://www.pscode.com
Reply:The System.Runtime.Interop namespace has some useful objects for this, namely using the P/Invoke technique to call Windows API functionality that is not exposed in .net libraries. In fact, the entire .net API interfaces with the Windows API using this technique. It's quite simple, for example:
using System.Runtime.Interop;
[DllImports("user32.dll")]
public static extern int SendMessage(IntPtr hwnd, long message, IntPtr wParam, IntPtr lParam);
exposes the SendMessage API
Reply:Somewhere in Project Properties.
Right click on Project, then select properties or find it on the menu. Somewhere in there is a place to choose which libraries to use.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment