This repository has been archived by the owner on Feb 10, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Environment.h
39 lines (33 loc) · 2.19 KB
/
Environment.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include <time.h>
#include "Compression/Common.h"
#ifdef __cplusplus
extern "C" {
#endif
// Environment.cpp
int long_path_size (void); // Ìàêñèìàëüíàÿ äëèíà èìåíè ôàéëà
void FormatDateTime (char *buf, int bufsize, time_t t); // Îòôîðìàòèðîâàòü âðåìÿ/äàòó äëÿ êîìàíäû ëèñòèíãà
CFILENAME GetExeName (CFILENAME buf, int bufsize); // Âåðíóòü èìÿ èñïîëíÿåìîãî ôàéëà ïðîãðàììû
int MyGetAppUserDataDirectory (CFILENAME buf); // Âåðíóòü %APPDATA%
unsigned GetMaxBlockToAlloc (void); // Ìàêñ. îáú¸ì áëîêà, êîòîðûé ìû ìîæåì âûäåëèòü â àäðåñíîì ïðîñòðàíñòâå íàøåãî ïðîöåññà
unsigned GetTotalMemoryToAlloc (void); // Îáùèé îáú¸ì ïàìÿòè êîòîðûé ìû ìîæåì âûäåëèòü â àäðåñíîì ïðîñòðàíñòâå íàøåãî ïðîöåññà
void TestMalloc (void); // Ïå÷àòàåò ñòàòèñòèêó ñâîáîäíîé ïàìÿòè
int PowerOffComputer(); // Èíèöèèðîâàòü âûêëþ÷åíèå êîìïüþòåðà
void GetOSDisplayString(char* buf); // Çàïîëíÿåò áóôåð ñòðîêîé ñ îïèñàíèåì âåðñèè ÎÑ
void memxor (char *dest, char *src, uint size); // Îò-xor-èòü äâà áëîêà äàííûõ
#ifdef FREEARC_WIN
// Operations on mutex shared by all FreeArc instances
HANDLE myCreateMutex (char* name);
void myCloseMutex (HANDLE hMutex);
void myWaitMutex (HANDLE hMutex);
void myGrabMutex (HANDLE hMutex);
void myReleaseMutex (HANDLE hMutex);
DWORD RegistryDeleteTree(HKEY hStartKey, LPTSTR pKeyName); // Delete entrire subtree from Windows Registry
#endif
// GuiEnvironment.cpp
int BrowseForFolder(TCHAR *prompt, TCHAR *in_filename, TCHAR *out_filename); // Äàòü ïîëüçîâàòåëþ âûáðàòü êàòàëîã
int BrowseForFile(TCHAR *prompt, TCHAR *filters, TCHAR *in_filename, TCHAR *out_filename); // Äàòü ïîëüçîâàòåëþ âûáðàòü ôàéë
void GuiFormatDateTime (time_t t, char *buf, int bufsize, char *date_format, char *time_format); // Ïðåâðàòèòü âðåìÿ/äàòó ôàéëà â ñòðîêó â ñîîòâåòñòâèè ñ íàñòðîéêàìè locale èëè çàäàííûìè ôîðìàòàìè âðåìåíè è äàòû
void GuiGetFileType (TCHAR *ext, TCHAR *buf); // Ïîëó÷èòü òèï ôàéëà ïî åãî ðàñøèðåíèþ
#ifdef __cplusplus
}
#endif