#include <precomp.h>
#include <time.h>
#include <sstream>
Go to the source code of this file.
|
void | CenterWindow (HWND hwnd) |
|
void | MoveVisible (HWND hwnd) |
|
void | display_error (HWND hwnd, DWORD error) |
|
BOOL | time_to_filetime (const time_t *t, FILETIME *ftime) |
|
BOOL | launch_file (HWND hwnd, LPCTSTR cmd, UINT nCmdShow, LPCTSTR parameters) |
|
static BOOL CALLBACK | EnumWndProc (HWND hwnd, LPARAM lparam) |
|
int | find_window_class (LPCTSTR classname) |
|
String | get_windows_version_str () |
|
BOOL | RunDLL (HWND hwnd, LPCTSTR dllname, LPCSTR procname, LPCTSTR cmdline, UINT nCmdShow) |
|
BOOL | launch_cpanel (HWND hwnd, LPCTSTR applet) |
|
BOOL | RecursiveCreateDirectory (LPCTSTR path_in) |
|
DWORD | RegGetDWORDValue (HKEY root, LPCTSTR path, LPCTSTR valueName, DWORD def) |
|
BOOL | RegSetDWORDValue (HKEY root, LPCTSTR path, LPCTSTR valueName, DWORD value) |
|
BOOL | exists_path (LPCTSTR path) |
|
bool | SplitFileSysURL (LPCTSTR url, String &dir_out, String &fname_out) |
|
◆ CONTROL_RUNDLL
#define CONTROL_RUNDLL "Control_RunDLLA" |
◆ RUNDLLPROC
◆ CenterWindow()
Definition at line 49 of file utility.cpp.
50{
53
56
59 {owner=wh; break;}
60
61 if (owner)
63 else
65
68
70}
void MoveVisible(HWND hwnd)
#define GetWindowStyle(hwnd)
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
HWND WINAPI GetWindow(_In_ HWND, _In_ UINT)
#define SystemParametersInfo
◆ display_error()
◆ EnumWndProc()
◆ exists_path()
Definition at line 489 of file utility.cpp.
490{
492
494
497
499 } else
501}
#define INVALID_HANDLE_VALUE
BOOL WINAPI FindClose(HANDLE hFindFile)
Referenced by SplitFileSysURL().
◆ find_window_class()
Definition at line 237 of file utility.cpp.
238{
240
242 return 1;
243
244 return 0;
245}
static BOOL CALLBACK EnumWndProc(HWND hwnd, LPARAM lparam)
BOOL WINAPI EnumWindows(_In_ WNDENUMPROC lpEnumFunc, _In_ LPARAM lParam)
◆ get_windows_version_str()
String get_windows_version_str |
( |
| ) |
|
Definition at line 248 of file utility.cpp.
249{
253
256
259 }
260
263#ifdef __REACTOS__
265#else
267 str =
TEXT(
"Microsoft Windows NT");
269 str =
TEXT(
"Microsoft Windows 2000");
271 str =
TEXT(
"Microsoft Windows XP");
272#endif
273
274 if (osvie_val) {
278 else
282 str +=
TEXT(
" DataCenter Server");
284 str +=
TEXT(
" Advanced Server");
285 else
288 str +=
TEXT(
" Domain Controller");
289 }
290 } else {
294
298
304 str +=
TEXT(
" Advanced Server");
305 }
306 }
307 break;
308
313 str =
TEXT(
"Microsoft Windows ME");
314 else
315 str =
TEXT(
"Microsoft Windows 98");
316
319 } else {
320 str =
TEXT(
"Microsoft Windows 95");
321
324 }
325 break;
326
328 str =
TEXT(
"Microsoft Win32s");
329
330 default:
332 }
333
335
337 vstr.printf(
TEXT(
" Version %d.%d %s Build %d"),
340 else
342
344}
#define RegCloseKey(hKey)
GLuint GLuint GLsizei GLenum type
#define VER_PLATFORM_WIN32_NT
#define VER_PLATFORM_WIN32_WINDOWS
#define VER_PLATFORM_WIN32s
#define VER_SUITE_ENTERPRISE
#define VER_SUITE_DATACENTER
#define VER_SUITE_PERSONAL
ULONG dwOSVersionInfoSize
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFSTRING String
_In_ HCRYPTHASH _In_ BOOL _In_ DWORD _Inout_ DWORD _In_ DWORD dwBufLen
#define HKEY_LOCAL_MACHINE
#define VER_NT_WORKSTATION
OSVERSIONINFOEXA OSVERSIONINFOEX
#define VER_NT_DOMAIN_CONTROLLER
OSVERSIONINFOA OSVERSIONINFO
Referenced by ExplorerAboutDlg::ExplorerAboutDlg().
◆ launch_cpanel()
◆ launch_file()
◆ MoveVisible()
◆ RecursiveCreateDirectory()
Definition at line 394 of file utility.cpp.
395{
397
399
400 int drv_len = 0;
402
403 for(
d=hole_path; *
d && *
d!=
'/' && *
d!=
'\\'; ++
d) {
404 ++drv_len;
405
407 break;
408 }
409
411
414
415 while(--
p>=hole_path && (*
p==
'/' || *
p==
'\\'))
417
419
421
425
426 for(
p=
dir; *
p==
'/'||*
p==
'\\';
p++)
428
431
432 for(; hole_path[
i] && hole_path[
i]!=
'/' && hole_path[
i]!=
'\\';
i++)
434
436
438
441 else {
442 LOG(FmtString(
TEXT(
"CreateDirectory(\"%s\")"),
path));
443
446 }
447 }
448 } else
450
452}
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define memcpy(s1, s2, n)
Referenced by QuickLaunchBar::AddShortcuts(), and ExplorerGlobals::write_persistent().
◆ RegGetDWORDValue()
Definition at line 455 of file utility.cpp.
456{
459
462
465
467
469 } else
470 return def;
471}
◆ RegSetDWORDValue()
Definition at line 474 of file utility.cpp.
475{
478
481
483 }
484
486}
◆ RunDLL()
Definition at line 349 of file utility.cpp.
350{
354
355
356
357
358
359
360
361
362
367 }
368
370
372
374}
#define GetProcAddress(x, y)
void(WINAPI * RUNDLLPROC)(HWND hwnd, HINSTANCE hinst, LPCTSTR cmdline, DWORD nCmdShow)
static PEXPLICIT_ACCESSW *static HMODULE hmod
◆ SplitFileSysURL()
Definition at line 504 of file utility.cpp.
505{
508
509
512 }
513
516
517
519
521 fname_out.erase();
522 else {
524
527
528 fname_out.printf(
TEXT(
"%s%s"), fname,
ext);
529 }
530
532
533 return true;
534 } else
535 return false;
536}
static const WCHAR *const ext[]
BOOL exists_path(LPCTSTR path)
#define FILE_ATTRIBUTE_DIRECTORY
#define GetFileAttributes
Referenced by FileChildWindow::jump_to_int(), and MDIShellBrowserChild::jump_to_int().
◆ time_to_filetime()
Definition at line 159 of file utility.cpp.
160{
161#if defined(__STDC_WANT_SECURE_LIB__) && defined(_MS_VER)
164 struct tm*
tm = &tm_;
165
166 if (gmtime_s(
tm,
t) != 0)
168#else
171
174#endif
175
184
186}
BOOL WINAPI SystemTimeToFileTime(IN CONST SYSTEMTIME *lpSystemTime, OUT LPFILETIME lpFileTime)
_CRTIMP struct tm *__cdecl gmtime(const time_t *_Time)
__CRT_INLINE void __cdecl ftime(struct timeb *_Tmb)
◆ g_foundPrevInstance
int g_foundPrevInstance = 0 |
|
static |