Unfortunately Remote Desktop Mobile (RDM) Client, if part of your Windows Mobile 6.1 device, will disconnect after 10 minutes of user idle time. This value seems to be hardcoded into the application. Various searches on the internet lead to this assumption. So regardless of your server or client settings, RDM will disconnect after 10 minutes of user idle.
The following code is from this blog. For those of you not being able to compile the code, I have attached an ArmV4i executable you can use directly on your device.
Here is the code:
#include "stdafx.h"
#include
#include
int _tmain(int argc, _TCHAR* argv[])
{
int const FIVEMINUTES = 1000*60*5; HWND hWndRDM = NULL;
SHELLEXECUTEINFO sei = {0};
sei.cbSize = sizeof(sei);
sei.nShow = SW_SHOWNORMAL;
sei.lpFile = TEXT("\\Windows\\wpctsc.exe");
sei.lpParameters = TEXT(" ");
if (!ShellExecuteEx(&sei))
{
MessageBox(NULL, TEXT("Couldn't launch RDP Client"),
TEXT("Remote Desktop Launcher"), MB_OK | MB_TOPMOST | MB_SETFOREGROUND);
goto Exit;
}
else
Sleep(500);
do
{
DEBUGMSG(1, (L"FindWindow 'TSSHELLWND'...\n"));
hWndRDM = FindWindow(_T("TSSHELLWND"), NULL);
if (NULL != hWndRDM)
{
DEBUGMSG(1, (L"SetForGroundWindow\n"));
SetForegroundWindow(hWndRDM);
DEBUGMSG(1, (L"MOUSEEVENTF_MOVE 1\n"));
mouse_event(MOUSEEVENTF_MOVE, 100, 0, 0, 0);
Sleep(250);
DEBUGMSG(1, (L"MOUSEEVENTF_MOVE 2\n"));
mouse_event(MOUSEEVENTF_MOVE, -100, 0, 0, 0);
DEBUGMSG(1, (L"Sleep ...\n"));
Sleep(FIVEMINUTES);
}
else
{
DEBUGMSG(1, (L"FindWindow failed for 'TSSHELLWND'\n"));
goto Exit;
}
}
while (TRUE);
Exit:
DEBUGMSG(1, (L"Exit!\n"));
if (NULL != hWndRDM)
CloseHandle(hWndRDM);
return 0;
}
<!-- Social Bookmarks BEGIN -->
<!-- Social Bookmarks END -->