Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
13
Issues
13
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
GSoC2018
macOS
vlc
Commits
82326be1
Commit
82326be1
authored
Mar 10, 2017
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Winvlc: add comments
parent
d16bd481
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
bin/winvlc.c
bin/winvlc.c
+8
-4
No files found.
bin/winvlc.c
View file @
82326be1
...
...
@@ -101,26 +101,30 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,
SetErrorMode
(
SEM_FAILCRITICALERRORS
);
HeapSetInformation
(
NULL
,
HeapEnableTerminationOnCorruption
,
NULL
,
0
);
/* SetProcessDEPPolicy */
/* SetProcessDEPPolicy
, SetDllDirectory, & Co.
*/
HINSTANCE
h_Kernel32
=
GetModuleHandle
(
TEXT
(
"kernel32.dll"
));
if
(
h_Kernel32
!=
NULL
)
{
BOOL
(
WINAPI
*
mySetProcessDEPPolicy
)(
DWORD
dwFlags
);
BOOL
(
WINAPI
*
mySetDllDirectoryA
)(
const
char
*
lpPathName
);
/* Enable DEP */
# define PROCESS_DEP_ENABLE 1
BOOL
(
WINAPI
*
mySetProcessDEPPolicy
)(
DWORD
dwFlags
);
mySetProcessDEPPolicy
=
(
BOOL
(
WINAPI
*
)(
DWORD
))
GetProcAddress
(
h_Kernel32
,
"SetProcessDEPPolicy"
);
if
(
mySetProcessDEPPolicy
)
mySetProcessDEPPolicy
(
PROCESS_DEP_ENABLE
);
/* Do NOT load any library from cwd. */
BOOL
(
WINAPI
*
mySetDllDirectoryA
)(
const
char
*
lpPathName
);
mySetDllDirectoryA
=
(
BOOL
(
WINAPI
*
)(
const
char
*
))
GetProcAddress
(
h_Kernel32
,
"SetDllDirectoryA"
);
if
(
mySetDllDirectoryA
)
mySetDllDirectoryA
(
""
);
}
/***
* The LoadLibrary* calls from the modules and the 3rd party code
* will search in SYSTEM32 only
* */
SetDefaultDllDirectories
(
LOAD_LIBRARY_SEARCH_SYSTEM32
);
/* Args */
...
...
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