PInvoke.net : Far beyond managed code (DllImport inside)
PInvoke.net is primarily a wiki, allowing developers to find, edit and add PInvoke* signatures, user-defined types, and any other information related to calling Win32 and other unmanaged APIs from managed code (written in languages such as C# or VB.NET). sample code : [DllImport(“aygshell.dll”)] static extern uint SHRecognizeGesture(ref SHRGINFO shrg); [StructLayout(LayoutKind.Sequential)] class SHRGINFO { public uint […]
[HowTo] Application start on “Wake up” event
Using this code will allow you to configure your application to start or to display following a system wakeup event. /// <summary> /// This function starts running an application when a specified event occurs. /// </summary> /// <param name=”application”>The application. eg: @”\Program Files\testapp\testapp.exe”</param> /// <param name=”notificationEvent”>Event at which the application is to be started. Use […]
[HowTo] Establish a GPRS connection with TcpClient
NETCF’s HttpWebRequest automatically sets up a GPRS connection for web requests/web services when a wired/wi-fi connection is not available. Therefore, when you do a web request or consume a web service, developers do not need special coding to handle the GPRS connection case. This does not apply to lower level socket classes like TcpClient and […]