Home All Groups Group Topic Archive Search About

Catch reference error how?

Author
22 Aug 2006 10:15 AM
Dikbill
Hi there,

I've got a Windows project with references to an ocx file.
When I run the executable and the referenced ocx isn't
available I get a Windows error.

How can I trip a reference error so that I can display a
readable error message?


Tx a lot,

Dikbill, The Netherlands
dikbill***@hotmail.com

Author
22 Aug 2006 12:26 PM
Herfried K. Wagner [MVP]
"Dikbill" <dikbill***@hotmail.com> schrieb:
> I've got a Windows project with references to an ocx file.
> When I run the executable and the referenced ocx isn't
> available I get a Windows error.
>
> How can I trip a reference error so that I can display a
> readable error message?

I suggest to deploy the application using a setup (MSI package) which will
make sure the OCX file gets installed properly on the destination machine.
By choosing this approach you won't have to work around about deployment
problems in your own source code.

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://dotnet.mvps.org/dotnet/faqs/>
Author
22 Aug 2006 2:38 PM
Dikbill
Thanx for your quick response.
I do already use a MSI package but users sometimes
remove the ocx/dlls which are needed.
Then they get a message which realy says nothing of what is
wrong at that time.

I want to give a clear error message so they can call out support
number with a good error message so the time to resolve the problem
will be as short as possible.

Thnx again,

Dikbill, The Netherlands
dikbill***@hotmail.com


Show quoteHide quote
"Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> schreef in bericht
news:eKRUCZexGHA.2264@TK2MSFTNGP02.phx.gbl...
> "Dikbill" <dikbill***@hotmail.com> schrieb:
>> I've got a Windows project with references to an ocx file.
>> When I run the executable and the referenced ocx isn't
>> available I get a Windows error.
>>
>> How can I trip a reference error so that I can display a
>> readable error message?
>
> I suggest to deploy the application using a setup (MSI package) which will
> make sure the OCX file gets installed properly on the destination machine.
> By choosing this approach you won't have to work around about deployment
> problems in your own source code.
>
> --
> M S   Herfried K. Wagner
> M V P  <URL:http://dotnet.mvps.org/>
> V B   <URL:http://dotnet.mvps.org/dotnet/faqs/>