2.2.38 FAX_MESSAGEW

An array of the FAX_MESSAGEW data type is passed as an out parameter (as a byte array) in the FAX_EnumMessages (section 3.1.4.1.24) call. This data type is also passed as an out parameter (as a byte array) in FAX_GetMessage (section 3.1.4.1.45).

This data structure is custom marshaled as follows and uses the custom-marshaling rules defined in section 2.2.1.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

Fixed_Portion (176 bytes)

...

...

...

Variable_Data (variable)

...

...

...

Fixed_Portion (176 bytes):


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

dwSizeOfStruct

dwValidityMask

dwlMessageId

...

dwlBroadcastId

...

dwJobType

dwQueueStatus

dwExtendedStatus

lpcwstrExtendedStatusOffset

dwSize

dwPageCount

lpcwstrRecipientNumberOffset

lpcwstrRecipientNameOffset

LpcwstrSenderNumberOffset

lpcwstrSenderNameOffset

lpcwstrTsidOffset

lpcwstrCsidOffset

lpcwstrSenderUserNameOffset

lpcwstrBillingCodeOffset

tmOriginalScheduleTime

...

...

...

tmSubmissionTime

...

...

...

tmTransmissionStartTime

...

...

...

tmTransmissionEndTime

...

...

...

lpcwstrDeviceNameOffset

Priority

dwRetries

lpcwstrDocumentNameOffset

lpcwstrSubjectOffset

lpcwstrCallerIDOffset

lpcwstrRoutingInfoOffset

Padding

dwSizeOfStruct (4 bytes): A DWORD ([MS-DTYP] section 2.2.9) value that holds the size of the Fixed_Portion block, in bytes. This value MUST be 176 bytes.

dwValidityMask (4 bytes): A DWORD value that defines a bitwise combination of valid fields in FAX_ENUM_JOB_FIELDS (section 2.2.77).

dwlMessageId (8 bytes): A DWORDLONG ([MS-DTYP] section 2.2.13) value that specifies the unique identifier of the fax message.

dwlBroadcastId (8 bytes): A DWORDLONG value that holds the Broadcast Identifier (section 3.1.1).

dwJobType (4 bytes): A DWORD that specifies the job type of the archived fax.

Value/code

Meaning

JT_SEND

0x00000002

Job is an outgoing fax transmission.

JT_RECEIVE

0x00000004

Job is an incoming fax transmission.

dwQueueStatus (4 bytes): A DWORD value that contains a set of bit flags that indicate the last job status, recorded by the fax server just before the message was archived. This value MUST be a bitwise OR combination of one or more of the Job Status values listed in section 3.1.1.

dwExtendedStatus (4 bytes): A DWORD value that specifies extended status information.

Value/code

Meaning

0x00000000

No extended status.

JS_EX_DISCONNECTED

0x00000001

The sender or the caller disconnected the fax call.

JS_EX_INITIALIZING

0x00000002

The device is initializing a call.

JS_EX_DIALING

0x00000003

The device is dialing a fax number.

JS_EX_TRANSMITTING

0x00000004

The device is sending a fax document.

JS_EX_ANSWERED

0x00000005

The device answered a new call.

JS_EX_RECEIVING

0x00000006

The device is receiving a fax document.

JS_EX_LINE_UNAVAILABLE

0x00000007

The device is not available because it is in use by another application.

JS_EX_BUSY

0x00000008

The device encountered a busy signal.

JS_EX_NO_ANSWER

0x00000009

The receiving device did not answer the call.

JS_EX_BAD_ADDRESS

0x0000000A

The device dialed an invalid fax number.

JS_EX_NO_DIAL_TONE

0x0000000B

The sending device cannot complete the call because it does not detect a dial tone.

JS_EX_FATAL_ERROR

0x0000000C

The device has encountered a fatal protocol error.

JS_EX_CALL_DELAYED

0x0000000D

The device delayed a fax call because the sending device received a busy signal multiple times. The device cannot retry the call because dialing restrictions exist (some countries and regions restrict the number of retry attempts when a number is busy).

JS_EX_CALL_BLACKLISTED

0x0000000E

The device could not complete a call because the telephone number was blocked or reserved; emergency numbers such as 911 are blocked.

JS_EX_NOT_FAX_CALL

0x0000000F

The device received a call that was a data call or a voice call.

JS_EX_PARTIALLY_RECEIVED

0x00000010

The incoming fax was partially received. Some (but not all) of the pages are available.

JS_EX_HANDLED

0x00000011

The fax service processed the outbound fax document; the fax service provider (FSP) will transmit the document.

JS_EX_CALL_COMPLETED

0x00000012

The call was completed successfully.

JS_EX_CALL_ABORTED

0x00000013

The call was terminated.

lpcwstrExtendedStatusOffset (4 bytes): Offset to the lpcwstrExtendedStatus field in the Variable_Data portion of the structure. If this field is zero, dwExtendedStatus MUST be one of the predefined extended statuses. If the field is not zero, dwExtendedStatus is the extended status code as provided by the FSP.

dwSize (4 bytes): A DWORD value that specifies the size, in bytes, of the fax document.

dwPageCount (4 bytes): A DWORD value that specifies the total number of pages in the fax transmission.

lpcwstrRecipientNumberOffset (4 bytes): Offset to the lpcwstrRecipientNumber field in the Variable_Data portion of the structure.

lpcwstrRecipientNameOffset (4 bytes): Offset to the lpcwstrRecipientName field in the Variable_Data portion of the structure.

lpcwstrSenderNumberOffset (4 bytes): Offset to the lpcwstrSenderNumber field in the Variable_Data portion of the structure. Used for outgoing faxes only; otherwise, SHOULD be zero.

lpcwstrSenderNameOffset (4 bytes): Offset to the lpcwstrSenderName field in the Variable_Data portion of the structure.

lpcwstrTsidOffset (4 bytes): Offset to the lpcwstrTsid field in the Variable_Data portion of the structure.

lpcwstrCsidOffset (4 bytes): Offset to the lpcwstrCsid field in the Variable_Data portion of the structure.

lpcwstrSenderUserNameOffset (4 bytes): Offset to the lpcwstrSenderUserName field in the Variable_Data portion of the structure.

lpcwstrBillingCodeOffset (4 bytes): Offset to the lpcwstrBillingCode field in the Variable_Data portion of the structure. Billing codes are optional. Used for outgoing faxes only; otherwise, SHOULD be zero.

tmOriginalScheduleTime (16 bytes): If the fax was sent using 1 (JSA_SPECIFIC_TIME was the value of the dwScheduleAction field in the FAX_JOB_PARAM_EXW (section 2.2.14) structure submitted as the lpJobParams argument to the FAX_SendDocumentEx (section 3.1.4.1.73) call that created the fax job), this field specifies a SYSTEMTIME ([MS-DTYP] section 2.3.13) structure that specifies the date and time originally used to send the fax. The time specified is expressed in UTC. Used for outgoing faxes only. This field is valid only if the FAX_JOB_FIELD_ORIGINAL_SCHEDULE_TIME bit is set in dwValidityMask; otherwise, the value of this field SHOULD be ignored.

tmSubmissionTime (16 bytes): A SYSTEMTIME that specifies the date and time the fax message was submitted for sending. The time specified is expressed in UTC. Used for outgoing faxes only. This field is valid only if the FAX_JOB_FIELD_SUBMISSION_TIME bit is set in dwValidityMask; otherwise, the value of this field SHOULD be ignored.

tmTransmissionStartTime (16 bytes): A SYSTEMTIME that specifies the start date and time the fax message was last transmitted. The time specified is expressed in UTC.

tmTransmissionEndTime (16 bytes): A SYSTEMTIME that specifies the end date and time the fax message was last transmitted. The time specified is expressed in UTC.

lpcwstrDeviceNameOffset (4 bytes): Offset to the lpcwstrDeviceName field in the Variable_Data portion of the structure.

Priority (4 bytes): A FAX_ENUM_PRIORITY_TYPE (section 2.2.65) value that contains the priority of the fax transmission. Used for outgoing faxes only.

dwRetries (4 bytes): A DWORD value that specifies the number of failed transmission retries counted for a fax job. Used for outgoing faxes only.

lpcwstrDocumentNameOffset (4 bytes): Offset to the lpcwstrDocumentName field in the Variable_Data portion of the structure. Used for outgoing faxes only; otherwise, SHOULD be zero.

lpcwstrSubjectOffset (4 bytes): Offset to the lpcwstrSubject field in the Variable_Data portion of the structure. Used for outgoing faxes only; otherwise, SHOULD be zero.

lpcwstrCallerIDOffset (4 bytes): Offset to the lpcwstrCallerID field in the Variable_Data portion of the structure. Used for incoming faxes only; otherwise, SHOULD be zero.

lpcwstrRoutingInfoOffset (4 bytes): Offset to the lpcwstrRoutingInfo field in the Variable_Data portion of the structure. Used for incoming faxes only; otherwise, SHOULD be zero.

Padding (4 bytes): Padding for data alignment to 8-byte boundary.

Variable_Data (variable):


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

lpcwstrExtendedStatus (variable)

...

...

...

lpcwstrRecipientNumber (variable)

...

...

...

lpcwstrRecipientName (variable)

...

...

...

lpcwstrSenderNumber (variable)

...

...

...

lpcwstrSenderName (variable)

...

...

...

lpcwstrTsid (variable)

...

...

...

lpcwstrCsid (variable)

...

...

...

lpcwstrSenderUserName (variable)

...

...

...

lpcwstrBillingCode (variable)

...

...

...

lpcwstrDeviceName (variable)

...

...

...

lpcwstrDocumentName (variable)

...

...

...

lpcwstrSubject (variable)

...

...

...

lpcwstrCallerID (variable)

...

...

...

lpcwstrRoutingInfo (variable)

...

...

...

lpcwstrExtendedStatus (variable): Null-terminated character string that holds a fax-extended status string provided by the FSP.

lpcwstrRecipientNumber (variable): Null-terminated character string that holds the fax number of the fax transmission recipient. This information is stored with the fax message as part of the recipient's personal profile (section 3.1.1).

lpcwstrRecipientName (variable): Null-terminated character string that holds the name of the fax transmission recipient. This information is stored with the fax message as part of the recipient's personal profile.

lpcwstrSenderNumber (variable): Null-terminated character string that holds the fax number of the fax transmission sender. This information is stored with the fax message as part of the sender's personal profile.

lpcwstrSenderName (variable): Null-terminated character string that holds the name of the fax transmission sender. This information is stored with the fax message as part of the sender's personal profile.

lpcwstrTsid (variable): Null-terminated character string that holds the transmitting subscriber identifier. This information is stored with the fax message as part of the sender's personal profile.

lpcwstrCsid (variable): Null-terminated character string that holds the called subscriber identifier. This information is stored with the fax message as part of the recipient's personal profile.

lpcwstrSenderUserName (variable): Null-terminated character string that holds the name of the sender of an outgoing fax job. This information is stored with the fax message as part of the sender's personal profile.

lpcwstrBillingCode (variable): Null-terminated character string that holds a billing code that applies to the fax transmission. This information is stored with the fax message as part of the sender's personal profile.

lpcwstrDeviceName (variable): Null-terminated character string value that holds the name of the device used to receive or send the fax document. The device might no longer exist.

lpcwstrDocumentName (variable): Null-terminated character string that holds the document name of the fax message.

lpcwstrSubject (variable): Null-terminated character string that holds the subject used on the fax cover page.

lpcwstrCallerID (variable): Null-terminated character string that holds the caller ID of the calling device that sent the fax.

lpcwstrRoutingInfo (variable): Null-terminated character string that holds the routing string for the fax.