ReactOS  0.4.12-dev-14-gd0c8636
utils.h
Go to the documentation of this file.
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
28  IN DWORD dwBytes);
29 
30 LPWSTR
31 FormatDateTime(IN LPSYSTEMTIME pDateTime);
32 
33 VOID
34 FreeDateTime(IN LPWSTR lpszDateTime);
35 
36 LPWSTR
38  IN UINT uID,
39  OUT size_t* pSize OPTIONAL);
40 
41 LPWSTR
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 
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 
75 
76 
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 */
#define IN
Definition: typedefs.h:38
BOOL IsPreVistaOSVersion(VOID)
Definition: utils.c:275
VOID ClipOrCenterWindowToMonitor(HWND hWnd, UINT flags)
Definition: utils.c:216
VOID ClipOrCenterRectToMonitor(LPRECT prc, UINT flags)
Definition: utils.c:173
HWND hWnd
Definition: settings.c:17
VOID FreeDateTime(IN LPWSTR lpszDateTime)
Definition: utils.c:84
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
DWORD RunCommand(IN LPCWSTR lpszCommand, IN LPCWSTR lpszParameters, IN INT nShowCmd)
Definition: utils.c:132
int32_t INT
Definition: typedefs.h:56
LPWSTR LoadResourceStringEx(IN HINSTANCE hInstance, IN UINT uID, OUT size_t *pSize OPTIONAL)
Definition: utils.c:91
VOID WINAPI MemInit(_In_ HANDLE Heap)
Definition: globals.c:58
HINSTANCE hInstance
Definition: charmap.c:20
BOOL MemFree(IN PVOID lpMem)
Definition: utils.c:26
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned int UINT
Definition: ndis.h:50
unsigned long DWORD
Definition: ntddk_ex.h:95
GLbitfield flags
Definition: glext.h:7161
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
PVOID MemAlloc(IN DWORD dwFlags, IN DWORD dwBytes)
Definition: utils.c:33
#define OUT
Definition: typedefs.h:39
LPWSTR LoadConditionalResourceStringEx(IN HINSTANCE hInstance, IN BOOL bCondition, IN UINT uIDifTrue, IN UINT uIDifFalse, IN size_t *pSize OPTIONAL)
Definition: utils.c:120
LPWSTR GetExecutableVendor(IN LPCWSTR lpszFilename)
Definition: utils.c:288
WCHAR * LPWSTR
Definition: xmlstorage.h:184
LPWSTR FormatDateTime(IN LPSYSTEMTIME pDateTime)
Definition: utils.c:41
BOOL IsWindowsOS(VOID)
Definition: utils.c:226
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68