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
ec9eddf8
Commit
ec9eddf8
authored
Nov 27, 2019
by
Vijay Kiran Kamuju
Committed by
Alexandre Julliard
Nov 28, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Update the LINKHEADER based on binary file format.
Signed-off-by:
Vijay Kiran Kamuju
<
infyquest@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0af4323e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
25 deletions
+26
-25
shelllink.c
dlls/shell32/shelllink.c
+26
-25
No files found.
dlls/shell32/shelllink.c
View file @
ec9eddf8
...
@@ -73,15 +73,16 @@ typedef struct _LINK_HEADER
...
@@ -73,15 +73,16 @@ typedef struct _LINK_HEADER
GUID
MagicGuid
;
/* 0x04 is CLSID_ShellLink */
GUID
MagicGuid
;
/* 0x04 is CLSID_ShellLink */
DWORD
dwFlags
;
/* 0x14 describes elements following */
DWORD
dwFlags
;
/* 0x14 describes elements following */
DWORD
dwFileAttr
;
/* 0x18 attributes of the target file */
DWORD
dwFileAttr
;
/* 0x18 attributes of the target file */
FILETIME
Time1
;
/* 0x1c */
FILETIME
CreationTime
;
/* 0x1c creation time of target file */
FILETIME
Time2
;
/* 0x24 */
FILETIME
AccessTime
;
/* 0x24 access time of target file */
FILETIME
Time3
;
/* 0x2c */
FILETIME
WriteTime
;
/* 0x2c write time of target file */
DWORD
dwFileLength
;
/* 0x34 File length */
DWORD
dwFileSize
;
/* 0x34 File size of target file */
DWORD
nIcon
;
/* 0x38 icon number */
DWORD
nIcon
;
/* 0x38 icon number or index */
DWORD
fStartup
;
/* 0x3c startup type */
DWORD
fStartup
;
/* 0x3c startup type or window state of application */
DWORD
wHotKey
;
/* 0x40 hotkey */
WORD
wHotKey
;
/* 0x40 hotkey */
DWORD
Unknown5
;
/* 0x44 */
WORD
Reserved1
;
/* 0x42 reserved = 0 */
DWORD
Unknown6
;
/* 0x48 */
DWORD
Reserved2
;
/* 0x44 reserved = 0 */
DWORD
Reserved3
;
/* 0x48 reserved = 0 */
}
LINK_HEADER
,
*
PLINK_HEADER
;
}
LINK_HEADER
,
*
PLINK_HEADER
;
#define SHLINK_LOCAL 0
#define SHLINK_LOCAL 0
...
@@ -134,9 +135,9 @@ typedef struct
...
@@ -134,9 +135,9 @@ typedef struct
/* data structures according to the information in the link */
/* data structures according to the information in the link */
LPITEMIDLIST
pPidl
;
LPITEMIDLIST
pPidl
;
WORD
wHotKey
;
WORD
wHotKey
;
SYSTEMTIME
time1
;
SYSTEMTIME
CreationTime
;
SYSTEMTIME
time2
;
SYSTEMTIME
AccessTime
;
SYSTEMTIME
time3
;
SYSTEMTIME
WriteTime
;
DWORD
iShowCmd
;
DWORD
iShowCmd
;
LPWSTR
sIcoPath
;
LPWSTR
sIcoPath
;
...
@@ -774,20 +775,20 @@ static HRESULT WINAPI IPersistStream_fnLoad(
...
@@ -774,20 +775,20 @@ static HRESULT WINAPI IPersistStream_fnLoad(
heap_free
(
This
->
sComponent
);
heap_free
(
This
->
sComponent
);
This
->
sComponent
=
NULL
;
This
->
sComponent
=
NULL
;
This
->
wHotKey
=
(
WORD
)
hdr
.
wHotKey
;
This
->
wHotKey
=
hdr
.
wHotKey
;
This
->
iIcoNdx
=
hdr
.
nIcon
;
This
->
iIcoNdx
=
hdr
.
nIcon
;
FileTimeToSystemTime
(
&
hdr
.
Time1
,
&
This
->
time1
);
FileTimeToSystemTime
(
&
hdr
.
CreationTime
,
&
This
->
CreationTime
);
FileTimeToSystemTime
(
&
hdr
.
Time2
,
&
This
->
time2
);
FileTimeToSystemTime
(
&
hdr
.
AccessTime
,
&
This
->
AccessTime
);
FileTimeToSystemTime
(
&
hdr
.
Time3
,
&
This
->
time3
);
FileTimeToSystemTime
(
&
hdr
.
WriteTime
,
&
This
->
WriteTime
);
if
(
TRACE_ON
(
shell
))
if
(
TRACE_ON
(
shell
))
{
{
WCHAR
sTemp
[
MAX_PATH
];
WCHAR
sTemp
[
MAX_PATH
];
GetDateFormatW
(
LOCALE_USER_DEFAULT
,
DATE_SHORTDATE
,
&
This
->
time1
,
NULL
,
sTemp
,
ARRAY_SIZE
(
sTemp
));
GetDateFormatW
(
LOCALE_USER_DEFAULT
,
DATE_SHORTDATE
,
&
This
->
CreationTime
,
NULL
,
sTemp
,
ARRAY_SIZE
(
sTemp
));
TRACE
(
"--
time1
: %s
\n
"
,
debugstr_w
(
sTemp
)
);
TRACE
(
"--
CreationTime
: %s
\n
"
,
debugstr_w
(
sTemp
)
);
GetDateFormatW
(
LOCALE_USER_DEFAULT
,
DATE_SHORTDATE
,
&
This
->
time2
,
NULL
,
sTemp
,
ARRAY_SIZE
(
sTemp
));
GetDateFormatW
(
LOCALE_USER_DEFAULT
,
DATE_SHORTDATE
,
&
This
->
AccessTime
,
NULL
,
sTemp
,
ARRAY_SIZE
(
sTemp
));
TRACE
(
"--
time2
: %s
\n
"
,
debugstr_w
(
sTemp
)
);
TRACE
(
"--
AccessTime
: %s
\n
"
,
debugstr_w
(
sTemp
)
);
GetDateFormatW
(
LOCALE_USER_DEFAULT
,
DATE_SHORTDATE
,
&
This
->
time3
,
NULL
,
sTemp
,
ARRAY_SIZE
(
sTemp
));
GetDateFormatW
(
LOCALE_USER_DEFAULT
,
DATE_SHORTDATE
,
&
This
->
WriteTime
,
NULL
,
sTemp
,
ARRAY_SIZE
(
sTemp
));
TRACE
(
"--
time3
: %s
\n
"
,
debugstr_w
(
sTemp
)
);
TRACE
(
"--
WriteTime
: %s
\n
"
,
debugstr_w
(
sTemp
)
);
}
}
/* load all the new stuff */
/* load all the new stuff */
...
@@ -1041,9 +1042,9 @@ static HRESULT WINAPI IPersistStream_fnSave(
...
@@ -1041,9 +1042,9 @@ static HRESULT WINAPI IPersistStream_fnSave(
if
(
This
->
sComponent
)
if
(
This
->
sComponent
)
header
.
dwFlags
|=
SLDF_HAS_DARWINID
;
header
.
dwFlags
|=
SLDF_HAS_DARWINID
;
SystemTimeToFileTime
(
&
This
->
time1
,
&
header
.
Time1
);
SystemTimeToFileTime
(
&
This
->
CreationTime
,
&
header
.
CreationTime
);
SystemTimeToFileTime
(
&
This
->
time2
,
&
header
.
Time2
);
SystemTimeToFileTime
(
&
This
->
AccessTime
,
&
header
.
AccessTime
);
SystemTimeToFileTime
(
&
This
->
time3
,
&
header
.
Time3
);
SystemTimeToFileTime
(
&
This
->
WriteTime
,
&
header
.
WriteTime
);
/* write the Shortcut header */
/* write the Shortcut header */
r
=
IStream_Write
(
stm
,
&
header
,
sizeof
(
header
),
&
count
);
r
=
IStream_Write
(
stm
,
&
header
,
sizeof
(
header
),
&
count
);
...
...
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