diff options
author | George Hazan <george.hazan@gmail.com> | 2013-02-05 21:49:35 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-02-05 21:49:35 +0000 |
commit | 9c32e9a999c2a0d86133b1fca16f75fe10672136 (patch) | |
tree | 95f8b8c1fa8a3a07c4f81429f1d6bc557018ad52 /plugins/PluginUpdater/src/Common.h | |
parent | e505b22562e80b830d43093758f376c858c6661d (diff) |
experimental version of PU that can handle UAC correctly
git-svn-id: http://svn.miranda-ng.org/main/trunk@3445 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/PluginUpdater/src/Common.h')
-rw-r--r-- | plugins/PluginUpdater/src/Common.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/plugins/PluginUpdater/src/Common.h b/plugins/PluginUpdater/src/Common.h index 3d79a36f33..5969dee2a3 100644 --- a/plugins/PluginUpdater/src/Common.h +++ b/plugins/PluginUpdater/src/Common.h @@ -116,13 +116,13 @@ using namespace std; extern HINSTANCE hInst;
-extern TCHAR tszRoot[MAX_PATH], tszDialogMsg[2048];
+extern TCHAR tszRoot[MAX_PATH], tszDialogMsg[2048], tszTempPath[MAX_PATH];
extern FILEINFO *pFileInfo;
extern HANDLE CheckThread, hPluginUpdaterFolder;
extern PlugOptions opts;
extern POPUP_OPTIONS PopupOptions;
extern aPopups PopupsList[POPUPS];
-extern HANDLE Timer;
+extern HANDLE Timer, hPipe;
extern HWND hwndDialog;
void InitPopupList();
@@ -154,6 +154,17 @@ INT_PTR CALLBACK DlgMsgPop(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); bool unzip(const TCHAR *ptszZipFile, TCHAR *ptszDestPath, TCHAR *ptszBackPath);
void strdel(TCHAR *parBuffer, int len);
+//////////////////////////////////////////////////////////
+
+BOOL IsRunAsAdmin();
+BOOL IsProcessElevated();
+
+int SafeCreateDirectory(const TCHAR *ptszDirName);
+int SafeCopyFile(const TCHAR *ptszSrc, const TCHAR *ptszDst);
+int SafeMoveFile(const TCHAR *ptszSrc, const TCHAR *ptszDst);
+int SafeDeleteFile(const TCHAR *ptszSrc);
+int SafeCreateFilePath(TCHAR *pFolder);
+
#if MIRANDA_VER < 0x0A00
#define db_free(A) DBFreeVariant(A)
@@ -212,7 +223,6 @@ __forceinline INT_PTR Options_AddPage(WPARAM wParam, OPTIONSDIALOGPAGE *odp) }
char *rtrim(char *str);
-void CreatePathToFileT(TCHAR *szFilePath);
#define NEWTSTR_ALLOCA(A) (A == NULL)?NULL:_tcscpy((TCHAR*)alloca((_tcslen(A)+1) *sizeof(TCHAR)), A)
|