Webcam32 provides an interface to external applications. These applications can take control of Webcam32 operation. This means that Webcam32 can have its functions extended without limitation.
The technology used to provide external access to Webcam32 facilities is called Automation. This is an architected interface to any application and uses Microsoft's COM/OLE technology. From a programmer's perspective, Webcam32 is just another automation server. These can be accessed trivially from either Visual Basic or Visual C++.
The following methods are currently exported by Webcam32 for external usage.
| Method Name | Parameters | Description |
| FtpNow | Causes Webcam32 to initiate an FTP request to the FTP server immediately. | |
| FtpServer | ServerName - Name of the FTP server to which future requests for FTP upload will be directed | Causes Webcam32 to change the current FTP server target. Future Webcam32 FTP uploads will be targeted at this new FTP server |
| FtpDirectory | Directory - Name of the FTP directory into which new files will be saved | Causes Webcam32 to change the current directory on the FTP server into which new uploaded files will be saved |
| FtpFileName | FileName - Name to be used for new Webcam32 created files | Causes Webcam32 to change the name of the image files to be created on the FTP server when Webcam32 performs an FTP upload |
| FtpUserid | Userid - Userid to be used when logging on to the FTP server | Causes Webcam32 to change the userid it will use to logon to the FTP server |
| FtpPassword | Password - Password for the Userid to be used when logging on to the FTP server | Causes Webcam32 to change the password it will use to authenticate the userid to the FTP server |
Controlling Webcam32 from Visual Basic could not be simpler. In the Visual Basic code, simply define an object, create a Webcam32 instance of the object and then invoke the methods of Webcam32. The following code extract illustrates
Dim myObj As Object
Set myObj = CreateObject("Webcam32.Application")
myObj.FtpNow
Webcam32 provides a Type-Library which can be used by the Visual C++ V5 ClassWizard to create a new class corresponding to the Webcam32 API object. Invoking the members of this Type-Library result in the dispatch of these requests to Webcam32 for processing. For a detailed walk-through of creating a Webcam32 access client using Microsoft Visual C++, visit here.
The interface is not yet cast in stone. As user requests arrive, I will add/subtract function from the interface. Please submit any suggestions you have for enhancements to the API interface. Mail to webcam32@surveyorcorp.com please.
A full sample application illustrating all of the Webcam32 automation functions is available here.
Webcam32 has been configured to only allow one instance to be registered for OLE Automation per machine. This means that if multiple instances of Webcam32 are invoked by the end user, only the last one started can be under the control of a client.
Webcam32 servers all instances of new access objects in the same EXE. If Webcam32 has not been started prior to attempting to access by a client, NO new instance will be started. The client will receive a failure indication when it attempts to access the server.