[CLASS2]
[reactos.git] / base / applications / msconfig_new / utils.h
1 /*
2 * PROJECT: ReactOS Applications
3 * LICENSE: LGPL - See COPYING in the top level directory
4 * FILE: base/applications/msconfig_new/utils.c
5 * PURPOSE: Memory Management, Resources, ... Utility Functions
6 * COPYRIGHT: Copyright 2011-2012 Hermes BELUSCA - MAITO <hermes.belusca@sfr.fr>
7 */
8
9 #ifndef __UTILS_H__
10 #define __UTILS_H__
11
12 #pragma once
13
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17
18 #if 0
19 VOID
20 MemInit(IN HANDLE Heap);
21 #endif
22
23 BOOL
24 MemFree(IN PVOID lpMem);
25
26 PVOID
27 MemAlloc(IN DWORD dwFlags,
28 IN DWORD dwBytes);
29
30 LPWSTR
31 FormatDateTime(IN LPSYSTEMTIME pDateTime);
32
33 VOID
34 FreeDateTime(IN LPWSTR lpszDateTime);
35
36 LPWSTR
37 LoadResourceStringEx(IN HINSTANCE hInstance,
38 IN UINT uID,
39 OUT size_t* pSize OPTIONAL);
40
41 LPWSTR
42 LoadConditionalResourceStringEx(IN HINSTANCE hInstance,
43 IN BOOL bCondition,
44 IN UINT uIDifTrue,
45 IN UINT uIDifFalse,
46 IN size_t* pSize OPTIONAL);
47
48 #define LoadResourceString(hInst, uID) \
49 LoadResourceStringEx((hInst), (uID), NULL)
50
51 #define LoadConditionalResourceString(hInst, bCond, uIDifT, uIDifF) \
52 LoadConditionalResourceStringEx((hInst), (bCond), (uIDifT), (uIDifF), NULL)
53
54 DWORD
55 RunCommand(IN LPCWSTR lpszCommand,
56 IN LPCWSTR lpszParameters,
57 IN INT nShowCmd);
58
59
60 //////////////////// The following comes from MSDN samples ///////////////////
61 // https://msdn.microsoft.com/en-us/library/windows/desktop/dd162826(v=vs.85).aspx
62 //
63
64 //
65 // Available control flags.
66 //
67 #define MONITOR_CENTER 0x0001 // center rect to monitor
68 #define MONITOR_CLIP 0x0000 // clip rect to monitor
69 #define MONITOR_WORKAREA 0x0002 // use monitor work area
70 #define MONITOR_AREA 0x0000 // use monitor entire area
71
72 VOID ClipOrCenterRectToMonitor(LPRECT prc, UINT flags);
73 VOID ClipOrCenterWindowToMonitor(HWND hWnd, UINT flags);
74 ////////////////////////////////////////////////////////////////////////////////
75
76
77 BOOL IsWindowsOS(VOID);
78 BOOL IsPreVistaOSVersion(VOID);
79
80 LPWSTR
81 GetExecutableVendor(IN LPCWSTR lpszFilename);
82
83 #ifdef __cplusplus
84 } // extern "C"
85 #endif
86
87 #endif // __UTILS_H__
88
89 /* EOF */