Platform SDK: Fax Services |
The FAX_RECEIVE structure contains information about an inbound fax document. This information includes the name of the file that will receive the fax data stream, and the name and telephone number of the receiving device.
typedef struct _FAX_RECEIVE { DWORD SizeOfStruct; // structure size, in bytes LPWSTR FileName; // pointer to file to store data stream LPWSTR ReceiverName; // pointer to receiver name LPWSTR ReceiverNumber; // pointer to receiver number DWORD Reserved[4]; // must be zero } FAX_RECEIVE, *PFAX_RECEIVE;
The fax service provider must set the ReceiverName and ReceiverNumber members in this structure. The fax service allocates the memory for these strings. The size of the memory the service allocates is equal to sizeof(FAX_RECEIVE) + FAXDEVRECEIVE_SIZE. The fax service provider must place the strings in the block of memory that follows the FAX_RECEIVE structure. Note that you must allow for the size of the FileName string that follows immediately after the FAX_RECEIVE structure. The ReceiverName and ReceiverNumber members must point to the location of the strings in the memory block.
The following code sample and diagram illustrate how to fill in the memory that the fax service allocates.
PWSTR ReceiverName; PWSTR ReceiverNumber; // // Routine to retrieve the receiver name // and receiver number here. // // Set the receiver name and receiver number data // in the FAX_RECEIVE structure; then // copy the data to the appropriate offset. // FaxReceive->ReceiverNumber = (LPWSTR) ( (LPBYTE)FaxReceive->FileName + sizeof(WCHAR)*(wcslen(FaxReceive->FileName) + 1)); wcscpy( FaxReceive->ReceiverNumber, ReceiverNumber ); FaxReceive->ReceiverName = (LPWSTR) ( (LPBYTE)FaxReceive->ReceiverNumber+ sizeof(WCHAR)*(wcslen(FaxReceive->ReceiverNumber) + 1)); wcscpy( FaxReceive->ReceiverName, ReceiverName );
The fax service provider can reformat the ReceiverName and ReceiverNumber members and transmit the reformatted data to the remote sending device as the called subscriber identifier (CSI) to comply with "T.Routing" requirements. For more information, see the RoutingInfo and CSI members of the FAX_DEV_STATUS structure.
Windows NT/2000: Requires Windows 2000.
Windows 95/98: Unsupported.
Header: Declared in faxdev.h.
Fax Service Provider Application Programming Interface Overview, Fax Service Provider Structures, FaxDevReceive, FAX_DEV_STATUS