Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Detecting SE_ERR_FNF and displaying a custom message on Pocket PC running Windows CE

5 posts in General Discussion Last posting was on 2006-08-17 03:21:26.0Z
Stuart Timm Posted on 2006-08-16 18:03:02.0Z
From: "Stuart Timm" <stuart.timm@aruplab.com>
Newsgroups: ianywhere.public.mbusinessanywhere.general
Subject: Detecting SE_ERR_FNF and displaying a custom message on Pocket PC running Windows CE
Lines: 30
Organization: ARUP Laboratories
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1807
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1807
X-Original-NNTP-Posting-Host: 12.10.132.126
Message-ID: <44e35b88@forums-2-dub>
X-Original-Trace: 16 Aug 2006 10:53:12 -0700, 12.10.132.126
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 16 Aug 2006 10:53:15 -0800, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 16 Aug 2006 11:03:02 -0700
X-Trace: forums-1-dub 1155751382 10.22.108.75 (16 Aug 2006 11:03:02 -0700)
X-Original-Trace: 16 Aug 2006 11:03:02 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.mbusinessanywhere.general:901
Article PK: 17834

I have written a custom launcher for the M-Business Client which uses
ShellExecuteEx to open AvantGo.exe. I am trying to figure out how to
correctly detect the SE_ERR_FNF (file not found) error and display my own
custom message instead of the default message:

"The file 'AvantGo' cannot be opened. Either it is not signed with a
trusted certificate, or one of its components cannot be found. You might
need to reinstall or restore this file."

I am using the following switch statement which isn't detecting the file not
found error.

retVal = ShellExecuteEx(&sei);

if (retVal = 0)
{
switch(reinterpret_cast<int>(sei.hInstApp))
{
case SE_ERR_FNF:
MessageBox(sei.hwnd, _T("My custom error message"),
_T("Custom Error Dialog Caption"), MB_ICONERROR |
MB_OK);
break;
}
}


Shuchit Posted on 2006-08-16 18:59:42.0Z
Newsgroups: ianywhere.public.mbusinessanywhere.general
Subject: Re: Detecting SE_ERR_FNF and displaying a custom message on Pocket PC running Windows CE
From: Shuchit <me@privacy.net>
References: <44e35b88@forums-2-dub>
Message-ID: <Xns982196CA5970Esvelkarprivacynet@127.0.0.1>
User-Agent: Xnews/2005.10.18 Hamster/2.1.0.0
NNTP-Posting-Host: wireless-wat-5.sybase.com
X-Original-NNTP-Posting-Host: wireless-wat-5.sybase.com
Date: 16 Aug 2006 11:59:42 -0700
X-Trace: forums-1-dub 1155754782 10.25.109.134 (16 Aug 2006 11:59:42 -0700)
X-Original-Trace: 16 Aug 2006 11:59:42 -0700, wireless-wat-5.sybase.com
Lines: 8
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.mbusinessanywhere.general:902
Article PK: 9138


"Stuart Timm" <stuart.timm@aruplab.com> wrote in news:44e35b88@forums-2-dub:

> if (retVal = 0)

That assigning 0 to retVal and not doing an equality test, if that was your
intention.

Shuchit


Greg Fenton Posted on 2006-08-17 03:19:34.0Z
From: Greg Fenton <greg.fenton_nospam_@googles-mail-site.com>
User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: ianywhere.public.mbusinessanywhere.general
Subject: Re: Detecting SE_ERR_FNF and displaying a custom message on Pocket PC running Windows CE
References: <44e35b88@forums-2-dub> <Xns982196CA5970Esvelkarprivacynet@127.0.0.1>
In-Reply-To: <Xns982196CA5970Esvelkarprivacynet@127.0.0.1>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: cpe00096b10fe8a-cm000f212f9e50.cpe.net.cable.rogers.com
X-Original-NNTP-Posting-Host: cpe00096b10fe8a-cm000f212f9e50.cpe.net.cable.rogers.com
Message-ID: <44e3e046$1@forums-1-dub>
Date: 16 Aug 2006 20:19:34 -0700
X-Trace: forums-1-dub 1155784774 69.193.72.112 (16 Aug 2006 20:19:34 -0700)
X-Original-Trace: 16 Aug 2006 20:19:34 -0700, cpe00096b10fe8a-cm000f212f9e50.cpe.net.cable.rogers.com
Lines: 19
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.mbusinessanywhere.general:907
Article PK: 9141


Shuchit wrote:
> "Stuart Timm" <stuart.timm@aruplab.com> wrote in news:44e35b88@forums-2-dub:
>
>> if (retVal = 0)
>
> That assigning 0 to retVal and not doing an equality test, if that was your
> intention.

This is why I always do my equality comparisons with the constant on the
LHS:

if (0 == retVal)

In the event that I omit the required extra "=", I get a compiler error.

g.f
--
Greg Fenton
Some Random Dude


Stuart Timm Posted on 2006-08-16 19:29:16.0Z
From: "Stuart Timm" <stuart.timm@aruplab.com>
Newsgroups: ianywhere.public.mbusinessanywhere.general
References: <44e35b88@forums-2-dub> <Xns982196CA5970Esvelkarprivacynet@127.0.0.1>
Subject: Re: Detecting SE_ERR_FNF and displaying a custom message on Pocket PC running Windows CE
Lines: 29
Organization: ARUP Laboratories
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1807
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1807
X-Original-NNTP-Posting-Host: 12.10.132.126
Message-ID: <44e36fbe$1@forums-2-dub>
X-Original-Trace: 16 Aug 2006 12:19:26 -0700, 12.10.132.126
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 16 Aug 2006 12:19:28 -0800, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 16 Aug 2006 12:29:16 -0700
X-Trace: forums-1-dub 1155756556 10.22.108.75 (16 Aug 2006 12:29:16 -0700)
X-Original-Trace: 16 Aug 2006 12:29:16 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.mbusinessanywhere.general:903
Article PK: 17829

Thanks for the info. It's been a few years since I wrote C++ code, but I
should have caught that one. Now my custom error dialog is displaying, but
only after the default error dialog is displayed. The default error dialog
says:

The file 'AvantGo' cannot be opened. Either it is not signed with a
trusted certificate, or one of its components cannot be found. You might
need to reinstall or restore this file.

Any ideas how to get rid of the default error dialog and just display my
custom one? Thanks!

- Stuart -

"Shuchit" <me@privacy.net> wrote in message
news:Xns982196CA5970Esvelkarprivacynet@127.0.0.1...
> "Stuart Timm" <stuart.timm@aruplab.com> wrote in
news:44e35b88@forums-2-dub:
>
> > if (retVal = 0)
>
> That assigning 0 to retVal and not doing an equality test, if that was
your
> intention.
>
> Shuchit


Greg Fenton Posted on 2006-08-17 03:21:26.0Z
From: Greg Fenton <greg.fenton_nospam_@googles-mail-site.com>
User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: ianywhere.public.mbusinessanywhere.general
Subject: Re: Detecting SE_ERR_FNF and displaying a custom message on Pocket PC running Windows CE
References: <44e35b88@forums-2-dub> <Xns982196CA5970Esvelkarprivacynet@127.0.0.1> <44e36fbe$1@forums-2-dub>
In-Reply-To: <44e36fbe$1@forums-2-dub>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: cpe00096b10fe8a-cm000f212f9e50.cpe.net.cable.rogers.com
X-Original-NNTP-Posting-Host: cpe00096b10fe8a-cm000f212f9e50.cpe.net.cable.rogers.com
Message-ID: <44e3e0b6$1@forums-1-dub>
Date: 16 Aug 2006 20:21:26 -0700
X-Trace: forums-1-dub 1155784886 69.193.72.112 (16 Aug 2006 20:21:26 -0700)
X-Original-Trace: 16 Aug 2006 20:21:26 -0700, cpe00096b10fe8a-cm000f212f9e50.cpe.net.cable.rogers.com
Lines: 18
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.mbusinessanywhere.general:908
Article PK: 9140


Stuart Timm wrote:
>
> The file 'AvantGo' cannot be opened. Either it is not signed with a
> trusted certificate, or one of its components cannot be found. You might
> need to reinstall or restore this file.
>

I'm going to guess that this is a PATH issue.
You might try having your C++ app "change directories" to the avantgo
dir before you launch the .exe (that way it can find any of the DLLs).

This is just a guess though. It has been more than three months since
I've played with CE...

g.f
--
Greg Fenton
Some Random Dude