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
0856f774
Commit
0856f774
authored
Oct 27, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shdocvw: Specify the full application path when starting winemenubuilder.exe.
parent
d72e7af9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
8 deletions
+29
-8
intshcut.c
dlls/shdocvw/intshcut.c
+29
-8
No files found.
dlls/shdocvw/intshcut.c
View file @
0856f774
...
...
@@ -65,32 +65,35 @@ static inline InternetShortcut* impl_from_IPersistFile(IPersistFile *iface)
return
(
InternetShortcut
*
)((
char
*
)
iface
-
FIELD_OFFSET
(
InternetShortcut
,
persistFile
));
}
static
BOOL
StartLinkProcessor
(
LPCOLESTR
szLink
)
static
BOOL
run_winemenubuilder
(
const
WCHAR
*
args
)
{
static
const
WCHAR
szFormat
[]
=
{
'w'
,
'i'
,
'n'
,
'e'
,
'm'
,
'e'
,
'n'
,
'u'
,
'b'
,
'u'
,
'i'
,
'l'
,
'd'
,
'e'
,
'r'
,
'.'
,
'e'
,
'x'
,
'e'
,
' '
,
'-'
,
'w'
,
' '
,
'-'
,
'u'
,
' '
,
'"'
,
'%'
,
's'
,
'"'
,
0
};
static
const
WCHAR
menubuilder
[]
=
{
'\\'
,
'w'
,
'i'
,
'n'
,
'e'
,
'm'
,
'e'
,
'n'
,
'u'
,
'b'
,
'u'
,
'i'
,
'l'
,
'd'
,
'e'
,
'r'
,
'.'
,
'e'
,
'x'
,
'e'
,
0
};
LONG
len
;
LPWSTR
buffer
;
STARTUPINFOW
si
;
PROCESS_INFORMATION
pi
;
BOOL
ret
;
WCHAR
app
[
MAX_PATH
];
len
=
sizeof
(
szFormat
)
+
lstrlenW
(
szLink
)
*
sizeof
(
WCHAR
);
GetSystemDirectoryW
(
app
,
MAX_PATH
-
sizeof
(
menubuilder
)
/
sizeof
(
WCHAR
)
);
strcatW
(
app
,
menubuilder
);
len
=
(
strlenW
(
app
)
+
strlenW
(
args
)
+
1
)
*
sizeof
(
WCHAR
);
buffer
=
heap_alloc
(
len
);
if
(
!
buffer
)
return
FALSE
;
wsprintfW
(
buffer
,
szFormat
,
szLink
);
strcpyW
(
buffer
,
app
);
strcatW
(
buffer
,
args
);
TRACE
(
"starting %s
\n
"
,
debugstr_w
(
buffer
));
memset
(
&
si
,
0
,
sizeof
(
si
));
si
.
cb
=
sizeof
(
si
);
ret
=
CreateProcessW
(
NULL
,
buffer
,
NULL
,
NULL
,
FALSE
,
0
,
NULL
,
NULL
,
&
si
,
&
pi
);
ret
=
CreateProcessW
(
app
,
buffer
,
NULL
,
NULL
,
FALSE
,
0
,
NULL
,
NULL
,
&
si
,
&
pi
);
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
heap_free
(
buffer
);
if
(
ret
)
{
...
...
@@ -101,6 +104,24 @@ static BOOL StartLinkProcessor(LPCOLESTR szLink)
return
ret
;
}
static
BOOL
StartLinkProcessor
(
LPCOLESTR
szLink
)
{
static
const
WCHAR
szFormat
[]
=
{
' '
,
'-'
,
'w'
,
' '
,
'-'
,
'u'
,
' '
,
'"'
,
'%'
,
's'
,
'"'
,
0
};
LONG
len
;
LPWSTR
buffer
;
BOOL
ret
;
len
=
sizeof
(
szFormat
)
+
lstrlenW
(
szLink
)
*
sizeof
(
WCHAR
);
buffer
=
heap_alloc
(
len
);
if
(
!
buffer
)
return
FALSE
;
wsprintfW
(
buffer
,
szFormat
,
szLink
);
ret
=
run_winemenubuilder
(
buffer
);
heap_free
(
buffer
);
return
ret
;
}
/* interface functions */
static
HRESULT
Unknown_QueryInterface
(
InternetShortcut
*
This
,
REFIID
riid
,
PVOID
*
ppvObject
)
...
...
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