Equisys technical notes

Technical guidance, explanations and fixes for our products

INFO: Zetafax COM API FAQ

Print

ZTN1240

ID: ZTN1240

This Zetafax technical note applies to:

  • Zetafax COM API

Summary

This document answers frequently asked questions about the COM API.

More information

Q: What is the difference between the COM API and the C API?

A: The COM API is a wrapper for the C API.  It adds a hierarchical structure to the function calls, and represents the API's complex structures as collections of objects.  It was written to make the API more accessible from people writing applications with scripting languages and Visual Basic.

Q: Can you show me some code?

A: Using the COM API from within Visual Basic to send a high priority fax in 9 lines:

' Declare objects

Dim oZfAPI As New ZfLib.ZfAPI

Dim oUserSession As ZfLib.UserSession

Dim oNewMessage As ZfLib.NewMessage

' Logon and create new message:

Set oUserSession = oZfAPI.Logon(" JJONES" , False)

Set oNewMessage = oUserSession.CreateNewMsg

' Set properties:

oNewMessage.Recipients.AddFaxRecipient " Sam Smith" , _

                                                                            " ACME plc" , " 020 7123 4567"

oNewMessage.Text = " I am a fax!"

oNewMessage.Priority = zfPriorityUrgent

' Send!

oNewMessage.Send

Q: What can you do with the COM API?

A: You can use the API to send faxes and to enumerate sent and received faxes. It can also be used to stop and start and gather status information about the Zetafax server, its devices and its LCR links.

Q: What can you not do with the COM API?

A: You cannot use the COM API to add, edit or delete users, or change the Zetafax server's configuration.  However, this can be accomplished using the AdminAPI.  Please contact your Distributor or Sales Representative for further information.

Q: With which development environments can the COM API be used?

A: It is compatible with all development environments which support COM, e.g. Visual Basic 6, Visual C++ 5 and 6, and Visual Studio .NET.

Q: Can you use the COM API with ASP?

A: Yes, but if the Zetafax server is installed on another computer you need to make sure that the web site is running as a user with permissions to access network drives, not the IWAM, IUSR or ASPNET accounts. (On Windows 2000 this could be done with COM+).

Q: In what language is the COM API written?

A: The API is written in C, the COM API is written in C++.

Q: With which operating systems is the COM API compliant?

A: The COM API is supported on all operating systems supported by the Zetafax client. (95, 98, Me, NT4, W2K, W2K3 and XP).

Q: Does the COM API work with managed code?

A: Yes. Once the COM API is registered you need to import it as a reference.

Q: Is the API thread-safe?

A: No. If you are using the API in a multi-threaded application it is best to protect all access to the Zetafax API with a critical section.

Q: How do you secure the COM API?

A: Zetafax stores user's files on the file system. To secure Zetafax you use NT security to only allow certain people access to each user's files.

Q: How does the COM API handle authentication?

A: You have to log on as a Zetafax user to user the COM API. To stop someone logging on to another user's account you have to use NT security on your file system.

Q: Which file formats are supported by the COM API?

A: By default, the API only supports text, G3N, G3F and some standard graphics formats. (Such as GIFs or Bitmaps). However, if you have the document rendering add-on, Doctiff, you can use over 200 other file types as well (see ZTN1261 - INFO File types supported by document conversion add on DOCTIFF).

Q: Can the COM API handle files as streams?

A: No, the API assumes that all files are already stored on the file system.

Q: Does the COM API support events?

A: No, you have to poll for changes.

Q: Can I use the COM API to send SMS messages?

A: Yes, however in the current version of the COM API the method is marked as hidden in the type library. See ZTN1239 - HOWTO Develop and redistribute your fax-enabled applicationfor details.

Q: How do I get the COM API?

A: See ZTN1239 - HOWTO Develop and redistribute your fax-enabled application for details on how to get the COM API.

References

ZTN1239-HOWTO Develop and redistribute your fax-enabled application

ZTN1261 - INFO File types supported by document conversion add on DOCTIFF

Last updated:  12 October 2005 (GR/SV)

EquisysLogo
 

Recent news

This article describes the new features and other improvements in the November 2019 release of the Zetadocs Expenses service. Zetadocs Expenses Release ...

This article describes the new features and other improvements in the October 2019 release of the Zetadocs Expenses service. Zetadocs Expenses Release date and version ...