Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
9fc80d21
Commit
9fc80d21
authored
Jan 26, 2008
by
Francois Gouget
Committed by
Alexandre Julliard
Feb 04, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedump: Dump the raw data when finding an unknown block in an lnk file.
parent
74d85364
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
0 deletions
+53
-0
lnk.c
tools/winedump/lnk.c
+53
-0
No files found.
tools/winedump/lnk.c
View file @
9fc80d21
...
...
@@ -336,6 +336,58 @@ static int dump_advertise_info(const char *type)
return
0
;
}
static
int
dump_raw_block
(
void
)
{
const
DATABLOCK_HEADER
*
bhdr
;
int
data_size
;
bhdr
=
fetch_block
();
if
(
!
bhdr
)
{
printf
(
"
\n
"
);
printf
(
"No end block!
\n
"
);
return
0
;
}
if
(
!
bhdr
->
cbSize
)
return
0
;
printf
(
"Raw Block
\n
"
);
printf
(
"---------
\n\n
"
);
printf
(
"size = %d
\n
"
,
bhdr
->
cbSize
);
printf
(
"magic = %x
\n
"
,
bhdr
->
dwSignature
);
data_size
=
bhdr
->
cbSize
-
sizeof
(
*
bhdr
);
if
(
data_size
>
0
)
{
unsigned
int
i
;
const
unsigned
char
*
data
;
printf
(
"data = "
);
data
=
(
const
unsigned
char
*
)
bhdr
+
sizeof
(
*
bhdr
);
while
(
data_size
>
0
)
{
for
(
i
=
0
;
i
<
16
;
i
++
)
{
if
(
i
<
data_size
)
printf
(
"%02x "
,
data
[
i
]);
else
printf
(
" "
);
}
for
(
i
=
0
;
i
<
data_size
&&
i
<
16
;
i
++
)
printf
(
"%c"
,
(
data
[
i
]
>=
32
&&
data
[
i
]
<
128
?
data
[
i
]
:
'.'
));
printf
(
"
\n
"
);
data_size
-=
16
;
if
(
data_size
<=
0
)
break
;
data
+=
16
;
printf
(
" "
);
}
}
printf
(
"
\n
"
);
return
1
;
}
static
const
GUID
CLSID_ShellLink
=
{
0x00021401L
,
0
,
0
,
{
0xC0
,
0
,
0
,
0
,
0
,
0
,
0
,
0x46
}};
enum
FileSig
get_kind_lnk
(
void
)
...
...
@@ -429,4 +481,5 @@ void lnk_dump(void)
dump_advertise_info
(
"product"
);
if
(
hdr
->
dwFlags
&
SLDF_HAS_DARWINID
)
dump_advertise_info
(
"msi string"
);
while
(
dump_raw_block
());
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment