2014-02-03 16:13:37 +00:00
|
|
|
#ifndef _MSTSC_PCH_
|
|
|
|
#define _MSTSC_PCH_
|
|
|
|
|
2014-01-07 16:29:20 +00:00
|
|
|
#include <stdarg.h>
|
|
|
|
|
2013-01-24 23:00:42 +00:00
|
|
|
#define WIN32_NO_STATUS
|
|
|
|
#define _INC_WINDOWS
|
|
|
|
#define COM_NO_WINDOWS_H
|
2014-01-07 16:29:20 +00:00
|
|
|
|
2013-01-24 23:00:42 +00:00
|
|
|
#include <windef.h>
|
|
|
|
#include <winbase.h>
|
|
|
|
#include <wingdi.h>
|
2013-05-04 20:43:16 +00:00
|
|
|
#include <wincon.h>
|
2007-11-08 12:47:25 +00:00
|
|
|
#include <shlobj.h>
|
|
|
|
#include <stdio.h>
|
2013-01-24 23:00:42 +00:00
|
|
|
|
2007-11-08 12:47:25 +00:00
|
|
|
#include "rdesktop.h"
|
|
|
|
#include "resource.h"
|
|
|
|
|
|
|
|
#ifndef __TODO_MSTSC_H
|
|
|
|
#define __TODO_MSTSC_H
|
|
|
|
|
2007-11-13 13:10:07 +00:00
|
|
|
#define IS_PERSISTENT(id) (id < 8 && g_pstcache_fd[id] > 0)
|
2007-11-08 12:47:25 +00:00
|
|
|
|
2007-11-06 20:36:31 +00:00
|
|
|
#define MAXKEY 256
|
|
|
|
#define MAXVALUE 256
|
2012-01-19 14:10:02 +00:00
|
|
|
#define NUM_SETTINGS 6
|
2007-11-08 15:29:23 +00:00
|
|
|
extern LPWSTR lpSettings[];
|
|
|
|
|
2007-11-06 20:36:31 +00:00
|
|
|
typedef struct _SETTINGS
|
|
|
|
{
|
|
|
|
WCHAR Key[MAXKEY];
|
|
|
|
WCHAR Type; // holds 'i' or 's'
|
|
|
|
union {
|
|
|
|
INT i;
|
|
|
|
WCHAR s[MAXVALUE];
|
|
|
|
} Value;
|
|
|
|
} SETTINGS, *PSETTINGS;
|
|
|
|
|
|
|
|
typedef struct _RDPSETTINGS
|
|
|
|
{
|
|
|
|
PSETTINGS pSettings;
|
|
|
|
INT NumSettings;
|
|
|
|
} RDPSETTINGS, *PRDPSETTINGS;
|
|
|
|
|
2007-11-08 15:29:23 +00:00
|
|
|
/* As slider control can't contain user data, we have to keep an
|
|
|
|
* array of RESOLUTION_INFO to have our own associated data.
|
|
|
|
*/
|
|
|
|
typedef struct _RESOLUTION_INFO
|
|
|
|
{
|
|
|
|
DWORD dmPelsWidth;
|
|
|
|
DWORD dmPelsHeight;
|
|
|
|
} RESOLUTION_INFO, *PRESOLUTION_INFO;
|
|
|
|
|
|
|
|
typedef struct _SETTINGS_ENTRY
|
|
|
|
{
|
|
|
|
struct _SETTINGS_ENTRY *Blink;
|
|
|
|
struct _SETTINGS_ENTRY *Flink;
|
|
|
|
DWORD dmBitsPerPel;
|
|
|
|
DWORD dmPelsWidth;
|
|
|
|
DWORD dmPelsHeight;
|
|
|
|
} SETTINGS_ENTRY, *PSETTINGS_ENTRY;
|
|
|
|
|
|
|
|
typedef struct _DISPLAY_DEVICE_ENTRY
|
|
|
|
{
|
|
|
|
struct _DISPLAY_DEVICE_ENTRY *Flink;
|
|
|
|
LPWSTR DeviceDescription;
|
|
|
|
LPWSTR DeviceName;
|
|
|
|
LPWSTR DeviceKey;
|
|
|
|
LPWSTR DeviceID;
|
|
|
|
DWORD DeviceStateFlags;
|
|
|
|
PSETTINGS_ENTRY Settings; /* sorted by increasing dmPelsHeight, BPP */
|
|
|
|
DWORD SettingsCount;
|
|
|
|
PRESOLUTION_INFO Resolutions;
|
|
|
|
DWORD ResolutionsCount;
|
|
|
|
PSETTINGS_ENTRY CurrentSettings; /* Points into Settings list */
|
|
|
|
SETTINGS_ENTRY InitialSettings;
|
|
|
|
} DISPLAY_DEVICE_ENTRY, *PDISPLAY_DEVICE_ENTRY;
|
|
|
|
|
|
|
|
typedef struct _INFO
|
|
|
|
{
|
|
|
|
PRDPSETTINGS pRdpSettings;
|
|
|
|
PDISPLAY_DEVICE_ENTRY DisplayDeviceList;
|
|
|
|
PDISPLAY_DEVICE_ENTRY CurrentDisplayDevice;
|
|
|
|
HWND hSelf;
|
|
|
|
HWND hTab;
|
|
|
|
HWND hGeneralPage;
|
|
|
|
HWND hDisplayPage;
|
|
|
|
HBITMAP hHeader;
|
|
|
|
BITMAP headerbitmap;
|
|
|
|
HICON hMstscSm;
|
|
|
|
HICON hMstscLg;
|
|
|
|
HICON hLogon;
|
|
|
|
HICON hConn;
|
|
|
|
HICON hRemote;
|
|
|
|
HICON hColor;
|
|
|
|
HBITMAP hSpectrum;
|
|
|
|
BITMAP bitmap;
|
|
|
|
} INFO, *PINFO;
|
|
|
|
|
2007-11-12 12:32:32 +00:00
|
|
|
BOOL InitRdpSettings(PRDPSETTINGS pRdpSettings);
|
2007-11-07 14:59:43 +00:00
|
|
|
BOOL OpenRDPConnectDialog(HINSTANCE hInstance, PRDPSETTINGS pRdpSettings);
|
2007-11-12 12:32:32 +00:00
|
|
|
BOOL LoadRdpSettingsFromFile(PRDPSETTINGS pRdpSettings, LPWSTR lpFile);
|
2007-11-06 23:23:25 +00:00
|
|
|
BOOL SaveRdpSettingsToFile(LPWSTR lpFile, PRDPSETTINGS pRdpSettings);
|
2007-11-06 20:36:31 +00:00
|
|
|
INT GetIntegerFromSettings(PRDPSETTINGS pSettings, LPWSTR lpValue);
|
|
|
|
LPWSTR GetStringFromSettings(PRDPSETTINGS pSettings, LPWSTR lpValue);
|
2007-11-07 13:49:31 +00:00
|
|
|
BOOL SetIntegerToSettings(PRDPSETTINGS pRdpSettings, LPWSTR lpKey, INT Value);
|
|
|
|
BOOL SetStringToSettings(PRDPSETTINGS pRdpSettings, LPWSTR lpKey, LPWSTR lpValue);
|
2007-11-08 15:29:23 +00:00
|
|
|
VOID SaveAllSettings(PINFO pInfo);
|
2007-11-08 12:47:25 +00:00
|
|
|
|
|
|
|
#endif /* __TODO_MSTSC_H */
|
2014-02-03 16:13:37 +00:00
|
|
|
|
|
|
|
#endif /* _MSTSC_PCH_ */
|