[ms-wsp]: Windows Search Protocol Intellectual Property Rights Notice for Open Specifications Documentation - bet 20

|
[ms-wsp]: Windows Search Protocol Intellectual Property Rights Notice for Open Specifications Documentation
|
bet | 20/28 | Sana | 25.03.2020 | Hajmi | 349,46 Kb. | | #8793 |
Errors
Windows Search Protocol (WSP) messages indicate success two ways:
A zero value (0x00000000).
An HRESULT success value, such as DB_S_ENDOFROWSET, in which the thirty-first bit is not set.
Otherwise, WSP messages return a 32-bit error code that can either be an HRESULT or an NTSTATUS value (see section 1.8). If a buffer is too small to fit a result, a status code of STATUS_INSUFFICIENT_RESOURCES (0xC0000009A) MUST be returned, and the failing operation can be retried with a larger buffer.
All other error values are treated the same; the error is considered fatal and reported to the higher-level caller. Future messages MAY be sent over the same pipe as if no error had occurred.<23>
The following are common error codes:
E_OUTOFMEMORY (0x8007000e)
STATUS_INVALID_PARAMETER (0xc000000d)
STATUS_NO_MEMORY (0xc0000017)
STATUS_INSUFFICIENT_RESOURCES (0xc000009a)
CI_E_NOT_FOUND (0x80041815)
STATUS_INVALID_PARAMETER_MIX (0xc0000030)
ERROR_INVALID_PARAMETER (0x57)
CI_E_TIMEOUT (0x8004181F)
E_ACCESSDENIED (0x80070005)
CI_E_BUFFERTOOSMALL (0x8004180c)
Note The HRESULT and NTSTATUS numbering spaces do not currently overlap—except with values of identical meaning. However, even if there are conflicts in the future, they would not cause protocol issues as long as the value for STATUS_INSUFFICIENT_RESOURCES remains unique, because all other error values are treated the same.
Standard Properties
Properties in the GSS are represented by the combination of a property set GUID and either a string property name or an integer property ID. For details, see CFullPropSpec.
There are three classes of properties: database properties, query properties, and open properties. Database properties help control the indexing behavior and are as specified in section 2.2.1.31.1. Query properties can be used in a restriction and in some cases returned with every result. They are special because they are built into the GSS. Open properties are defined by individual applications. There is a typical set of common properties in use, but there is no requirement to use them.
Properties are characterized by the parameters that follow.
GUID and PropId: Together, these parameters establish the unique identifier for documents.
isColumn: A boolean value set to TRUE if, and only if, the property can be returned as a requested property as specified in the ProjectionColumnsOffsets argument to a RunNewQuery Generic Search Service (GSS) abstract interface call.
inInvertedIndex: A boolean value set to TRUE if, and only if, the property can be an argument to CContentRestriction within the RestrictionSet argument to a RunNewQuery GSS abstract interface call.
columnIndexType: This parameter defines whether sorting, grouping, and filtering are allowed for this property, as defined in the SortOrders, Groupings, and Restrictions parameters of the RunNewQuery GSS abstract interface call. The columnIndexType parameter is a string set to one of the following:
No value: indicates that sorting, grouping and filtering over this property are possible.
NotIndexed: sorting, grouping, and filtering are not possible for this property.
Type: This parameter indicates the data type used by this property.
Int32 – VT_I8
String - LPWSTR
Boolean – VT_BOOL
UInt16 – VT_UI2
UInt32 – VT_UI4
UInt64 – VT_UI8
Double – VT_R8
DateTime – VT_FILETIME.
Buffer – VT_BLOB_OBJECT
Byte – VT_UI1
MaxSize: An unsigned integer indicating the maximum size, in bytes, that this property can have stored or retrieved by the Generic Search Service (GSS).
VectorProperty: A boolean value that is TRUE if, and only if, this is a multiple-value property. For example, System.Author can have multiple values, one for each author of the document.
Description: Describes the most common use for a property. The names of some properties are self-explanatory; when this is the case, the descriptions are omitted.
useForTypeAhead: A Boolean value that is TRUE if and only if this is a property whose values are used as a source of completion suggestions.
Query Properties
Query Property Set
#define QueryGuid \
{0x49691c90,0x7e17,0x101a,0xa9,0x1c,0x08,0x00,0x2b,0x2e,0xcd,0xa9}
Name/PropId
|
Datatype
|
Description
|
RankVector
0x00000002
|
VT_UI4|VT_VECTOR
|
The 0-1000 rank computed for each element when performing vector ranking.
|
System.Search.Rank
0x00000003
|
VT_I4
|
The rank 0-1000 computed for this item. How rank is computed is defined by the indexing process. Typically, content and proximity restrictions influence the rank, while other comparison operators do not.
|
System.Search.HitCount
0x00000004
|
VT_I4
|
The number of words found from the query.
|
System.Search.EntryID
0x00000005
|
VT_I4
|
A unique identifier for each result found.
|
All
0x00000006
|
VT_LPWSTR
|
Allows a content restriction over all textual properties. Cannot be retrieved.
|
System.ItemURL
0x00000009
|
VT_LPWSTR
|
Full virtual path to file, including file name.
|
Storage Property Set
#define StorageGuid \
{0xb725f130,0x47ef,0x101a,0xa5,0xf1,0x02,0x60,0x8c,0x9e,0xeb,0xac}
The friendly name is Contents, the PropId is 0x00000013, the data type is VT_LPWSTR, and it is the main contents of a file. Usually this property cannot be retrieved.
Common Open Properties
A GSS can allow querying and retrieval over any property. The tables below outline some properties typically used.
Storage Property Set
#define StorageGuid \
{0xb725f130,0x47ef,0x101a,0xa5,0xf1,0x02,0x60,0x8c,0x9e,0xeb,0xac}
Name/PropId
|
Type
|
Description
|
System.ItemFolderNameDisplay
0x00000002
|
VT_LPWSTR
|
The physical path to the file, not including the file name.
|
ClassId
0x00000003
|
VT_CLSID
|
The class ID of the object, for example, WordPerfect or Microsoft® Office Word.
|
FileIndex
0x00000008
|
VT_UI8
|
The unique ID of the file.
|
USN
0x00000009
|
VT_I8
|
The update sequence number. NTFS file system drives only.
|
System.ItemNameDisplay
0x0000000A
|
VT_LPWSTR
|
The name of the file.
|
Path
0x0000000B
|
VT_LPWSTR
|
The full physical path to the file, including the file name.
|
System.Size
0x0000000C
|
VT_I8
|
The size, in bytes, of the file.
|
System.FileAttributes
0x0000000D
|
VT_UI4
|
The file attributes. Documented in Win32 SDK.
|
System.DateModified
0x0000000E
|
VT_FILETIME
|
The last time the file was written.
|
System.DateCreated
0x0000000F
|
VT_FILETIME
|
The time the file was created.
|
System.DateAccessed
0x00000010
|
VT_FILETIME
|
The last time the file was accessed.
|
AllocSize
0x00000012
|
VT_I8
|
The size of the disk allocation for the file.
|
ShortFilename
0x00000014
|
VT_LPWSTR
|
The short (8.3) file name.
|
The following table lists the attribute flag values for the Attrib property.
Attribute/Value
|
Description
|
FILE_ATTRIBUTE_READONLY
0x00000001
|
The file or directory is read-only.
Applications can read the file but cannot write to it or delete it.
For a directory, applications cannot delete it.
|
FILE_ATTRIBUTE_HIDDEN
0x00000002
|
The file or directory is hidden.
It is not included in an ordinary directory listing.
|
FILE_ATTRIBUTE_SYSTEM
0x00000004
|
The file or directory is part of the operating system, or is used exclusively by the operating system.
|
FILE_ATTRIBUTE_DIRECTORY
0x00000010
|
The handle identifies a directory.
|
FILE_ATTRIBUTE_ARCHIVE
0x00000020
|
The file or directory is an archive file.
Applications use this attribute to mark files for backup or removal.
|
FILE_ATTRIBUTE_NORMAL
0x00000080
|
The file or directory does not have another attribute set.
This attribute is valid only if used alone.
|
FILE_ATTRIBUTE_TEMPORARY
0x00000100
|
The file is being used for temporary storage.
File systems avoid writing data back to mass storage if sufficient cache memory is available, because often the application deletes the temporary file shortly after the handle is closed. In that case, the system can entirely avoid writing the data. Otherwise, the data is written after the handle is closed.
|
FILE_ATTRIBUTE_SPARSE_FILE
0x00000200
|
The file is a sparse file.
|
FILE_ATTRIBUTE_REPARSE_POINT
0x00000400
|
The file or directory has an associated reparse point.
|
FILE_ATTRIBUTE_COMPRESSED
0x00000800
|
The file or directory is compressed.
For a file, this means that all the data in the file is compressed.
For a directory, this means that compression is the default for newly created files and subdirectories.
|
FILE_ATTRIBUTE_OFFLINE
0x00001000
|
The data of the file is not immediately available.
This attribute indicates that the file data has been physically moved to offline storage.
This attribute is used by Remote Storage, the hierarchical storage management software. Applications SHOULD NOT arbitrarily change this attribute.
|
FILE_ATTRIBUTE_ENCRYPTED
0x00004000
|
The file or directory is encrypted.
For a file, this means that all data in the file is encrypted.
For a directory, this means that encryption is the default for newly created files and subdirectories.
|
FILE_ATTRIBUTE_VIRTUAL
0x00010000
|
A file is a virtual file.
|
Property Sets for Documents
#define DocPropSetGuid \
{0xf29f85e0,0x4ff9,0x1068,0xab,0x91,0x08,0x00,0x2b,0x27,0xb3,0xd9}
Name/PropId
|
Datatype
|
Description
|
System.Title
0x00000002
|
VT_LPWSTR
|
The title of the document.
|
System.Subject
0x00000003
|
VT_LPWSTR
|
The subject of the document.
|
System.Author
0x00000004
|
VT_LPWSTR
|
The author of the document.
|
System.Keywords
0x00000005
|
VT_LPWSTR
|
The document keywords.
|
System.Comment
0x00000006
|
VT_LPWSTR
|
Comments about the document.
|
DocTemplate
0x00000007
|
VT_LPWSTR
|
The name of the template for the document.
|
System.Document.LastAuthor
0x00000008
|
VT_LPWSTR
|
The most recent user who edited document.
|
System.Document.RevisionNumber
0x00000009
|
VT_LPWSTR
|
The current version number of the document.
|
System.Document.DateCreated
0x0000000A
|
VT_FILETIME
|
The total time spent editing the document.
|
System.Document.DatePrinted
0x0000000B
|
VT_FILETIME
|
The date the document was last printed.
|
System.Document.DateCreated
0x0000000C
|
VT_FILETIME
|
The date the document was created.
|
System.Document.DateSaved
0x0000000D
|
VT_FILETIME
|
The date the document was last saved.
|
System.Document.PageCount
0x0000000E
|
VT_I4
|
The number of pages in the document.
|
System.Document.WordCount
0x0000000F
|
VT_I4
|
The number of words in the document.
|
System.Document.CharacterCount
0x00000010
|
VT_I4
|
The number of characters in the document.
|
DocThumbnail
0x00000011
|
VT_CF
|
A thumbnail of the document in clipboard format.
|
System.ApplicationName
0x00000012
|
VT_LPWSTR
|
The name of the application that created the file.
|
Property Sets for Documents
#define DocPropSetGuid2 \
{0xd5cdd502,0x2e9c,0x101b,0x93,0x97,0x08,0x00,0x2b,0x2c,0xf9,0xae}
Name/PropId
|
Datatype
|
Description
|
System.category
0x00000002
|
VT_LPSTR
|
The type of document, such as a memo, schedule, or white paper.
|
System.Document.PresentationFormat
0x00000003
|
VT_LPSTR
|
The target format (for example, 35mm, printer, or video) for a presentation in PowerPoint.
|
System.Document.ByteCount
0x00000004
|
VT_I4
|
The number of bytes in a document.
|
System.Document.LineCount
0x00000005
|
VT_I4
|
The number of lines contained in a document.
|
System.Document.ParagraphCount
0x00000006
|
VT_I4
|
The number of paragraphs in a document.
|
System.Document.SlideCount
0x00000007
|
VT_I4
|
The number of slides in a PowerPoint document.
|
DocNoteCount
0x00000008
|
VT_I4
|
The number of pages with notes in a PowerPoint document.
|
System.Document.HiddenSlideCount
0x00000009
|
VT_I4
|
The number of hidden slides in a PowerPoint document.
|
DocPartTitles
0x0000000D
|
VT_LPWSTR|VT_VECTOR
|
The names of document parts. For example, in Excel, part titles are the names of spreadsheets, in PowerPoint slide titles, and in Office Word for Windows, the names of the documents in the master document.
|
System.Document.Manager
0x0000000E
|
VT_LPSTR
|
The name of the manager of the document's author.
|
System.Company
0x0000000F
|
VT_LPSTR
|
The name of the company for which the document was written.
|
Document characterization
#define DocCharacterGuid \
{0x560c36c0,0x503a,0x11cf,0xba,0xa1,0x00,0x00,0x4c,0x75,0x2a,0x9a}
The name is System.Search.Autosummary, the PropId is 0x00000002, the datatype is VT_LPWSTR, and it is a characterization or abstract of the document.
Music Property Set
#define PSGUID_MUSIC \
{56A3372E-CE9C-11d2-9F0E-006097C686F6}
Name/PropId
|
Datatype
|
Description
|
System.Music.Artist
0x00000002
|
VT_LPWSTR
|
The artist who recorded the song.
|
System.Music.Album
0x00000004
|
VT_LPWSTR
|
The album on which the song was released.
|
System.Media.Year
0x00000005
|
VT_LPWSTR
|
The year that the song was published.
|
System.Music.TrackNumber0x00000007
|
VT_UI4
|
The track number for the song.
|
System.Music.Genre0x0000000B
|
VT_LPWSTR
|
The song's genre.
|
Digital Rights Management
#define PSGUID_DRM \
{AEAC19E4-89AE-4508-B9B7-BB867ABEE2ED}
This property set contains properties that describe the digital rights associated with some media.
Name/PropId
|
Datatype
|
Description
|
System.DRM.IsProtected
0x00000002
|
VT_BOOL
|
TRUE if there is a license.
|
DrmDescription
0x00000003
|
VT_LPWSTR
|
The description of the license.
|
DrmPlayCount
0x00000004
|
VT_UI4
|
The number of times the item can be played.
|
DrmPlayStarts
0x00000005
|
VT_FILETIME
|
The date the play rights start.
|
DrmPlayExpires
0x00000006
|
VT_FILETIME
|
The date the rights expire.
|
Image Property Set
#define PSGUID_IMAGESUMMARYINFORMATION \
{0x6444048f,0x4c8b,0x11d1,0x8b,0x70,0x8,0x00,0x36,0xb1,0x1a,0x03}
Name/PropId
|
Datatype
|
Description
|
ImageFileType
0x00000002
|
VT_LPWSTR
|
The type of image file.
|
System.Image.HorizontalSize
0x00000003
|
VT_UI4
|
The horizontal size, in pixels.
|
System.Image.VerticalSize
0x00000004
|
VT_UI4
|
The vertical size, in pixels.
|
System.Image.HorizontalResolution
0x00000005
|
VT_UI4
|
The horizontal resolution, in pixels per inch.
|
System.Image.VerticalResolution
0x00000006
|
VT_UI4
|
The vertical resolution, in pixels per inch.
|
System.Image.BitDepth
0x00000007
|
VT_UI4
|
The number of bits per pixel.
|
ImageColorSpace
0x00000008
|
VT_LPWSTR
|
The description of the image color space.
|
ImageCompression
0x00000009
|
VT_LPWSTR
|
The description of the image compression.
|
ImageTransparency
0x0000000A
|
VT_UI4
|
The degree of transparency from 0-100.
|
ImageGammaValue
0x0000000B
|
VT_UI4
|
The gamma correction value.
|
System.Media.FrameCount
0x0000000C
|
VT_UI4
|
The frame count for the image.
|
System.Image.Dimensions
0x0000000D
|
VT_LPWSTR
|
The description of the image dimensions.
|
Audio Property Set
#define PSGUID_AUDIO \
{64440490-4C8B-11D1-8B70-080036B11A03}
Audio-Related Properties
Name/PropId
|
Datatype
|
Description
|
AudioFormat
0x00000002
|
VT_LPWSTR
|
The audio format.
|
System.Media.Duration
0x00000003
|
VT_UI8
|
The duration, in 100-ns units.
|
System.Audio.EncodingBitrate
0x00000004
|
VT_UI4
|
The average encoding rate, in bits per second.
|
System.Audio.SampleRate
0x00000005
|
VT_UI4
|
The sample rate, in samples per second.
|
System.Audio.SampleSize
0x00000006
|
VT_UI4
|
The sample size, in bits per sample.
|
System.Audio.ChannelCount
0x00000007
|
VT_UI4
|
The number of channels of audio.
|
Video Property Set
#define PSGUID_VIDEO \
{64440491-4C8B-11D1-8B70-080036B11A03}
Name/PropId
|
Datatype
|
Description
|
System.Video.StreamName
0x00000002
|
VT_LPWSTR
|
The name of the stream.
|
System.Video.FrameWidth
0x00000003
|
VT_UI4
|
The width, in pixels, of a frame.
|
System.Video.FrameHeight
0x00000004
|
VT_UI4
|
The height, in pixels, of a frame.
|
VideoTimeLength
0x00000005
|
VT_UI4
|
The duration, in 100-ns units.
|
System.Video.FrameRate
0x00000006
|
VT_UI4
|
The number of frames in video.
|
VideoFrameCount
0x00000007
|
VT_UI4
|
The frames per second.
|
System.Video.EncodingBitrate
0x00000008
|
VT_UI4
|
The bits per second.
|
System.Video.SampleSize
0x00000009
|
VT_UI4
|
The bits per sample.
|
System.Video.Compression
0x0000000A
|
VT_LPWSTR
|
The description of video compression.
|
Mime Properties
#define NNTPGuid \
{0xAA568EEC,0xE0E5,0x11CF,0x8F,0xDA,0x00,0xAA,0x00,0xA1,0x4F,0x93}
Name/PropId
|
Datatype
|
Description
|
MsgNewsgroup
0x00000002
|
VT_LPWSTR
|
The newsgroup for the message.
|
MsgSubject
0x00000005
|
VT_LPWSTR
|
The subject of the message.
|
MsgFrom
0x00000006
|
VT_LPWSTR
|
Who sent the message.
|
MsgMessageID
0x00000007
|
VT_LPWSTR
|
The unique ID for email.
|
MsgDate
0x0000000C
|
VT_FILETIME
|
When the message was sent.
|
MsgReceivedDate
0x00000035
|
VT_FILETIME
|
When the message was received.
|
MsgArticleID
0x0000003C
|
VT_UI4
|
The unique identifier for the newsgroup article.
| 23>
|
| |