summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorTannin <devnull@localhost>2014-04-23 23:59:30 +0200
committerTannin <devnull@localhost>2014-04-23 23:59:30 +0200
commit2db33523a1c8497657963a88f70fe1726cbf8fc9 (patch)
tree016b015087a64900db9787a2a3f3551128c43df3 /src/main.cpp
parent540747177ae02c9431d33a2c3adc1f747b74b868 (diff)
- added an option to show meta info on downloads instead of filenames
- MO will now cancel if user tries to run MO vfs-injected - when saving the MO ini file it is now written to a tmp file first and then overwritten - updated to link against boost python 1.55
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 3b89e721..994dfd29 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -139,6 +139,10 @@ bool bootstrap()
// verify the hook-dll exists
QString dllName = qApp->applicationDirPath() + "/" + ToQString(AppConfig::hookDLLName());
+ if (::GetModuleHandleW(ToWString(dllName).c_str()) != NULL) {
+ throw std::runtime_error("hook.dll already loaded! You can't start Mod Organizer from within itself (not even indirectly)");
+ }
+
HMODULE dllMod = ::LoadLibraryW(ToWString(dllName).c_str());
if (dllMod == NULL) {
throw windows_error("hook.dll is missing or invalid");
@@ -311,7 +315,6 @@ bool HaveWriteAccess(const std::wstring &path)
}
-
int main(int argc, char *argv[])
{
MOApplication application(argc, argv);