diff options
Diffstat (limited to '')
-rw-r--r-- | CPP/Windows/DLL.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/CPP/Windows/DLL.cpp b/CPP/Windows/DLL.cpp index b2499ec..025df17 100644 --- a/CPP/Windows/DLL.cpp +++ b/CPP/Windows/DLL.cpp | |||
@@ -61,14 +61,14 @@ bool CLibrary::Load(CFSTR path) throw() | |||
61 | 61 | ||
62 | bool MyGetModuleFileName(FString &path) | 62 | bool MyGetModuleFileName(FString &path) |
63 | { | 63 | { |
64 | HMODULE hModule = g_hInstance; | 64 | const HMODULE hModule = g_hInstance; |
65 | path.Empty(); | 65 | path.Empty(); |
66 | #ifndef _UNICODE | 66 | #ifndef _UNICODE |
67 | if (!g_IsNT) | 67 | if (!g_IsNT) |
68 | { | 68 | { |
69 | TCHAR s[MAX_PATH + 2]; | 69 | TCHAR s[MAX_PATH + 2]; |
70 | s[0] = 0; | 70 | s[0] = 0; |
71 | DWORD size = ::GetModuleFileName(hModule, s, MAX_PATH + 1); | 71 | const DWORD size = ::GetModuleFileName(hModule, s, MAX_PATH + 1); |
72 | if (size <= MAX_PATH && size != 0) | 72 | if (size <= MAX_PATH && size != 0) |
73 | { | 73 | { |
74 | path = fas2fs(s); | 74 | path = fas2fs(s); |
@@ -80,7 +80,7 @@ bool MyGetModuleFileName(FString &path) | |||
80 | { | 80 | { |
81 | WCHAR s[MAX_PATH + 2]; | 81 | WCHAR s[MAX_PATH + 2]; |
82 | s[0] = 0; | 82 | s[0] = 0; |
83 | DWORD size = ::GetModuleFileNameW(hModule, s, MAX_PATH + 1); | 83 | const DWORD size = ::GetModuleFileNameW(hModule, s, MAX_PATH + 1); |
84 | if (size <= MAX_PATH && size != 0) | 84 | if (size <= MAX_PATH && size != 0) |
85 | { | 85 | { |
86 | path = us2fs(s); | 86 | path = us2fs(s); |
@@ -97,7 +97,7 @@ FString GetModuleDirPrefix() | |||
97 | FString s; | 97 | FString s; |
98 | if (MyGetModuleFileName(s)) | 98 | if (MyGetModuleFileName(s)) |
99 | { | 99 | { |
100 | int pos = s.ReverseFind_PathSepar(); | 100 | const int pos = s.ReverseFind_PathSepar(); |
101 | if (pos >= 0) | 101 | if (pos >= 0) |
102 | s.DeleteFrom((unsigned)(pos + 1)); | 102 | s.DeleteFrom((unsigned)(pos + 1)); |
103 | } | 103 | } |
@@ -114,7 +114,6 @@ FString GetModuleDirPrefix() | |||
114 | 114 | ||
115 | #include <dlfcn.h> | 115 | #include <dlfcn.h> |
116 | #include <stdlib.h> | 116 | #include <stdlib.h> |
117 | #include "../Common/Common.h" | ||
118 | 117 | ||
119 | // FARPROC | 118 | // FARPROC |
120 | void *GetProcAddress(HMODULE module, LPCSTR procName) | 119 | void *GetProcAddress(HMODULE module, LPCSTR procName) |