FaxMan SDK Version 4.7
Registering your Application with the FaxMan system

Before your application can call any functions in the FaxMan system, it must register itself with the server using the FaxRegisterApp function. Registration is required for a couple of reasons:


The server needs to know where to send the event notifications your application will need to keep track of what's happening in the server. (NOTE that your application will receive no event notifications unless it specifically requests them by calling the FaxSubscribe function!).


If your application needs to handle print events then it must pass the name of the associated FaxMan printer as the first parameter to the FaxRegisterApp call so the server can find it in order to send all of the event notifications you need. If your application doesnt need print notifications then it can pass NULL for the parameter.


The following code fragment illustrates how to register your application:




pInfo = FaxRegisterApp("MyUniqueAppID", (HWND)hMyWnd);


That's all there is to it. One important point here is that the PAPPINFO returned by the FaxRegisterApp function should be declared as a global or in such a way as to remain available for the duration of your FaxMan usage. Every other FaxMan function call you make will require the PAPPINFO returned from FaxRegisterApp.


The flip side to registering your application before using the FaxMan system is, of course, to un-register it when you're done using the FaxMan system. This is done quite easily also through use of the FaxUnregisterApp function call. Failure to call the FaxUnregisterApp function before terminating your application could result in memory and resource leaks, so please be careful about this.



© 2013 Data Techniques, Inc. All Rights Reserved.

Send comments on this topic.