mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-07 07:14:56 -06:00
4.53 beta
This commit is contained in:
committed by
Kornel Lesiński
parent
33ccab7e72
commit
051769bbc5
24
CPP/7zip/UI/FileManager/ProgramLocation.cpp
Executable file
24
CPP/7zip/UI/FileManager/ProgramLocation.cpp
Executable file
@@ -0,0 +1,24 @@
|
||||
// ProgramLocation.h
|
||||
|
||||
#include "StdAfx.h"
|
||||
|
||||
#include "ProgramLocation.h"
|
||||
|
||||
#include "Windows/FileName.h"
|
||||
#include "Windows/DLL.h"
|
||||
|
||||
using namespace NWindows;
|
||||
|
||||
extern HINSTANCE g_hInstance;
|
||||
|
||||
bool GetProgramFolderPath(UString &folder)
|
||||
{
|
||||
if (!NDLL::MyGetModuleFileName(g_hInstance, folder))
|
||||
return false;
|
||||
int pos = folder.ReverseFind(L'\\');
|
||||
if (pos < 0)
|
||||
return false;
|
||||
folder = folder.Left(pos + 1);
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user