ReactOS 0.4.15-dev-5669-g09dde2c
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
15extern "C" {
16#endif
17
18#if 0
19VOID
20MemInit(IN HANDLE Heap);
21#endif
22
23BOOL
24MemFree(IN PVOID lpMem);
25
28 IN SIZE_T dwBytes);
29
32
33VOID
34FreeDateTime(IN LPWSTR lpszDateTime);
35
38 IN UINT uID,
39 OUT size_t* pSize OPTIONAL);
40
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
55RunCommand(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
81GetExecutableVendor(IN LPCWSTR lpszFilename);
82
83#ifdef __cplusplus
84} // extern "C"
85#endif
86
87#endif // __UTILS_H__
88
89/* EOF */
HWND hWnd
Definition: settings.c:17
LPWSTR LoadConditionalResourceStringEx(IN HINSTANCE hInstance, IN BOOL bCondition, IN UINT uIDifTrue, IN UINT uIDifFalse, IN size_t *pSize OPTIONAL)
Definition: utils.c:120
LPWSTR LoadResourceStringEx(IN HINSTANCE hInstance, IN UINT uID, OUT size_t *pSize OPTIONAL)
Definition: utils.c:91
VOID ClipOrCenterWindowToMonitor(HWND hWnd, UINT flags)
Definition: utils.c:216
VOID ClipOrCenterRectToMonitor(LPRECT prc, UINT flags)
Definition: utils.c:173
DWORD RunCommand(IN LPCWSTR lpszCommand, IN LPCWSTR lpszParameters, IN INT nShowCmd)
Definition: utils.c:132
BOOL IsPreVistaOSVersion(VOID)
Definition: utils.c:275
LPWSTR FormatDateTime(IN LPSYSTEMTIME pDateTime)
Definition: utils.c:41
BOOL MemFree(IN PVOID lpMem)
Definition: utils.c:26
VOID FreeDateTime(IN LPWSTR lpszDateTime)
Definition: utils.c:84
BOOL IsWindowsOS(VOID)
Definition: utils.c:226
PVOID MemAlloc(IN DWORD dwFlags, IN SIZE_T dwBytes)
Definition: utils.c:33
LPWSTR GetExecutableVendor(IN LPCWSTR lpszFilename)
Definition: utils.c:288
VOID WINAPI MemInit(_In_ HANDLE Heap)
Definition: globals.c:58
HINSTANCE hInstance
Definition: charmap.c:19
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLbitfield flags
Definition: glext.h:7161
unsigned int UINT
Definition: ndis.h:50
_Out_ LPRECT prc
Definition: ntgdi.h:1658
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68
ULONG_PTR SIZE_T
Definition: typedefs.h:80
int32_t INT
Definition: typedefs.h:58
#define IN
Definition: typedefs.h:39
#define OUT
Definition: typedefs.h:40
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176
WCHAR * LPWSTR
Definition: xmlstorage.h:184
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185