source: trunk/WPSundoc/classinfo.txt@ 9

Last change on this file since 9 was 2, checked in by stevenhl, 8 years ago

Import sources from cwmm-full.zip dated 2005-03-21

File size: 20.2 KB
Line 
1Warp 4 FP 10
2
3WPFolder instance data in the .CLASSINFO EA:
4
5
6---- Key 0x0b7a (2938 IDKEY_FDRGRIDINFO) ----
7
8Type: 0x0004 (binary)
9Size: 8
10
11Contains the grid spacing for folders. Apparently two ULONG. First is
12horizontal, second vertical spacing.
13
14Example:
15
1604 00 7A 0B 08 00 FF 00 00 00 80 00 00 00
17^^^^^ ^^^^^ ^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^
18| | | | |
19| | | | Vertical spacing
20| | | Horizontal spacing
21| | Size
22| Key
23Binary
24
25
26---- Key 0x0b74 (2932 Sort class) ----
27
28FF D0 FF FF FF D0 FF FF FF 04 00 74 0B 10 00 08 ÿÐÿÿÿÐÿÿÿ..t....
29 ^^^^^ ^^^^^ ^^^^^ ^^
30 | | | |
31 | | | Unknown
32 | | Size, Init: 0x10, will be modified: already seen: 0x22
33 | Key
34 Binary
35
3600 57 50 49 6D 61 67 65 46 69 6C 65 00 FF FF .WPImageFile.ÿÿ.
37^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^
38| | |
39| Sort Class name with ending 0 unknown
40Unknown
41
42
43---- Key 0x0b71 (2929 Sort page) ----
44
45 04
4600 71 0B 18 00 FE FF FF FF 00 00 00 00 FE FF FF .q...þÿÿÿ....þÿÿ
47 ^^^^^ ^^^^^ ^^^^^^^^^^ ^^
48 | | | |
49 | | | Always sort: 01=yes, 00=no
50 | | Init: FE FF FF FF, later standard sort e.g. 05 00 00 00
51 | Size 0x18 (24)
52 Key
53
54FF 00 00 00 00 00 00 00 00 00 00 00 00 04 00 7A ÿ..............z
550B 08 00 00 00 00 00 00 00 00 00 02 00 7B 0B 04 .............{..
5600 00 00 00 00 09 00 48 00 57 50 4F 62 6A 65 63 .......H.WPObjec
5774 00 04 00 0B 00 20 00 01 00 00 00 00 00 00 00 t..... .........
5809 00 00 00 80 00 00 00 00 00 00 00 00 00 00 00 ....€...........
5903 00 00 00 02 00 00 00 04 00 0C 00 0E 00 02 00 ................
6032 31 37 33 36 34 40 32 30 00 FF FF 04 00 04 00 217364@20.ÿÿ....
6108 00 FF FF FF FF FF FF FF FF 00 00 00 00 00 00 ..ÿÿÿÿÿÿÿÿ......
62
63
64---- Key 0x0b73 (2931 IDKEY_FDRLONGARRAY) ----
65
66Type: 0x0004 (binary)
67Size: 0x54 (84)
68
69Example:
70
7100 00 04 00 73 0B 54 00 80 00 30 00 64 00 50 00 ....s.T.€.0.d.P.
72 ^^^^^ ^^^^^ ^^^^^ ^^ ^^ ^^
73 | | | | | |
74 | | | | | View (2. Tree): 0x50: with lines
75 | | | | | 0x10: without lines
76 | | | | Tree Icon: 0x64: small
77 | | | | 0x44: normal
78 | | | | 0x41: invisible
79 | | | |
80 | | | View (first view page): 22h: Non flowed, single column, small icons
81 | | | 02h: Non flowed, single column, normal icons
82 | | | 01h: Non flowed, single column, invisible icons
83 | | | 32h: Non flowed, multiple columns, small icons
84 | | | 12h: Non flowed, multiple columns, normal icons
85 | | | 11h: Non flowed, multiple columns, invisible icons
86 | | Size (84 dec) 04h: Flowed as placed normal icons
87 | | 24h: Flowed as placed small icons
88 | Key 80h: Gridded
89 Binary
90
9108 80 30 00 03 00 00 00 00 00 00 00 FF FF FF FF .€0.........ÿ
92 ^^
93 |
94
95
96ÿÿÿ
9700 00 00 40 EF FF FF FF EF FF FF FF DD FF FF FF ...@ïÿÿÿïÿÿÿÝÿÿÿ
98EF FF FF FF EF FF FF FF DD FF FF FF 00 00 00 40 ïÿÿÿïÿÿÿÝÿÿÿ...@
9900 00 00 40 00 00 00 40 00 00 00 00 02 00 00 00 ...@...@........
100D0 FF FF FF D0 FF FF FF D0 FF FF FF 04 00 74 0B ÐÿÿÿÐÿÿÿÐÿÿÿ..t.
101 ^^
102 |
103 Last byte
104
105
106----------------------
107Data structures:
108
109#define INSTANCEDATA_TYPE_LONG 0x0002
110#define INSTANCEDATA_TYPE_STRING 0x0003
111#define INSTANCEDATA_TYPE_BINARY 0x0004
112
113/* Every block of instance data starts with this struct.
114 The data follows directly after this header */
115typedef struct _InstanceDataHead
116{
117USHORT usType; /* One of the INSTANCEDATA_TYPE_* constants */
118USHORT usKey; /* key used in wpSaveXXX() */
119USHORT usLength; /* size of data followingalue */
120}INSTANCEDATAHEAD;
121
122
123/* The following structs represent the different types
124 of instance data */
125typedef struct _wpInstanceDataLong
126{
127USHORT usType; /* 0x0002 */
128USHORT usKey; /* key used in wpSaveLong() */
129USHORT usLength; /* size of value, always 0x0004 */
130ULONG ulValue;
131}INSTANCEDATALONG;
132
133
134typedef struct _wpInstanceDataString
135{
136USHORT usType; /* 0x0003 */
137USHORT usKey; /* key used in wpSaveString() */
138USHORT usLength; /* String length including terminating 0 */
139UCHAR ucData[]; /* The string including a terminating 0 */
140}INSTANCEDATASTRING;
141
142
143typedef struct _wpInstanceDataBinary
144{
145USHORT usType; /* 0x0004 */
146USHORT usKey; /* key used in wpSaveData() */
147USHORT usLength; /* Size of data block */
148BYTE data[]; /* Data */
149}INSTANCEDATABINARY;
150
151-----------------
152
153/* Instance data block for a class. For every class in the chain of classes
154there may be one of these blocks. The current class is the first, the parent class
155instance data follows, then the grand parent class instance data etc. Last one is
156always WPObject. */
157typedef struct _InstanceDataBlockHead
158{
159USHORT usClassNameLength; /* Length of class name including terminating 0 */
160USHORT usDataSize; /* Size of data block starting after this structure */
161UCHAR ucClassName[]; /* Array holding classname with terminating 0 */
162}DATABLOCKHEAD;
163 /* Data block with variable length is immediately following.
164 This data block consist of several INSTANCEDATALONG/STRING/BINARY */
165
166/* The above structure is documented in wpobject.idl as WPSRCLASSBLOCK: */
167
168 /* Notes: The class name immediately follows the control block. The
169 * first instance variable control block immediately follows
170 * this.
171 */
172 typedef struct _WPSRCLASSBLOCK
173 {
174 SHORT ClassNameLength; /* Length of class name, including the
175 * .. null terminator. This must be a
176 * .. SHORT and must be at the beginning
177 * .. of the structure.
178 */
179 USHORT IVarLength; /* Length of instance variable
180 * .. information, including the two-
181 * .. byte null terminator
182 */
183 } WPSRCLASSBLOCK;
184
185----------------
186
187struct CLASSINFO
188{
189const USHORT usEAType; /* Always EAT_BINARY: 0xFFFE */
190USHORT usSize; /* Size of data starting with usUnknown1 */
191USHORT usUnknown1;
192USHORT usUnknown2;
193USHORT usDataSize; /* Data size following the class name (starting with usOffset) */
194USHORT usUnknown3;
195UCHAR ucClassName[]; /* The class of this object including the terminating 0, e.g. WPDataFile */
196USHORT usOffset; /* Offset to WPObject instance data block starting at usOffset */
197USHORT usUnknown4; /* Seems to be always 0x19c9 (c9 19)*/
198USHORT usUnknown5; /* Seems to be always 0x0010 */
199USHORT usUnknown6; /* Always the same as usUnknown4 0x19c9 */
200USHORT usSizeInstanceData; /* Size of all INSTANCEDATABLOCKs + sizeof(usSizeInstanceData2) + sizeof(usUnknown6)
201 + sizeof(usUnknown7) + sizeof(usUnknown8) + sizeof(usSizeInstanceData) */
202USHORT usUnknown7; /* Always the same as usUnknown4 0x19c9 */
203USHORT usSizeInstanceData2; /* Size of all INSTANCEDATABLOCKs including 6 terminating zero bytes.
204 Each INSTANCEDATABLOCK structure is followed by a data block of variable length. */
205USHORT usUnknown8; /* Seems to be alway 0x0000 (?) */
206INSTANCEDATABLOCK instanceDataBlocks[]; /* One or more instance data blocks. At least the WPObject data block is present. */
207 /* The WPObject instance data block is always the last one. Attention: the instance
208 data blocks may have different sizes! */
209const UCHAR ucZero[6]; /* 6 terminating zero bytes */
210}
211
212Remark:
213All data is stored in INTEL byte order in the EA, this means lowByte-HighByte.
214See example.
215
216******************* Examples *************************************************
217
218FE FF 72 00 10 00 00 00 5F 00 00 00 57 50 44 61 þÿr....._...WPDa
219^^^^^ ^^^^^ ^^^^^ ^^^^^^^^^^^
220| | | |
221| | | Class
222| | |
223| | Total data size following starting after the class name and
224| | including the 6 terminating 0 bytes.
225| |
226| |
227| Size of data following (here 114 dez). Total size of EA is this + 4 (FE FF + size-word)
228|
229|
230EAT_BINARY
231
232 |----------------------------
23374 61 46 69 6C 65 00 |10 00 2F 15 10 00 2F 15 59 taFile.../.../.Y
234^^^^^^^^^^^^^^^^^^^^ |__________________________________________________Controllblock. Always 16 bytes
235 ^^^^^ ^^^ ^^
236 | | |
237 | | Data size til end starting here * (???)
238 | * <-----------------------------------|
239 |
240 Total data to Begin of WPObject data block (length word)
241
242--------------------|
24300 2F 15 4F 00 00 00| 09 00 3C 00 57 50 4F 62 6A ./.O.....<.WPObj
244____________________| ^^^^^ ^^^^^ ^^^^^^^^^^^^^^
245^^ ^^^^^ | | |
246 | | | |
247 | | | Class name in wpSave*() with terminating 0
248 | | |
249 | | Data in WPObject data block starting after the name (including 0).
250 | |
251 | WPObject starts here: Length of name including terminating 0.
252 | In this example it's the first instance data block.
253 |
254 Size of following data beginning with first class instance data block including terminating 6 zero bytes
255
256
25765 63 74 00 04 00 0B 00 20 00 04 00 00 00 00 00 ect..... .......
258^^^^^^^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^^^^^^^^^^^^^
259 | | |
260 | | Value
261 | |
262 | Length
263 |
264 Key (4001 dez)
265
26600 00 09 00 00 00 10 00 00 00 00 00 00 00 00 00 ................
267^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
268
26900 00 03 00 00 00 02 00 00 00 04 00 0C 00 02 00 ................
270^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^ ^^^^^ ^^^^^
271Value cont. | | |
272 | | Length
273 | |
274 | Key
275 |
276 Value is ??
277
278FF FF 04 00 04 00 08 00 FF FF FF FF FF FF FF FF ÿÿ......ÿÿÿÿÿÿÿÿ
279^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^
280| | | | |
281| | | | Value
282| | | |
283| | | Length
284| | |
285| | Key
286| |
287| Value type
288|
289Value
290
291
29200 00 00 00 00 00 ......
293^^^^^^^^^^^^^^^^^
294|
295Terminating 6 zero bytes
296
297
298*********************************
299
300
301
302
303
304******************************************************
305
306Complex example:
307
308
309FE FF FE 00 00 00 00 00 F0 00 00 00 43 57 4D 50 þÿþ.....ð...CWMP
310^^^^^ ^^^^^ ^^^^^ ^^^^^^^^^^^
311| | | |
312| | | Class
313| | |
314| | Total data size following starting after the class name and
315| | including the 6 terminating 0 bytes.
316| |
317| |
318| Size of data following (here 254 dez). Total size is this + 4 (FE FF + size-word)
319|
320|
321EAT_BINARY
322
323
32433 00 A1 00 2D 15 10 00 2D 15 EA 00 2D 15 E0 00 3.¡.-...-.ê.-.à.
325^^^^^ ^^^^^ ^^^^^
326| | |
327| | Size of all instance data blocks following including terminating zero bytes
328| |
329| 161 Offset to WPObject starting from this word. See below for an explanation
330|
331Class(cont.)
332
333
33400 00 08 00 85 00 43 57 41 75 64 69 6F 00 02 00 ....…
335.CWAudio...
336 ^^^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^
337 | | | |
338 | | | Value is a LONG ->wpSaveLong()
339 | | |
340 | | Class name in wpSave*() with terminating 0
341 | |
342 | Total length of data for this name starting after the terminating 0
343 |
344 Length of Class name incl. terminating 0
345
346
347A1 0F 04 00 56 01 00 00 02 00 A3 0F 04 00 44 AC ¡...V.....£...D¬
348^^^^^ ^^^^^ ^^^^^^^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^
349| | | | | | |
350| | | | | | Value
351| | | | | |
352| | | | | Length
353| | | | |
354| | | | Key
355| | | |
356| | | Value is a LONG
357| | |
358| | Value (here: 342dez)
359| |
360| Length
361|
362Key (4001 dez)
363
364
36500 00 02 00 A2 0F 04 00 02 00 00 00 02 00 A4 0F ....¢.........€.
366^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^
367| | |
368| LONG value LONG value
369|
370Value cont.
371
37204 00 10 00 00 00 02 00 A5 0F 04 00 67 8A 62 00 ........¥...gŠb.
373^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
374| |
375LONG value cont. LONG value
376
37702 00 AC 0F 04 00 8B 3A 05 00 03 00 A6 0F 12 00 ..¬...‹:....Š...
378^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^ ^^^^^ ^^^^^
379| | | |
380LONG value | | Length of String in wpSaveString() including terminating 0
381 | |
382 | Key for wpSaveString
383 |
384 Value is a string
385
386
38757 6F 75 6E 64 20 49 6E 20 4D 79 20 48 65 61 72 Wound In My Hear
388^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
389|
390Value of wpSaveString() (+ terminating 0)
391
39274 00 03 00 A7 0F 0B 00 50 72 6F 70 61 67 61 6E t...§...Propagan
393^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^
394 | | | |
395 | | | String value of wpSaveString()...
396 | | |
397 | | Length of string including 0
398 | |
399 | Key for wpSaveString (here: 4007dez)
400 |
401 Value is a string ->wpSaveString()
402
403
40464 61 00 03 00 A8 0F 05 00 31 32 33 34 00 03 00 da...š...1234...
405^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^
406 | |
407 | String value
408 |
409 String with length 5 (including 0)
410
411
412A9 0F 01 00 00 03 00 AA 0F 01 00 00 03 00 AB 0F ©......ª......«.
413^^^^^ ^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^
414| | | | |
415| | | Empty string Empty string
416| | |
417| | |
418| | String (here: only terminating 0)
419| |
420| Length of string (here: 1 this means an empty string, only the terminating 0)
421|
422Key
423
424*************** Now following WPObject instance data ******************
425
42601 00 00 09 00 3C 00 57 50 4F 62 6A 65 63 74 00 .....<.WPObject.
427^^^^^^^^ ^^^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^
428 | | |
429 | | Class name with terminating 0
430 | |
431 | Total length of this data block starting after the name
432 |
433 Length of Class name incl. terminating 0
434
43504 00 0B 00 20 00 EF BB 00 00 00 00 00 00 09 00 .... .ï»........
436^^^^^ ^^^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
437| | | |
438| | | Value
439| | |
440| | Length
441| |
442| Key
443|
444
44500 00 00 00 00 00 00 00 00 00 00 00 00 00 03 00 ................
446^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
447
448
44900 00 02 00 00 00 04 00 0C 00 02 00 FF FF 04 00 ............ÿÿ..
450^^^^^^^^^^^^^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^
451| | | | | |
452Value | | | | Value is a ??
453 | | | |
454 | | | Value
455 | | |
456 | | Length (here 2)
457 | |
458 | Key
459 |
460 Value is a ??
461
46204 00 08 00 FF FF FF FF FF FF FF FF 00 00 00 00 ....ÿÿÿÿÿÿÿÿ....
463^^^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^
464| | | |
465| | Value ??? 6 terminating 0 bytes
466| |
467| Length
468|
469Key
470
47100 00 ..
472^^^^^
473|
474???
475
476---------------------------------
477
478Example 1:
479
480FE FF E9 00 10 00 00 00 D3 00 00 00 57 50 43 6F þÿé.....Ó...WPCo
4816D 6D 61 6E 64 46 69 6C 65 00
482 --> 6E 00 2D 15 10 00 mmandFile.n.-...
483 ^^^^^
484 |
485 110 Offset to WPObject
486
487 2D 15 CD 00 2D 15 C3 00 00 00 0E 00 4C 00 57 50 -.Í.-.Ã.....L.WP
488 50 72 6F 67 72 61 6D 46 69 6C 65 00 04 00 0A 00 ProgramFile.....
489 14 00 00 00 00 00 02 00 00 00 00 00 00 00 10 00 ................
490 00 00 01 00 00 00 04 00 0B 00 02 00 FF FF 04 00 ............ÿÿ..
491 06 00 24 00 00 00 00 00 00 00 00 00 00 00 00 00 ..$.............
492 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
493 00 00 00 00 00 00 00 00 <--
494
495 09 00 52 00 57 50 4F 62 ..........R.WPOb
496 ^^^^^
497 |
498 WPObject class name length
499
500 6A 65 63 74 00 04 00 0B 00 20 00 04 00 00 00 00 ject..... ......
501
502
50300 00 00 0B 00 00 00 10 00 00 00 00 00 00 00 00 ................
50400 00 00 03 00 00 00 02 00 00 00 04 00 0C 00 18 ................
50500 02 00 32 30 37 30 39 34 40 32 30 2C 32 31 37 ...207094@20,217
50632 33 33 40 32 30 00 FF FF 04 00 04 00 08 00 FF 233@20.ÿÿ......ÿ
507FF FF FF FF FF FF FF 00 00 00 00 00 00 ÿÿÿÿÿÿÿ......
508
509------------------
510
511Example 2:
512
513FE FF 7E 00 00 00 00 00 6B 00 00 00 57 50 44 61 þÿ~.....k...WPDa
51474 61 46 69 6C 65 00
515 --> 10 00 BE 14 10 00 BE 14 65 taFile...Ÿ...Ÿ.e
516 ^^^^^
517 |
518 16 Offset to WPObject starting from this word
519
52000 BE 14 5B 00 00 00 <--
521
522 09 00 48 00 57 50 4F 62 6A .Ÿ.[.....H.WPObj
523 ^^^^^
524 |
525 WPObject class name length
526
52765 63 74 00 04 00 0B 00 20 00 00 10 00 00 00 00 ect..... .......
52800 00 09 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
52900 00 03 00 00 00 02 00 00 00 04 00 0C 00 0E 00 ................
53002 00 32 30 39 31 32 37 40 32 30 00 FF FF 04 00 ..209127@20.ÿÿ..
53104 00 08 00 FF FF FF FF FF FF FF FF 00 00 00 00 ....ÿÿÿÿÿÿÿÿ....
53200 00 ..
533
534
535------------------------------------------------------------------
536
537WPS bugs
538---------
539
540wpFreeMem(somSelf, pByte) doesn't check for pByte==NULL causing trap.
541
542wpAllocMem() may block if called from within a folder frame procedure. For example
543when owner drawing icons in lighttable folders a method in CW-Multimedia classes
544is called to get a bitmap handle. If that method uses wpAllocMem() internally to
545keep track of data a deadlock occurs. Replacing wpAllocMem() with malloc() solves the
546issue.
547
Note: See TracBrowser for help on using the repository browser.