52 GetObject(hLogo,
sizeof(logoBitmap), &logoBitmap);
53 GetObject(hMask,
sizeof(maskBitmap), &maskBitmap);
55 if (logoBitmap.bmHeight != maskBitmap.bmHeight || logoBitmap.bmWidth != maskBitmap.bmWidth)
86 *pBits++ =
b | (
g << 8) | (
r << 16) | (
alpha << 24);
114 TRACE(
"IsLiveCD()\n");
123 WARN(
"RegOpenKeyEx() failed with error %lu\n", rc);
127 rc =
ReadRegSzKey(ControlKey,
L"SystemStartOptions", &SystemStartOptions);
130 WARN(
"ReadRegSzKey() failed with error %lu\n", rc);
135 CurrentOption = SystemStartOptions;
136 while (CurrentOption)
141 if (
_wcsicmp(CurrentOption,
L"MININT") == 0)
143 TRACE(
"Found 'MININT' boot option\n");
151 if (ControlKey !=
NULL)
155 TRACE(
"IsLiveCD() returning %d\n",
ret);
194 if (bNoShow ==
FALSE)
221 if (pState->Unattend->bEnabled)
222 Locale = pState->Unattend->LocaleID;
251 wsprintf(szBuf,
L"SYSTEM\\CurrentControlSet\\Control\\Keyboard Layouts\\%s", szLCID);
259 if (szDispName[0] ==
'@')
263 if ((szDispName[
i] ==
',') && (szDispName[
i + 1] ==
'-'))
265 for (
j =
i + 2,
k = 0;
j <
wcslen(szDispName)+1;
j++,
k++)
267 szIndex[
k] = szDispName[
j];
269 szDispName[
i - 1] =
'\0';
273 szDispName[
i] = szDispName[
i + 1];
324 swprintf(szLayoutId,
L"%08lx", ulLayoutId);
340 TRACE(
"LCID: %08lx\n", lcid);
345 for (
i = 0;
i < nCount;
i++)
348 TRACE(
"Layout: %08lx\n", LayoutId);
352 TRACE(
"Found 1: %08lx --> %08lx\n", LayoutId, lcid);
358 for (
i = 0;
i < nCount;
i++)
361 TRACE(
"Layout: %08lx\n", LayoutId);
365 TRACE(
"Found 2: %08lx --> %08lx\n", LayoutId, lcid);
371 TRACE(
"No match found!\n");
381 WCHAR szLayoutId[9], szCurrentLayoutId[9];
390 wcscpy(szCurrentLayoutId,
L"00000409");
393 L"System\\CurrentControlSet\\Control\\Keyboard Layouts",
422 if (
wcscmp(szLayoutId, szCurrentLayoutId) == 0)
460 {LOCALE_IDIGITSUBSTITUTION,
L"NumShape"},
496 L".DEFAULT\\Control Panel\\International",
505 if (pNewLcid ==
NULL)
592 if (lpDrawItem->
CtlID == uCtlID)
606 pState->ImageInfo.cxSource,
607 pState->ImageInfo.cySource,
610 pState->ImageInfo.cxSource,
611 pState->ImageInfo.cySource,
646 if (pState->Unattend->bEnabled)
684 TRACE(
"LCID: 0x%08lx\n", NewLcid);
737 pState->NextPage =
DONE;
781 if (pState->Unattend->bEnabled)
801 pState->NextPage =
DONE;
807 pState->NextPage =
DONE;
826 pState->NextPage =
DONE;
854 ERR(
"Unable to parse Signature\n");
866 ERR(
"Unable to parse UnattendSetupEnabled\n");
872 TRACE(
"Unattended setup is not enabled\n",
Buffer);
895 wcscat(UnattendInf,
L"\\unattend.inf");
897 pState->Unattend = &Unattend;
899 while (pState->NextPage !=
DONE)
901 switch (pState->NextPage)
#define RC_STRING_MAX_SIZE
static LONG ReadRegSzKey(IN HKEY hKey, IN LPCWSTR pszKey, OUT LPWSTR *pValue)
#define IDS_CANCEL_CONFIRM
DWORD GetPixel(LPDIRECTDRAWSURFACE7 Surface, UINT x, UINT y)
#define RegCloseKey(hKey)
static const BLENDFUNCTION BlendFunc
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
LONG WINAPI RegEnumKeyExW(_In_ HKEY hKey, _In_ DWORD dwIndex, _Out_ LPWSTR lpName, _Inout_ LPDWORD lpcbName, _Reserved_ LPDWORD lpReserved, _Out_opt_ LPWSTR lpClass, _Inout_opt_ LPDWORD lpcbClass, _Out_opt_ PFILETIME lpftLastWriteTime)
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
#define HeapFree(x, y, z)
static void cleanup(void)
DWORD WINAPI ExpandEnvironmentStringsW(IN LPCWSTR lpSrc, IN LPWSTR lpDst, IN DWORD nSize)
UINT WINAPI GetWindowsDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
INT WINAPI GetPrivateProfileStringW(LPCWSTR section, LPCWSTR entry, LPCWSTR def_val, LPWSTR buffer, UINT len, LPCWSTR filename)
BOOL WINAPI SetThreadLocale(LCID lcid)
BOOL WINAPI EnumSystemLocalesW(LOCALE_ENUMPROCW lpfnLocaleEnum, DWORD dwFlags)
BOOL WINAPI IsValidLocale(LCID lcid, DWORD flags)
LCID WINAPI GetUserDefaultLCID(void)
INT WINAPI GetLocaleInfoW(LCID lcid, LCTYPE lctype, LPWSTR buffer, INT len)
static const WCHAR Cleanup[]
GLclampf GLclampf GLclampf alpha
GLdouble GLdouble GLdouble r
GLboolean GLboolean GLboolean b
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
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 GLint GLint j
_Check_return_ long __cdecl wcstol(_In_z_ const wchar_t *_Str, _Out_opt_ _Deref_post_z_ wchar_t **_EndPtr, _In_ int _Radix)
_Check_return_ unsigned long __cdecl wcstoul(_In_z_ const wchar_t *_Str, _Out_opt_ _Deref_post_z_ wchar_t **_EndPtr, _In_ int _Radix)
_Check_return_ _CRTIMP int __cdecl _wtoi(_In_z_ const wchar_t *_Str)
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
static VOID CreateLanguagesList(HWND hwnd, PSTATE pState)
static VOID CreateKeyboardLayoutList(HWND hItemsList)
static INT_PTR CALLBACK LocaleDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
static VOID InitializeDefaultUserLocale(PLCID pNewLcid)
VOID RunLiveCD(PSTATE pState)
struct _LIVECD_UNATTEND LIVECD_UNATTEND
VOID ParseUnattend(LPCWSTR UnattendInf, LIVECD_UNATTEND *pUnattend)
VOID CenterWindow(HWND hWnd)
static INT_PTR CALLBACK StartDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
static VOID SetKeyboardLayout(HWND hwnd)
static VOID OnDrawItem(LPDRAWITEMSTRUCT lpDrawItem, PSTATE pState, UINT uCtlID)
static VOID SelectKeyboardForLanguage(HWND hwnd, LCID lcid)
static BOOL CALLBACK LocalesEnumProc(LPTSTR lpLocale)
static VOID InitLogo(PIMGINFO pImgInfo, HWND hwndDlg)
static BOOL GetLayoutName(LPCWSTR szLCID, LPWSTR szName)
static char * NextOption(const char *const ostr)
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
BOOL WINAPI GdiAlphaBlend(HDC hdcDst, int xDst, int yDst, int widthDst, int heightDst, HDC hdcSrc, int xSrc, int ySrc, int widthSrc, int heightSrc, BLENDFUNCTION blendFunction)
#define KEY_ENUMERATE_SUB_KEYS
#define MAKELCID(lgid, srtid)
NTSTATUS NTAPI NtSetDefaultLocale(IN BOOLEAN UserProfile, IN LCID DefaultLocaleId)
static const WCHAR szName[]
#define REGSTR_PATH_CURRENT_CONTROL_SET
_Check_return_ _CRTIMP int __cdecl _wcsicmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
_CRTIMP wchar_t *__cdecl wcscat(_Inout_updates_z_(_String_length_(_Dest)+_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
#define LANGIDFROMLCID(l)
#define SUBLANG_SPANISH_MODERN
BITMAPINFOHEADER bmiHeader
static const WCHAR lang[]
_Must_inspect_result_ _In_ WDFDEVICE _In_ PCUNICODE_STRING KeyName
HBITMAP WINAPI CreateDIBSection(HDC hDC, CONST BITMAPINFO *BitmapInfo, UINT Usage, VOID **Bits, HANDLE hSection, DWORD dwOffset)
_In_ HCRYPTHASH _In_ BOOL _In_ DWORD _Inout_ DWORD _In_ DWORD dwBufLen
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
struct tagBITMAPINFO BITMAPINFO
BOOL WINAPI DeleteDC(_In_ HDC)
#define LOCALE_ICURRDIGITS
#define LOCALE_IFIRSTWEEKOFYEAR
#define LOCALE_SSHORTDATE
#define LOCALE_SPOSITIVESIGN
#define LOCALE_SMONDECIMALSEP
#define LOCALE_SMONTHOUSANDSEP
#define LOCALE_NOUSEROVERRIDE
#define LOCALE_STIMEFORMAT
#define LOCALE_IFIRSTDAYOFWEEK
#define LOCALE_SABBREVLANGNAME
#define LOCALE_INEGNUMBER
#define LOCALE_SNEGATIVESIGN
#define LOCALE_SNATIVEDIGITS
#define LOCALE_ICALENDARTYPE
#define LOCALE_SMONGROUPING
#define LOCALE_ITIMEMARKPOSN
#define HKEY_LOCAL_MACHINE
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
BOOL WINAPI GetKeyboardLayoutNameW(_Out_writes_(KL_NAMELENGTH) LPWSTR)
#define GetWindowLongPtrW
#define KLF_SETFORPROCESS
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
HANDLE WINAPI LoadImageW(_In_opt_ HINSTANCE hInst, _In_ LPCWSTR name, _In_ UINT type, _In_ int cx, _In_ int cy, _In_ UINT fuLoad)
int WINAPI MessageBoxW(_In_opt_ HWND hWnd, _In_opt_ LPCWSTR lpText, _In_opt_ LPCWSTR lpCaption, _In_ UINT uType)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
LRESULT WINAPI SendDlgItemMessageW(_In_ HWND, _In_ int, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HWND WINAPI GetDesktopWindow(void)
HKL WINAPI LoadKeyboardLayoutW(_In_ LPCWSTR, _In_ UINT)
HDC WINAPI GetDC(_In_opt_ HWND)
BOOL WINAPI SystemParametersInfoW(_In_ UINT uiAction, _In_ UINT uiParam, _Inout_opt_ PVOID pvParam, _In_ UINT fWinIni)
HWND WINAPI GetParent(_In_ HWND)
#define MAKEINTRESOURCEW(i)
#define SetWindowLongPtrW
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
INT_PTR WINAPI DialogBoxParamW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _In_opt_ HWND, _In_opt_ DLGPROC, _In_ LPARAM)
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)