winedump: Add support for dumping SZ_LINK and SPECIAL_FOLDER data blocks.
This commit is contained in:
parent
79a6f41935
commit
fa9950f93e
|
@ -63,6 +63,8 @@ typedef enum {
|
||||||
SLDF_RESERVED = 0x80000000,
|
SLDF_RESERVED = 0x80000000,
|
||||||
} SHELL_LINK_DATA_FLAGS;
|
} SHELL_LINK_DATA_FLAGS;
|
||||||
|
|
||||||
|
#define EXP_SZ_LINK_SIG 0xa0000001
|
||||||
|
#define EXP_SPECIAL_FOLDER_SIG 0xa0000005
|
||||||
#define EXP_DARWIN_ID_SIG 0xa0000006
|
#define EXP_DARWIN_ID_SIG 0xa0000006
|
||||||
#define EXP_SZ_ICON_SIG 0xa0000007
|
#define EXP_SZ_ICON_SIG 0xa0000007
|
||||||
|
|
||||||
|
@ -116,6 +118,14 @@ typedef struct _LOCAL_VOLUME_INFO
|
||||||
DWORD dwVolLabelOfs;
|
DWORD dwVolLabelOfs;
|
||||||
} LOCAL_VOLUME_INFO;
|
} LOCAL_VOLUME_INFO;
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
DWORD cbSize;
|
||||||
|
DWORD dwSignature;
|
||||||
|
DWORD idSpecialFolder;
|
||||||
|
DWORD cbOffset;
|
||||||
|
} EXP_SPECIAL_FOLDER;
|
||||||
|
|
||||||
typedef struct lnk_string_tag
|
typedef struct lnk_string_tag
|
||||||
{
|
{
|
||||||
unsigned short size;
|
unsigned short size;
|
||||||
|
@ -288,6 +298,17 @@ static int base85_to_guid( const char *str, LPGUID guid )
|
||||||
return 1;
|
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)
|
static int dump_sz_block(const DATABLOCK_HEADER* bhdr, const char* label)
|
||||||
{
|
{
|
||||||
const LINK_SZ_BLOCK *szp = (const LINK_SZ_BLOCK*)bhdr;
|
const LINK_SZ_BLOCK *szp = (const LINK_SZ_BLOCK*)bhdr;
|
||||||
|
@ -481,6 +502,12 @@ void lnk_dump(void)
|
||||||
break;
|
break;
|
||||||
switch (bhdr->dwSignature)
|
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:
|
case EXP_SZ_ICON_SIG:
|
||||||
dump_sz_block(bhdr, "icon");
|
dump_sz_block(bhdr, "icon");
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue