473,568 Members | 2,986 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Check if libraries or program exist

Hi, I would like know if something libraries or programs exist, and send
error with a description if the program don't find the libraries, how can
make that?.

For example:

In the use of interop libraries of Office, I declare that libraries in the
begin of code:

Imports Microsoft.Offic e.Interop

But when the user don't have that libraries, the program don't run
(inmediate crash, they don't start), and the user never know the failure
point.

Thanks in advance for any help.

Freddy Coal
Nov 19 '07 #1
4 1906
On Nov 19, 9:53 am, "Freddy Coal" <freddyc...@gma iwithoutspam.co m>
wrote:
Hi, I would like know if something libraries or programs exist, and send
error with a description if the program don't find the libraries, how can
make that?.

For example:

In the use of interop libraries of Office, I declare that libraries in the
begin of code:

Imports Microsoft.Offic e.Interop

But when the user don't have that libraries, the program don't run
(inmediate crash, they don't start), and the user never know the failure
point.

Thanks in advance for any help.

Freddy Coal
I believe if you use ClickOnce deployment you can set prerequisites
that must be installed with the application. If they do not exist (and
can't be downloaded) a more descriptive error message will be shown to
the user.

Also, I don't believe the program should crash until it tries to
reference the missing library. If that's true, you should be able to
use a simple try...catch block to handle the errors and display a more
helpful error message.

Thanks,

Seth Rowe
Nov 19 '07 #2
Seth, How put external programs like prerequisites with ClickOnce?. The Try
cath, only work inside class, I have global variables, exist a way to put
external Try Catch?.

For example, I have this code:

'--------------------
Imports EARTHLib

Public Class FC_Form

Dim camara As New CameraInfoGE
Dim GEarth As New EARTHLib.Applic ationGE

Private Sub FC_Form_Load(By Val sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load
End Sub
'---------------------

In the code I'm using Google Earth, but if the user don't have the
application, the program crash, the program don't start.

Thanks in advance for your help.

Freddy Coal.
"rowe_newsgroup s" <ro********@yah oo.comwrote in message
news:79******** *************** ***********@c30 g2000hsa.google groups.com...
On Nov 19, 9:53 am, "Freddy Coal" <freddyc...@gma iwithoutspam.co m>
wrote:
>Hi, I would like know if something libraries or programs exist, and send
error with a description if the program don't find the libraries, how can
make that?.

For example:

In the use of interop libraries of Office, I declare that libraries in
the
begin of code:

Imports Microsoft.Offic e.Interop

But when the user don't have that libraries, the program don't run
(inmediate crash, they don't start), and the user never know the failure
point.

Thanks in advance for any help.

Freddy Coal

I believe if you use ClickOnce deployment you can set prerequisites
that must be installed with the application. If they do not exist (and
can't be downloaded) a more descriptive error message will be shown to
the user.

Also, I don't believe the program should crash until it tries to
reference the missing library. If that's true, you should be able to
use a simple try...catch block to handle the errors and display a more
helpful error message.

Thanks,

Seth Rowe

Nov 20 '07 #3
"Freddy Coal" <fr********@gma iwithoutspam.co mschrieb
Seth, How put external programs like prerequisites with ClickOnce?.
The Try cath, only work inside class, I have global variables, exist
a way to put external Try Catch?.

For example, I have this code:

'--------------------
Imports EARTHLib

Public Class FC_Form

Dim camara As New CameraInfoGE
Dim GEarth As New EARTHLib.Applic ationGE

Private Sub FC_Form_Load(By Val sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load
End Sub
'---------------------

In the code I'm using Google Earth, but if the user don't have the
application, the program crash, the program don't start.
Dim camara As CameraInfoGE
Dim GEarth As EARTHLib.Applic ationGE

Sub New
try
camara =new CameraInfoGE
GEarth =new EARTHLib.Applic ationGE
catch ex as exception
'handle exception
end try
end sub

Armin

Nov 20 '07 #4
On Nov 20, 10:58 am, "Freddy Coal" <freddyc...@gma iwithoutspam.co m>
wrote:
Seth, How put external programs like prerequisites with ClickOnce?. The Try
cath, only work inside class, I have global variables, exist a way to put
external Try Catch?.

For example, I have this code:

'--------------------
Imports EARTHLib

Public Class FC_Form

Dim camara As New CameraInfoGE
Dim GEarth As New EARTHLib.Applic ationGE

Private Sub FC_Form_Load(By Val sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load
End Sub
'---------------------

In the code I'm using Google Earth, but if the user don't have the
application, the program crash, the program don't start.

Thanks in advance for your help.

Freddy Coal.

"rowe_newsgroup s" <rowe_em...@yah oo.comwrote in message

news:79******** *************** ***********@c30 g2000hsa.google groups.com...
On Nov 19, 9:53 am, "Freddy Coal" <freddyc...@gma iwithoutspam.co m>
wrote:
Hi, I would like know if something libraries or programs exist, and send
error with a description if the program don't find the libraries, how can
make that?.
For example:
In the use of interop libraries of Office, I declare that libraries in
the
begin of code:
Imports Microsoft.Offic e.Interop
But when the user don't have that libraries, the program don't run
(inmediate crash, they don't start), and the user never know the failure
point.
Thanks in advance for any help.
Freddy Coal
I believe if you use ClickOnce deployment you can set prerequisites
that must be installed with the application. If they do not exist (and
can't be downloaded) a more descriptive error message will be shown to
the user.
Also, I don't believe the program should crash until it tries to
reference the missing library. If that's true, you should be able to
use a simple try...catch block to handle the errors and display a more
helpful error message.
Thanks,
Seth Rowe
To be honest, I've only used ClickOnce prerequisites for Microsoft
products like Office and Sql Server, and never any third party
libraries. You best bet is to search Google or MSDN and try to find
some instructions. Armin has already shown you how to properly
instantiate the "unstable" code, so you might not need to worry about
the prereq's if it does what you require.

Thanks,

Seth Rowe
Nov 20 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
3447
by: fabio de francesco | last post by:
Hello, I have a couple of years of experience with C++. I started studying C++ syntax, then I read the B.Stroustrup's book, and eventually I went through the N.Josuttis' book on how to program with the C++ Standard Library. I am not a professional programmer however I would like to gain more knowledge of the language to get what could be...
1
1751
by: Peter | last post by:
Hi, When my program starts up, it uses MAPILogonEx to connect to the default email profile (set by user). The problem is, if the email profile no longer exist, it would give an error "The profile name is not valid. Enter a valid profile name", after pressing ok, the email profile wizard will come up. We don't want the error message to...
17
2488
by: Synic | last post by:
Hi guys. It's been a while since I've done programming in C. What I'm after is a multi-platform library (X11 and MS Windows at a minimum) which is not C++ that will let me program GUI apps. Something simple and straight forward to work with; ideally, open source. Any suggestions? --
13
1536
by: tsoukase | last post by:
Hello, two questions: 1) Why is a library a collection of compiled source-files while each header-file is a single source? Would it be more efficient if they were both either compiled or not? Could a "header-library" exist? 2) Why do libraries have extensions .a and .so and modules .o, which should be reserved for cc -c output? Would it...
7
2163
by: vasudev.v | last post by:
Hi All, I have one program, it links to two libraries. There is a variable with a same name in two different libraries. Compiler gives multiple declaration of same variable error. Please let me know how to resolve this error. Thanks in Advance.
11
2175
by: Saurabh | last post by:
Hi all, I want to know why do we use libraries(static or shared). We can perform that work by including header files too.I also wish to know what exactly is linking and loading. i know these are pretty easy and basic questions. But plz help me considering the fact that i am a new developer in C++. Thanking you in advance.
5
1672
by: micklee74 | last post by:
hi in my code, i use dict(a) to make to "a" into a dictionary , "a" comes from user input, so my program does not know in the first place. Then say , it becomes a = { '-A' : 'value1' , '-B' : "value2" , "-C" : "value3" , '-D' : 'value4' } somewhere next in my code, i will check for these..:
36
3159
by: Martin Larsen | last post by:
Hi, When a PHP program links to a library using include or require (or their _once variations), is the library then linked dynamically or statically? While it might seem irrelevant from a technical point of view, the linking method is important when it comes to licencing issues as some licences, like GPL, differ between those kinds of...
0
7693
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7605
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8118
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7665
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7962
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5501
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5217
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
2105
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1207
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.