Home   Index   About
Ultimate Pack


Custom Search
Example Dictionary

The stock market data transfer example (see "Transferring Data Contained in Property Sets," earlier in this appendix) might include a displayable name of "Stock Quote" for the entire set, and "Ticker Symbol" for PID_SYMBOL. If a property set contained just a symbol and the dictionary, the property set section would have a byte stream that looked like the following:

Offset Bytes

; Start of section

0000 43 01 00 00 ; DWORD size of section

0004 03 00 00 00 ; DWORD number of properties in section

; Start of PropID/Offset pairs

0008 00 00 00 00 ; DWORD Property ID (0 == dictionary)

000C 20 00 00 00 ; DWORD offset to property ID

0010 01 00 00 00 ; DWORD Property ID (1 == code page)

0014 D0 00 00 00 ; DWORD offset to property ID

  1. 07 00 00 00 ; DWORD Property ID (i.e., PID_SYMBOL)

  1. C 34 01 00 00 ; DWORD offset to property ID

; Start of Property 0 (which is really the dictionary

0020 08 00 00 00 ; DWORD Number of entries in dictionary

; (Note: No type indicator)

0024 00 00 00 00 ; DWORD dwPropID = 0

  1. 18 00 00 00 ; DWORD cb = (wstrlen("Stock Quote")+1)

; * sizeof(WCHAR) == 24

002C L"Stock Quote\0" ; char sz[24]

0044 03 00 00 00 ; DWORD dwPropID = 3 (PID_SYMBOL)

0048 1C 00 00 00 ; DWORD cb = (wstrlen("Ticker Symbol") + 1

; * sizeof(WCHAR) == 28

004C L"Ticker Symbol\0" ; char sz[28]

; The dictionary would continue, but may not contain entries for

; every possible property. Also entries do not need to be in order

; (except dwPropID == 0 must be first).

; Start of Property 1 (code page indicator)

00D0 02 00 00 00 ; DWORD type indicator (VT_12)

00D4 B0 04 00 00 ; USHORT codepage (0x04B0 == 1200 == Unicode)

; Start of Property 7 (PID_SYMBOL)

0134 1E 00 00 00 ; DWORD type indicator (VT_LPWSTR == 1F)

0138 0A 00 00 00 ; DWORD count of bytes

013C L"MSFT\0" ; WCHAR sz[5] (incl 2 bytes for the NULL)


Last news from Greatis Software

Nostalgia .Net     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 for Delphi and C++ Builder     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     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     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     Gradient Controls .Net offers controls with gradient background feature. Labels, panels and so on... Full C# source codes are available  More »

iGrid     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 projects

Dmitry Vasiliev (just.dmitry)

Related Links

Software 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

Free Tech Secrets ;) Copyright © 2008-2012 Free Tech Secrets ;) greatis just4fun network just4fun