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
ef06f989
Commit
ef06f989
authored
Nov 19, 2010
by
Andrew Bogott
Committed by
Alexandre Julliard
Dec 05, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shdocvw: In PersistFile_Save, output the Icon Path and Icon Index properties.
parent
ecd140cf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
0 deletions
+45
-0
intshcut.c
dlls/shdocvw/intshcut.c
+45
-0
No files found.
dlls/shdocvw/intshcut.c
View file @
ef06f989
...
...
@@ -501,15 +501,60 @@ static HRESULT WINAPI PersistFile_Save(IPersistFile *pFile, LPCOLESTR pszFileNam
if
(
file
!=
INVALID_HANDLE_VALUE
)
{
DWORD
bytesWritten
;
char
*
iconfile
;
char
str_header
[]
=
"[InternetShortcut]"
;
char
str_URL
[]
=
"URL="
;
char
str_ICONFILE
[]
=
"ICONFILE="
;
char
str_eol
[]
=
"
\r\n
"
;
IPropertyStorage
*
pPropStgRead
;
PROPSPEC
ps
[
2
];
PROPVARIANT
pvread
[
2
];
ps
[
0
].
ulKind
=
PRSPEC_PROPID
;
ps
[
0
].
propid
=
PID_IS_ICONFILE
;
ps
[
1
].
ulKind
=
PRSPEC_PROPID
;
ps
[
1
].
propid
=
PID_IS_ICONINDEX
;
WriteFile
(
file
,
str_header
,
lstrlenA
(
str_header
),
&
bytesWritten
,
NULL
);
WriteFile
(
file
,
str_eol
,
lstrlenA
(
str_eol
),
&
bytesWritten
,
NULL
);
WriteFile
(
file
,
str_URL
,
lstrlenA
(
str_URL
),
&
bytesWritten
,
NULL
);
WriteFile
(
file
,
url
,
lstrlenA
(
url
),
&
bytesWritten
,
NULL
);
WriteFile
(
file
,
str_eol
,
lstrlenA
(
str_eol
),
&
bytesWritten
,
NULL
);
hr
=
IPropertySetStorage_Open
(
This
->
property_set_storage
,
&
FMTID_Intshcut
,
STGM_READ
|
STGM_SHARE_EXCLUSIVE
,
&
pPropStgRead
);
if
SUCCEEDED
(
hr
)
{
hr
=
IPropertyStorage_ReadMultiple
(
pPropStgRead
,
2
,
ps
,
pvread
);
if
SUCCEEDED
(
hr
)
{
char
indexString
[
50
];
len
=
WideCharToMultiByte
(
CP_UTF8
,
0
,
pvread
[
0
].
pwszVal
,
-
1
,
NULL
,
0
,
0
,
0
);
iconfile
=
heap_alloc
(
len
);
if
(
iconfile
!=
NULL
)
{
WideCharToMultiByte
(
CP_UTF8
,
0
,
pvread
[
0
].
pwszVal
,
-
1
,
iconfile
,
len
,
0
,
0
);
WriteFile
(
file
,
str_ICONFILE
,
lstrlenA
(
str_ICONFILE
),
&
bytesWritten
,
NULL
);
WriteFile
(
file
,
iconfile
,
lstrlenA
(
iconfile
),
&
bytesWritten
,
NULL
);
WriteFile
(
file
,
str_eol
,
lstrlenA
(
str_eol
),
&
bytesWritten
,
NULL
);
}
sprintf
(
indexString
,
"ICONINDEX=%d"
,
pvread
[
1
].
iVal
);
WriteFile
(
file
,
indexString
,
lstrlenA
(
indexString
),
&
bytesWritten
,
NULL
);
WriteFile
(
file
,
str_eol
,
lstrlenA
(
str_eol
),
&
bytesWritten
,
NULL
);
IPropertyStorage_Release
(
pPropStgRead
);
PropVariantClear
(
&
pvread
[
0
]);
PropVariantClear
(
&
pvread
[
1
]);
}
else
{
TRACE
(
"Unable to read properties.
\n
"
);
}
}
else
{
TRACE
(
"Unable to get the IPropertyStorage.
\n
"
);
}
CloseHandle
(
file
);
if
(
pszFileName
==
NULL
||
fRemember
)
This
->
isDirty
=
FALSE
;
...
...
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