Posts Tagged ‘Windows Mobile’

How to get process id and thread id from a Window Handle in .NET CF?

42Gears TeamSpecify the namespace for doing P/Invoke stuff i.e. calling Win32 API functions from managed code. using System.Runtime.InteropServices; GetWindowThreadProcessId Win32 function retrieves the identifiers of the process and thread that created the specified window. Here is how we declare GetWindowThreadProcessId for use in managed code (c#). [DllImport(“coredll.dll”)] private static extern uint GetWindowThreadProcessId(IntPtr hWnd, out uint…

Read More

How to display Settings screens or Control Panel Applets in Windows Mobile?

42Gears TeamWindows Mobile Control Panel applets are normal dlls renamed with special extension .cpl. They are actually loaded by ctlpnl.exe process. Following code snipped is what you need if you want to show a Control Panel applet from your program. This way you make it easy for your user to change desired settings, without any…

Read More

Feature Checklist of Mobile Device Management tools

42Gears TeamMobile Device Management (MDM) refers to the approaches or solutions used by companies to remotely manage their mobile devices (PDAs, Smartphones, Laptops, Netbooks). Variety of devices involved pose a big challenge for anyone who intends to implement a Mobile Device Management Solution. In fact, a single solution may never fully satisfy the all the…

Read More

Can Microsoft get back its Mojo with Windows Mobile 7?

42Gears TeamThere have been speculations as to whether Microsoft will remain an important player in the mobile phone market with their Windows Mobile operating system. Numerous news articles and blog posts have “declared” the imminent death of Windows Mobile. This article lists a few reasons why these speculations might not eventually turn out to be…

Read More

Simulating key presses in your program with keybd_event function

42Gears TeamOut of need or curiosity you might want to know how to send key presses from your native application. The core of the solution involves calling keybd_event() function which has the following prototype. VOID keybd_event(BYTE bVk, BYTE bScan, DWORD dwFlags, DWORD dwExtraInfo); bVk is the virtual-key code of the character. bScan is the hardware…

Read More

Determining IP Address of a Windows Mobile device

42Gears TeamCode to determine IP addresses of adapters on a Windows Mobile device, using IPHelper APIs. Add Iphlpapi.lib to linker settings. #include “Iphlpapi.h” PIP_ADAPTER_INFO pinfo = NULL; ULONG OutBufLen = 0; DWORD dwRet = GetAdaptersInfo(NULL, &OutBufLen); if (dwRet == ERROR_BUFFER_OVERFLOW) { pinfo = (PIP_ADAPTER_INFO)malloc(OutBufLen); dwRet = GetAdaptersInfo(pinfo,&OutBufLen); while (pinfo != NULL) { if (dwRet==ERROR_SUCCESS) {…

Read More

Debugging CeRAPIInvoke Calls

42Gears TeamRAPI (Remote API) dlls are loaded by rapiclnt.exe on the Windows Mobile device when CeRapiInvoke API is called by the desktop application. CeRapiInvoke is a general-purpose API to remotely execute a function on a Windows Mobile device that is connected to the desktop over ActiveSync. To debug your RAPI dll, do the following. 1.…

Read More

Windows Mobile Shortcuts

42Gears TeamShortcuts makes it easy for users to launch applications. Shortcut files have “.lnk” extension and they take up very little storage space. Shortcuts contain information about the application to launch along with any parameter information. They are really handy if predetermined values need to be passed to the application as command line parameters. How…

Read More

How to find Phone Signal Strength in Windows Mobile?

42Gears TeamThere is no API to determine the current signal strength of the phone radio on a Windows Mobile Phone Device. But as it changes the status is updated in the registry at the following location. [HKEY_LOCAL_MACHINESystemStatePhone] “Signal Strength” value represents the signal value (0-100). The operating system uses this value to show the bars…

Read More