looking for Delphi solution for the "Server Busy"

schuchhardp
04-29-2004, 05:26 AM
I also get the infamous "server Busy" dialog for my Delphi program that is running 24/7. I'm looking for the Delphi equivilent of the "OleRequestPendingTimeout = a_large_value" VB-statement.

I've looked through my Delphi manuals, but they are no help. Has anyone found a solution?

Thanks,
Pascal

Anonymous
04-30-2004, 11:08 PM
Bad new, it can't be done.

We are VERY well versed with the MapPoint control and have cleared countless hurdles with the product. The MP control simply does not properly expose / respond to new implementations of IMessageFilter as it should.

Since the Server Busy dialog always appears on top, our workaround was to set a timer to periodically check for the appearance of the ServerBusy dialog (just look through the active window handles) and bring our application to the front if it's found. It basically covers up the dialog while the operation completes and MP happily puts it away afterwards.

Equivalently, you can try hiding the Server Busy dialog when it appears, but I have vague memories of something not working with that technique.

In short, you can't trap the error, so just hide it. I rarely check these forums anymore, but feel free to email me directly:

zdigriz<ignore this part>@mobileiq.biz

Cheers,
Chris
VP Sales & Marketing
MobileIQ, LLC
www.mobileiq.biz

Anonymous
09-14-2004, 04:21 AM
Hi.

I encounter the same problems after a program crash or debugger program halt.

I have written a small function that kills all instances of the Mappoint object in memory, so your app will restart OK.

Hope this helps a bit...

Cheers.
Martin.

(************************************************* *******************************
Title : Procedure KillMappointInstances
Function : Kill's all active MapPoint objects anywehere in memory
Result : Number of instances found and terminated
Author : Martin Beek, martin@martinbeek.net
Uses : TLHelp32
************************************************** ******************************)

function KillMapPointInstances : Integer;
const
PROCESS_TERMINATE = $0001;
EXEFILENAME = 'MapPoint.exe';
var
ContinueLoop : BOOL;
FSnapshotHandle : THandle;
FProcessEntry32 : TProcessEntry32;
begin
Result := 0;
FSnapshotHandle := CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
FProcessEntry32.dwSize := SizeOf(FProcessEntry32);
ContinueLoop := Process32First(FSnapshotHandle, FProcessEntry32);

while Integer(ContinueLoop) <> 0 do
begin
if ((UpperCase(ExtractFileName(FProcessEntry32.szExeF ile)) =
UpperCase(ExeFileName)) or (UpperCase(FProcessEntry32.szExeFile) =
UpperCase(ExeFileName))) then
Result := Integer(TerminateProcess(
OpenProcess(PROCESS_TERMINATE,
BOOL(0),
FProcessEntry32.th32ProcessID),
0));
ContinueLoop := Process32Next(FSnapshotHandle, FProcessEntry32);
end;
CloseHandle(FSnapshotHandle);
end;

Gerhard Faber
05-07-2007, 07:07 AM
Hi,

I assigned a new MessageFilter with "CoRegisterMessageFilter" and the "server is busy" Dlg is never shown again.

"http://msdn2.microsoft.com/en-us/library/ms693324.aspx"
"http://delphi.newswhat.com/geoxml/forumhistorythread?groupname=borland.public.delphi .oleautomation&messageid=43a2d4ec$1@newsgroups.borland.com"

regards
Gerhard

 
Web mp2kmag.com
mapforums.com