ReactOS 0.4.16-dev-2104-gb84fa49
crt_wwinmain.c File Reference
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
Include dependency graph for crt_wwinmain.c:

Go to the source code of this file.

Functions

int WINAPI wWinMain (HINSTANCE, HINSTANCE, LPWSTR, int)
 
int __cdecl wmain (int argc, WCHAR *argv[])
 

Function Documentation

◆ wmain()

int __cdecl wmain ( int  argc,
WCHAR argv[] 
)

Definition at line 32 of file crt_wwinmain.c.

33{
36 int bcount = 0;
37 BOOL in_quotes = FALSE;
38
39 while (*cmdline)
40 {
41 if ((*cmdline == '\t' || *cmdline == ' ') && !in_quotes) break;
42 else if (*cmdline == '\\') bcount++;
43 else if (*cmdline == '\"')
44 {
45 if (!(bcount & 1)) in_quotes = !in_quotes;
46 bcount = 0;
47 }
48 else bcount = 0;
49 cmdline++;
50 }
51 while (*cmdline == '\t' || *cmdline == ' ') cmdline++;
52
54 if (!(info.dwFlags & STARTF_USESHOWWINDOW)) info.wShowWindow = SW_SHOWNORMAL;
55 return wWinMain( GetModuleHandleW(0), 0, cmdline, info.wShowWindow );
56}
int WINAPI wWinMain(HINSTANCE, HINSTANCE, LPWSTR, int)
Definition: charmap.c:671
#define FALSE
Definition: types.h:117
HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName)
Definition: loader.c:838
VOID WINAPI GetStartupInfoW(IN LPSTARTUPINFOW lpStartupInfo)
Definition: proc.c:1279
LPWSTR WINAPI GetCommandLineW(void)
Definition: process.c:1338
unsigned int BOOL
Definition: ntddk_ex.h:94
TCHAR * cmdline
Definition: stretchblt.cpp:32
#define STARTF_USESHOWWINDOW
Definition: winbase.h:468
#define SW_SHOWNORMAL
Definition: winuser.h:781
__wchar_t WCHAR
Definition: xmlstorage.h:180

◆ wWinMain()

int WINAPI wWinMain ( HINSTANCE  hInst,
HINSTANCE  hPrev,
LPWSTR  Cmd,
int  iCmd 
)

Definition at line 671 of file charmap.c.

675{
677 INT Ret = 1;
678 HMODULE hRichEd20;
679 MSG Msg;
680
682
683 /* Mirroring code for the titlebar */
684 switch (GetUserDefaultUILanguage())
685 {
688 break;
689
690 default:
691 break;
692 }
693
694 iccx.dwSize = sizeof(INITCOMMONCONTROLSEX);
695 iccx.dwICC = ICC_TAB_CLASSES;
697
699 {
700 hRichEd20 = LoadLibraryW(L"RICHED20.DLL");
701
702 if (hRichEd20 != NULL)
703 {
705
706 for (;;)
707 {
708 if (GetMessage(&Msg, NULL, 0, 0) <= 0)
709 {
710 Ret = Msg.wParam;
711 break;
712 }
713
714 /* NOTE: CreateDialog needs IsDialogMessage call in message loop */
716 continue;
717#ifndef REMOVE_ADVANCED
719 continue;
720#endif
721
724 }
725
726 FreeLibrary(hRichEd20);
727 }
729 }
730
731 return Ret;
732}
HWND hCharmapDlg
Definition: charmap.c:21
HINSTANCE hInstance
Definition: charmap.c:19
static HWND InitInstance(HINSTANCE hInst)
Definition: charmap.c:608
HWND hAdvancedDlg
Definition: charmap.c:20
struct @1779 Msg[]
BOOL WINAPI InitCommonControlsEx(const INITCOMMONCONTROLSEX *lpInitCtrls)
Definition: commctrl.c:904
#define NULL
Definition: types.h:112
#define FreeLibrary(x)
Definition: compat.h:748
#define LoadLibraryW(x)
Definition: compat.h:747
LANGID WINAPI GetUserDefaultUILanguage(void)
Definition: locale.c:1380
#define L(x)
Definition: resources.c:13
HINSTANCE hInst
Definition: dxdiag.c:13
VOID UnregisterMapClasses(HINSTANCE hInstance)
Definition: map.c:877
BOOL RegisterMapClasses(HINSTANCE hInstance)
Definition: map.c:851
struct tagINITCOMMONCONTROLSEX INITCOMMONCONTROLSEX
#define ICC_TAB_CLASSES
Definition: commctrl.h:61
#define MAKELANGID(p, s)
Definition: nls.h:15
#define LANG_HEBREW
Definition: nls.h:67
#define SUBLANG_DEFAULT
Definition: nls.h:168
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1829
int32_t INT
Definition: typedefs.h:58
BOOL WINAPI SetProcessDefaultLayout(DWORD dwDefaultLayout)
Definition: window.c:1689
#define LAYOUT_RTL
Definition: wingdi.h:1371
BOOL WINAPI TranslateMessage(_In_ const MSG *)
#define IsDialogMessage
Definition: winuser.h:5920
#define GetMessage
Definition: winuser.h:5901
#define DispatchMessage
Definition: winuser.h:5876

Referenced by wmain().