Go to the source code of this file.
|
VOID | SaveAllSettings (PINFO pInfo) |
|
BOOL | SetIntegerToSettings (PRDPSETTINGS pRdpSettings, LPWSTR lpKey, INT Value) |
|
BOOL | SetStringToSettings (PRDPSETTINGS pRdpSettings, LPWSTR lpKey, LPWSTR lpValue) |
|
INT | GetIntegerFromSettings (PRDPSETTINGS pRdpSettings, LPWSTR lpKey) |
|
LPWSTR | GetStringFromSettings (PRDPSETTINGS pRdpSettings, LPWSTR lpKey) |
|
static BOOL | WriteRdpFile (HANDLE hFile, PRDPSETTINGS pRdpSettings) |
|
static VOID | ParseSettings (PRDPSETTINGS pRdpSettings, LPWSTR lpBuffer) |
|
static LPWSTR | ReadRdpFile (HANDLE hFile) |
|
static HANDLE | OpenRdpFile (LPWSTR path, BOOL bWrite) |
|
static VOID | CloseRdpFile (HANDLE hFile) |
|
BOOL | SaveRdpSettingsToFile (LPWSTR lpFile, PRDPSETTINGS pRdpSettings) |
|
BOOL | LoadRdpSettingsFromFile (PRDPSETTINGS pRdpSettings, LPWSTR lpFile) |
|
BOOL | InitRdpSettings (PRDPSETTINGS pRdpSettings) |
|
◆ CloseRdpFile()
◆ GetIntegerFromSettings()
Definition at line 144 of file settings.c.
146{
148
149 if (pRdpSettings)
150 {
152
154 {
156 {
158 {
160 break;
161 }
162 }
163 }
164 }
165
167}
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
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
union _SETTINGS::@14 Value
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
Referenced by ReLoadDisplayPage(), and wWinMain().
◆ GetStringFromSettings()
Definition at line 171 of file settings.c.
173{
175
176 if (pRdpSettings)
177 {
179
181 {
183 {
185 {
187 break;
188 }
189 }
190 }
191 }
192
193 return lpValue;
194}
Referenced by ReLoadGeneralPage(), and wWinMain().
◆ InitRdpSettings()
Definition at line 476 of file settings.c.
477{
479
481 0,
484 {
486
488 {
492 }
493
495
497 }
498
499 return bRet;
500}
LPWSTR lpSettings[NUM_SETTINGS]
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
Referenced by wWinMain().
◆ LoadRdpSettingsFromFile()
Definition at line 419 of file settings.c.
421{
425
426
428 {
431
435 0,
436 &lpidl);
438 {
440 {
441 wcscat(pszPath,
L"\\Default.rdp");
442 lpFile = pszPath;
444 }
445 }
446 }
447
448 if (lpFile)
449 {
451
454 {
457 {
459
461 0,
463
465 }
466
468 }
469 }
470
471 return bRet;
472}
static VOID ParseSettings(PRDPSETTINGS pRdpSettings, LPWSTR lpBuffer)
static LPWSTR ReadRdpFile(HANDLE hFile)
static VOID CloseRdpFile(HANDLE hFile)
static HANDLE OpenRdpFile(LPWSTR path, BOOL bWrite)
static TAGREF LPCWSTR LPDWORD LPVOID lpBuffer
#define HeapFree(x, y, z)
HRESULT WINAPI SHGetFolderLocation(HWND hwndOwner, int nFolder, HANDLE hToken, DWORD dwReserved, LPITEMIDLIST *ppidl)
VOID WINAPI CoTaskMemFree(LPVOID ptr)
BOOL WINAPI SHGetPathFromIDListW(LPCITEMIDLIST pidl, LPWSTR pszPath)
_CRTIMP wchar_t *__cdecl wcscat(_Inout_updates_z_(_String_length_(_Dest)+_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
ITEMIDLIST UNALIGNED * LPITEMIDLIST
Referenced by DoOpenFile(), ParseCommandLine(), and wWinMain().
◆ OpenRdpFile()
◆ ParseSettings()
Definition at line 245 of file settings.c.
247{
249 WCHAR szSeps[] =
L":\r\n";
250 WCHAR szNewline[] =
L"\r\n";
254
255
256 if (lpStr[0] == 0xFEFF || lpStr[0] == 0xFFFE)
257 lpStr += 1;
258
259 lpToken =
wcstok(lpStr, szSeps);
260 while (lpToken)
261 {
263
265 {
267 {
269 if (lpToken[0] ==
L'i')
270 {
275 }
276 else if (lpToken[0] ==
L's')
277 {
279 if (lpToken[2] == 13 || lpToken[2] == 10 || lpToken[2] == 0)
280 lpToken[0] = 0;
281 else
285 }
287 }
288 }
289
290
291 if (!bFound)
293
294
296 }
297}
_Check_return_ _CRTIMP int __cdecl _wtoi(_In_z_ const wchar_t *_Str)
_CRT_RESTORE_GCC_WARNINGS _Check_return_ _CRTIMP wchar_t *__cdecl wcstok(_Inout_opt_z_ wchar_t *_Str, _In_z_ const wchar_t *_Delim)
Referenced by LoadRdpSettingsFromFile().
◆ ReadRdpFile()
Definition at line 301 of file settings.c.
302{
306
308 {
310 if (BytesToRead)
311 {
313 0,
314 BytesToRead + 2);
316 {
319 BytesToRead,
322 if (bRes)
323 {
325 }
326 else
327 {
329 0,
331
333 }
334 }
335 }
336 }
337
339}
#define ReadFile(a, b, c, d, e)
DWORD WINAPI GetFileSize(HANDLE hFile, LPDWORD lpFileSizeHigh)
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PLONGLONG _In_opt_ PWDF_REQUEST_SEND_OPTIONS _Out_opt_ PULONG_PTR BytesRead
Referenced by LoadRdpSettingsFromFile().
◆ SaveAllSettings()
Definition at line 16 of file settings.c.
17{
20
21
24 szValue,
26 {
29 szValue);
30 }
31
32
36 0,
37 0);
39 {
49 }
50
51
55 0,
56 0);
58 {
63 0);
65 {
69 }
70 }
71
72
75 szValue,
77 {
80 szValue);
81 }
82}
BOOL SetStringToSettings(PRDPSETTINGS pRdpSettings, LPWSTR lpKey, LPWSTR lpValue)
BOOL SetIntegerToSettings(PRDPSETTINGS pRdpSettings, LPWSTR lpKey, INT Value)
PRESOLUTION_INFO Resolutions
PDISPLAY_DEVICE_ENTRY DisplayDeviceList
PRDPSETTINGS pRdpSettings
LRESULT WINAPI SendDlgItemMessageW(_In_ HWND, _In_ int, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define SendDlgItemMessage
Referenced by DlgProc(), DoSaveAs(), and GeneralDlgProc().
◆ SaveRdpSettingsToFile()
Definition at line 371 of file settings.c.
373{
377
378
380 {
383
387 0,
388 &lpidl);
390 {
392 {
393 wcscat(pszPath,
L"\\Default.rdp");
394 lpFile = pszPath;
396 }
397 }
398 }
399
400 if (lpFile)
401 {
404 {
406 {
408 }
409
411 }
412 }
413
414 return bRet;
415}
static BOOL WriteRdpFile(HANDLE hFile, PRDPSETTINGS pRdpSettings)
Referenced by DlgProc(), DoSaveAs(), and GeneralDlgProc().
◆ SetIntegerToSettings()
◆ SetStringToSettings()
◆ WriteRdpFile()
Definition at line 198 of file settings.c.
200{
206
208 {
209
211 {
213 {
215 {
219 }
220 else
221 {
225 }
226
228
231 BytesToWrite,
236 }
237 }
238 }
239
241}
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
int _snwprintf(wchar_t *buffer, size_t count, const wchar_t *format,...)
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PLONGLONG _In_opt_ PWDF_REQUEST_SEND_OPTIONS _Out_opt_ PULONG_PTR BytesWritten
Referenced by SaveRdpSettingsToFile().
◆ lpSettings