Freeing Fax Resources

Under certain circumstances, it is the responsibility of the calling fax client application to manage allocated resources. This is true for applications running in the Microsoft Win32 environment and for C/C++ applications in the Component Object Model (COM) implementation environment.

In the Win32 Environment

The fax client application must deallocate the resources allocated by certain fax client function calls. This includes calls to the FaxCompleteJobParams function and to functions that begin with FaxEnum or FaxGet. Call the FaxFreeBuffer function to deallocate these resources.

Data should not be referenced if an application has dereferenced it by calling the FaxFreeBuffer function.

In the COM Implementation Environment

If you are writing a C/C++ application, you must call the SysFreeString function to deallocate the resources associated with the buffer pointed to by all pVal parameters. This is because all property methods that retrieve properties (those that end with get_PropertyName) allocate the memory required for the buffer.

For more information about creating and deallocating fax client objects, see the steps listed with each interface topic and the hierarchical diagram in The Fax Client Object Model.

If you are writing a Microsoft Visual Basic application, it is not necessary to deallocate resources.