Transferring Data Contained in Property Sets

Storing information about the contents of a document is useful, and a standard that would allow all files to share the same information with all applications would be even better. However, this is only one example of how property sets can be used.

Another use for them is in the transfer of data between OLE objects or applications. To better understand the process of transferring data between two OLE objects, consider the following example. A trader on Wall Street relies on large amounts of data to make important financial decisions regarding trades of securities. This market data must be delivered to the trader's workstation in real time (or at least very soon after it was generated).

Assume that, at any given moment during an open day on Wall Street, the trader is interested in the opening, high, low, current, and last closing price of an instrument (a specific stock), and the volume of trading on that stock so far that day. The symbol for the stock will also be needed.

As noted earlier, a property in a property set has three attributes: the property identifier, a value type indicator, and a value. In this example, the following properties can be defined:

Property Identifier
Type Indicator
Value Represented
PID_SYMBOL
VT_LPSTR
Zero-terminated string
PID_OPEN
VT_CY
Currency value
PID_CLOSE
VT_CY
Currency value
PID_HIGH
VT_CY
Currency value
PID_LOW
VT_CY
Currency value
PID_LAST
VT_CY
Currency value
PID_VOLUME
VT_I4
32-bit unsigned integer

Without worrying about how the data is transferred between the data server and the trader's application, think about the data transferred and its format. Every property set must have a FMTID associated with it.

A single data element representing the stock of XYZ during the day might look like this:

PID_SYMBOL contains "XYZ"

PID_OPEN contains 42-3/4

PID_CLOSE contains 42-3/4

PID_HIGH contains 49-1/8

PID_LOW contains 40-7/8

PID_LAST contains 47-3/8

PID_VOLUME contains 123,032

During a trading day on Wall Street only a few of the properties of a single instrument change. The opening price doesn't change all day, and the low price may go unchanged for several hours. Using property sets as the data transfer format allows applications to transfer only the data that has changed. For example, at some point during the day the Data Server may update the Traders Application by transferring the following StockQuote property set:

PID_SYMBOL contains "XYZ"

PID_HIGH contains 49-1/8

PID_LAST contains 49-1/8

PID_VOLUME contains 23,321

This example demonstrates how property sets can be used as a data transfer format, allowing sparse data representation. Transferring only the changed data enhances the overall performance of the trader's workstation.

Software for developers
Delphi Components
.Net Components
Software for Android Developers
More information resources
MegaDetailed.Net
Unix Manual Pages
Delphi Examples
Databases for Amazon shops developers
Amazon Categories Database
Browse Nodes Database