2.3.7.8 FileMoniker

Referenced by: HyperlinkMoniker

This structure specifies a file moniker. For more information about file monikers, see [MSDN-FM].


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

cAnti

ansiLength

...

ansiPath (variable)

...

endServer

versionNumber

reserved1 (16 bytes)

...

...

reserved2

cbUnicodePathSize

cbUnicodePathBytes (optional)

usKeyValue (optional)

unicodePath (variable)

...

cAnti (2 bytes): An unsigned integer that specifies the number of parent directory indicators at the beginning of the ansiPath field.

ansiLength (4 bytes): An unsigned integer that specifies the number of ANSI characters in ansiPath, including the terminating NULL character. This value MUST be less than or equal to 32767.

ansiPath (variable): A null-terminated array of ANSI characters that specifies the file path. The number of characters in the array is specified by ansiLength.

endServer (2 bytes): An unsigned integer that specifies the number of Unicode characters used to specify the server portion of the path if the path is a UNC path (including the leading "\\"). If the path is not a UNC path, this field MUST equal 0xFFFF.

versionNumber (2 bytes): An unsigned integer that specifies the version number of this file moniker serialization implementation. MUST equal 0xDEAD.

reserved1 (16 bytes): MUST be zero and MUST be ignored.

reserved2 (4 bytes): MUST be zero and MUST be ignored.

cbUnicodePathSize (4 bytes): An unsigned integer that specifies the size, in bytes, of cbUnicodePathBytes, usKeyValue, and unicodePath.

If the file path specified in ansiPath cannot be completely specified by ANSI characters, the value of this field MUST be equal to the size, in bytes, of the path as a Unicode string (without a terminating NULL character) + 6. If the path can be fully specified in ANSI characters then the value of this field MUST be set to zero.

If the value of this field is greater than zero, then the cbUnicodePathBytes, usKeyValue and unicodePath fields MUST exist.

If the value of this field is zero, then the cbUnicodePathBytes, usKeyValue, and unicodePath fields MUST NOT exist.

cbUnicodePathBytes (4 bytes): An optional unsigned integer that specifies the size, in bytes, of the unicodePath field. This field exists if and only if cbUnicodePathSize is greater than zero.

usKeyValue (2 bytes): An optional unsigned integer that MUST be 3 if present. This field exists if and only if cbUnicodePathSize is greater than zero.

unicodePath (variable): An optional array of Unicode characters that specifies the complete file path. This path MUST be the complete Unicode version of the file path specified in ansiPath and MUST include additional Unicode characters that cannot be completely specified in ANSI characters. The number of characters in this array is specified by cbUnicodePathBytes/2. This array MUST NOT include a terminating NULL character. This field exists if and only if cbUnicodePathSize is greater than zero.