Commit fa9950f9 authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

winedump: Add support for dumping SZ_LINK and SPECIAL_FOLDER data blocks.

parent 79a6f419
......@@ -63,6 +63,8 @@ typedef enum {
SLDF_RESERVED = 0x80000000,
} SHELL_LINK_DATA_FLAGS;
#define EXP_SZ_LINK_SIG 0xa0000001
#define EXP_SPECIAL_FOLDER_SIG 0xa0000005
#define EXP_DARWIN_ID_SIG 0xa0000006
#define EXP_SZ_ICON_SIG 0xa0000007
......@@ -116,6 +118,14 @@ typedef struct _LOCAL_VOLUME_INFO
DWORD dwVolLabelOfs;
} LOCAL_VOLUME_INFO;
typedef struct
{
DWORD cbSize;
DWORD dwSignature;
DWORD idSpecialFolder;
DWORD cbOffset;
} EXP_SPECIAL_FOLDER;
typedef struct lnk_string_tag
{
unsigned short size;
......@@ -288,6 +298,17 @@ static int base85_to_guid( const char *str, LPGUID guid )
return 1;
}
static int dump_special_folder_block(const DATABLOCK_HEADER* bhdr)
{
const EXP_SPECIAL_FOLDER *sfb = (const EXP_SPECIAL_FOLDER*)bhdr;
printf("Special folder block\n");
printf("--------------------\n\n");
printf("folder = 0x%04x\n", sfb->idSpecialFolder);
printf("offset = %d\n", sfb->cbOffset);
printf("\n");
return 0;
}
static int dump_sz_block(const DATABLOCK_HEADER* bhdr, const char* label)
{
const LINK_SZ_BLOCK *szp = (const LINK_SZ_BLOCK*)bhdr;
......@@ -481,6 +502,12 @@ void lnk_dump(void)
break;
switch (bhdr->dwSignature)
{
case EXP_SZ_LINK_SIG:
dump_sz_block(bhdr, "exp.link");
break;
case EXP_SPECIAL_FOLDER_SIG:
dump_special_folder_block(bhdr);
break;
case EXP_SZ_ICON_SIG:
dump_sz_block(bhdr, "icon");
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment