From 9c32e9a999c2a0d86133b1fca16f75fe10672136 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 5 Feb 2013 21:49:35 +0000 Subject: 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 --- plugins/PluginUpdater/src/Common.h | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'plugins/PluginUpdater/src/Common.h') 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) -- cgit v1.2.3