Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to check the existence of the object?

Status
Not open for further replies.

fkwong

Programmer
Jul 5, 2002
65
US
I have a app that uses Winfax SDK but not all the user will have the Winfax installed. Is there a way to check the Winfax Software installation before I make the "fax" option available to them?

I have the following code but it did not work when I try to create the object that is not there.

Thanks!


WAIT WIND "Please Wait! Checking Winfax Software..." NOWAIT
PUBLIC oFax

oFax = CREATEOBJECT("WinFax.SDKSend")
WAIT CLEAR
IF TYPE("oFax") = "O" AND !ISNULL(oFax)
DO FORM faxacomment
ELSE
MESSAGEBOX("In order to use this option, you need to installed Winfax Software.", 48,"Alert")
ENDIF




 
I believe an error will be generated on the line oFax = CREATEOBJECT("WinFax.SDKSend") if it is not installed/registered. You could trap for the error and then bring up your messagebox.

Slighthaze = NULL
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top