|
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.
| Last news from Greatis Software |
 |
|
Nostalgia .Net |
|
.Net is powerful, but not all-powerful, so sometimes we need to use Win32 API for our .Net applications. It's simple enough with Platform Invoke if you have Win32 skill, but we do not always have time to dig the ancient documentation, declare the special types that are compatible with Win32, find the values of the Win32's constants and so on. Nostalgia .Net offers several simple-to-use classes, and components that will allow you to forget about the headache of Win32 and just use the power of Win32 in your application the same way as you use the native. Net classes. More » |
| Recommended software for developers |
 |
|
Ultimate Pack |
|
Component pack for Delphi and C++ Builder that contains runtime form designer, runtime object inspector, print suite and much more for the very special price. More » |
 |
|
Form Designer .Net |
|
Unique runtime form design solution that allows to edit any form in .Net WinForms application at runtime with full source codes for only 300 euro! More » |
 |
|
Print Suite .Net |
|
Print Suite .Net is a set of components for easy printing texts, images and grids from your WinForms applications. Full C# source codes are available More » |
 |
|
Gradient Controls .Net |
|
Gradient Controls .Net offers controls with gradient background feature. Labels, panels and so on... Full C# source codes are available More » |
 |
|
Greatis iGrid |
|
iGrid plots drawing grid right over your desktop, so you can use it everywhere, with any drawing application without any special plugins for different graphic editors. More » |
All the contacts and projectsDmitry Vasiliev (just.dmitry)
Related LinksSoftware for Visual Studio .NET developers Software for Delphi and C++ Builder developers Software for Visual Basic 6 developers Delphi Tips&Tricks MegaDetailed.NET More Online Helps Win32 Programmer's Reference Win32 Multimedia Programmer's Reference OLE Programmer's Reference Microsoft Windows Pen API Programmer's Reference Microsoft Windows Sockets 2 Reference Microsoft Windows Telephony API (TAPI) Programmer's Reference Unix Manual Pages
|