ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
August 2006
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
19 participants
447 discussions
Start a n
N
ew thread
[turner] 23617: rc3.......
by turner@svn.reactos.org
Author: turner Date: Sun Aug 20 19:59:55 2006 New Revision: 23617 URL:
http://svn.reactos.org/svn/reactos?rev=23617&view=rev
Log: rc3....... Modified: branches/ros-branch-0_3_0/reactos/include/reactos/version.h Modified: branches/ros-branch-0_3_0/reactos/include/reactos/version.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_0/reactos/includ…
============================================================================== --- branches/ros-branch-0_3_0/reactos/include/reactos/version.h (original) +++ branches/ros-branch-0_3_0/reactos/include/reactos/version.h Sun Aug 20 19:59:55 2006 @@ -22,7 +22,7 @@ #define KERNEL_VERSION_PATCH_LEVEL 0 /* KERNEL_VERSION_BUILD_TYPE is L"SVN", L"RC1", L"RC2" or L"RELEASE" */ -#define KERNEL_VERSION_BUILD_TYPE L"RC2" +#define KERNEL_VERSION_BUILD_TYPE L"RC3" #endif
18 years, 4 months
1
0
0
0
[fireball] 23616: [FORMATTING]
by fireball@svn.reactos.org
Author: fireball Date: Sun Aug 20 18:01:17 2006 New Revision: 23616 URL:
http://svn.reactos.org/svn/reactos?rev=23616&view=rev
Log: [FORMATTING] Modified: trunk/reactos/drivers/usb/nt4compat/usbdriver/bulkonly.c trunk/reactos/drivers/usb/nt4compat/usbdriver/cbi.c trunk/reactos/drivers/usb/nt4compat/usbdriver/compdrv.c trunk/reactos/drivers/usb/nt4compat/usbdriver/dmgrdisp.c trunk/reactos/drivers/usb/nt4compat/usbdriver/ehci.c trunk/reactos/drivers/usb/nt4compat/usbdriver/etd.c trunk/reactos/drivers/usb/nt4compat/usbdriver/gendrv.c trunk/reactos/drivers/usb/nt4compat/usbdriver/hub.c trunk/reactos/drivers/usb/nt4compat/usbdriver/td.c trunk/reactos/drivers/usb/nt4compat/usbdriver/uhci.c trunk/reactos/drivers/usb/nt4compat/usbdriver/umss.c trunk/reactos/drivers/usb/nt4compat/usbdriver/usb.c [This mail would be too long, it was shortened to contain the URLs only.] Modified: trunk/reactos/drivers/usb/nt4compat/usbdriver/bulkonly.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/nt4compat/usbd…
Modified: trunk/reactos/drivers/usb/nt4compat/usbdriver/cbi.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/nt4compat/usbd…
Modified: trunk/reactos/drivers/usb/nt4compat/usbdriver/compdrv.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/nt4compat/usbd…
Modified: trunk/reactos/drivers/usb/nt4compat/usbdriver/dmgrdisp.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/nt4compat/usbd…
Modified: trunk/reactos/drivers/usb/nt4compat/usbdriver/ehci.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/nt4compat/usbd…
Modified: trunk/reactos/drivers/usb/nt4compat/usbdriver/etd.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/nt4compat/usbd…
Modified: trunk/reactos/drivers/usb/nt4compat/usbdriver/gendrv.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/nt4compat/usbd…
Modified: trunk/reactos/drivers/usb/nt4compat/usbdriver/hub.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/nt4compat/usbd…
Modified: trunk/reactos/drivers/usb/nt4compat/usbdriver/td.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/nt4compat/usbd…
Modified: trunk/reactos/drivers/usb/nt4compat/usbdriver/uhci.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/nt4compat/usbd…
Modified: trunk/reactos/drivers/usb/nt4compat/usbdriver/umss.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/nt4compat/usbd…
Modified: trunk/reactos/drivers/usb/nt4compat/usbdriver/usb.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/nt4compat/usbd…
18 years, 4 months
1
0
0
0
[greatlrd] 23615: do not hard code to Bitstream Vera Sans use MS Shell Dlg instead
by greatlrd@svn.reactos.org
Author: greatlrd Date: Sun Aug 20 16:46:02 2006 New Revision: 23615 URL:
http://svn.reactos.org/svn/reactos?rev=23615&view=rev
Log: do not hard code to Bitstream Vera Sans use MS Shell Dlg instead Modified: trunk/reactos/dll/win32/user32/Uk.rc Modified: trunk/reactos/dll/win32/user32/Uk.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/Uk.rc?rev…
============================================================================== --- trunk/reactos/dll/win32/user32/Uk.rc (original) +++ trunk/reactos/dll/win32/user32/Uk.rc Sun Aug 20 16:46:02 2006 @@ -8,7 +8,7 @@ SELWINDOW DIALOG DISCARDABLE 20, 20, 220, 140 STYLE DS_SYSMODAL | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -FONT 8, "Bitstream Vera Sans" +FONT 8, "MS Shell Dlg" CAPTION "Âèá³ð â³êíà" BEGIN LISTBOX 100, 5, 5, 210, 110, LBS_NOTIFY | LBS_NOINTEGRALHEIGHT | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL | WS_HSCROLL
18 years, 4 months
1
0
0
0
[greatlrd] 23614: Fixed some hard code font name 1. Bitstream Vera Sans to MS Sans Serif 2. Bitstream Vera Sans Mono to Courier New This fixed some problem that bug 1191 mentor but not all. I tested this change in ReactOS 1. using BootCD install whole process and run some ros own program and tested cmd. No problem was found with this change.
by greatlrd@svn.reactos.org
Author: greatlrd Date: Sun Aug 20 16:42:30 2006 New Revision: 23614 URL:
http://svn.reactos.org/svn/reactos?rev=23614&view=rev
Log: Fixed some hard code font name 1. Bitstream Vera Sans to MS Sans Serif 2. Bitstream Vera Sans Mono to Courier New This fixed some problem that bug 1191 mentor but not all. I tested this change in ReactOS 1. using BootCD install whole process and run some ros own program and tested cmd. No problem was found with this change. Modified: trunk/reactos/subsystems/win32/win32k/ntuser/misc.c trunk/reactos/subsystems/win32/win32k/objects/stockobj.c Modified: trunk/reactos/subsystems/win32/win32k/ntuser/misc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/misc.c (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/misc.c Sun Aug 20 16:42:30 2006 @@ -916,7 +916,7 @@ static LOGFONTW DefaultFont = { -11, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET, 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, - L"Bitstream Vera Sans" + L"MS Sans Serif" }; RtlZeroMemory(&QueryTable, sizeof(QueryTable)); Modified: trunk/reactos/subsystems/win32/win32k/objects/stockobj.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/stockobj.c (original) +++ trunk/reactos/subsystems/win32/win32k/objects/stockobj.c Sun Aug 20 16:42:30 2006 @@ -80,11 +80,11 @@ static LOGFONTW OEMFixedFont = { 11, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, OEM_CHARSET, - 0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, L"Bitstream Vera Sans Mono" }; + 0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, L"Courier New" }; //Bitstream Vera Sans Mono static LOGFONTW AnsiFixedFont = { 11, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET, - 0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, L"Bitstream Vera Sans Mono" }; + 0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, L"Courier New" }; //Bitstream Vera Sans Mono /*static LOGFONTW AnsiVarFont = *{ 10, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET, @@ -92,20 +92,20 @@ static LOGFONTW SystemFont = { 11, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET, - 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"Bitstream Vera Sans" }; + 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"Courier New" }; //Bitstream Vera Sans static LOGFONTW DeviceDefaultFont = { 11, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET, - 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"Bitstream Vera Sans" }; + 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"MS Sans Serif" }; //Bitstream Vera Sans static LOGFONTW SystemFixedFont = { 11, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET, - 0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, L"Bitstream Vera Sans Mono" }; - + 0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, L"Courier New" }; //Bitstream Vera Sans Mono + /* FIXME: Is this correct? */ static LOGFONTW DefaultGuiFont = { 11, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET, - 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"Bitstream Vera Sans" }; + 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"MS Sans Serif" }; //Bitstream Vera Sans #define NB_STOCK_OBJECTS (DEFAULT_GUI_FONT + 1)
18 years, 4 months
1
0
0
0
[mc] 23613: modified porting-tools/rdesktop-core-tester/activex.cpp modified porting-tools/rdesktop-core-tester/rdesktop-core-tester.vcproj modified porting-tools/rdesktop-core-tester/stdafx.h Support acting as both the stand-alone DLL (mstscax.dll) and the redistributable (msrdp.ocx) Wrap the non-standard "sealed" keyword in a macro Almost all state now correctly passed between rdesktop-core and the ActiveX Some debugging aids Prepared a functional DllMain Pulled in Common Controls, needed for
by mc@svn.reactos.org
Author: mc Date: Sun Aug 20 01:44:41 2006 New Revision: 23613 URL:
http://svn.reactos.org/svn/reactos?rev=23613&view=rev
Log: modified porting-tools/rdesktop-core-tester/activex.cpp modified porting-tools/rdesktop-core-tester/rdesktop-core-tester.vcproj modified porting-tools/rdesktop-core-tester/stdafx.h Support acting as both the stand-alone DLL (mstscax.dll) and the redistributable (msrdp.ocx) Wrap the non-standard "sealed" keyword in a macro Almost all state now correctly passed between rdesktop-core and the ActiveX Some debugging aids Prepared a functional DllMain Pulled in Common Controls, needed for the full-screen titlebar modified rdesktop/rdesktop.h modified rdesktop/rdp.c modified rdesktop/secure.c Minor clean-up Modified: trunk/reactos/base/applications/tsclient/porting-tools/rdesktop-core-tester/activex.cpp trunk/reactos/base/applications/tsclient/porting-tools/rdesktop-core-tester/rdesktop-core-tester.vcproj trunk/reactos/base/applications/tsclient/porting-tools/rdesktop-core-tester/stdafx.h trunk/reactos/base/applications/tsclient/rdesktop/rdesktop.h trunk/reactos/base/applications/tsclient/rdesktop/rdp.c trunk/reactos/base/applications/tsclient/rdesktop/secure.c Modified: trunk/reactos/base/applications/tsclient/porting-tools/rdesktop-core-tester/activex.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/tsclient…
============================================================================== --- trunk/reactos/base/applications/tsclient/porting-tools/rdesktop-core-tester/activex.cpp (original) +++ trunk/reactos/base/applications/tsclient/porting-tools/rdesktop-core-tester/activex.cpp Sun Aug 20 01:44:41 2006 @@ -3,6 +3,12 @@ namespace MSTSCLib { #include "mstsclib_h.h" +}; + +namespace MSTSCLib_Redist +{ +// extremely ew, but actually the cleanest way to import the alternate UUIDs +#include "mstsclib_redist_i.c" }; #include "rdesktop/rdesktop.h" @@ -43,10 +49,70 @@ } +namespace +{ + +LPSTR BstrToLpsz(BSTR bstr) +{ + int cch = WideCharToMultiByte(CP_ACP, 0, bstr, -1, NULL, 0, NULL, NULL); + + if(cch <= 0) + return NULL; + + LPSTR lpsz = new char[cch]; + + if(lpsz == NULL) + return NULL; + + cch = WideCharToMultiByte(CP_ACP, 0, bstr, -1, lpsz, cch, NULL, NULL); + + if(cch <= 0) + { + delete[] lpsz; + return NULL; + } + + return lpsz; +} + +BSTR LpszToBstr(LPSTR lpsz) +{ + int cch = MultiByteToWideChar(CP_ACP, 0, lpsz, -1, NULL, 0); + + if(cch <= 0) + return NULL; + + BSTR bstr = SysAllocStringLen(NULL, cch); + + if(bstr == NULL) + return NULL; + + cch = MultiByteToWideChar(CP_ACP, 0, lpsz, -1, bstr, cch); + + if(cch <= 0) + { + SysFreeString(bstr); + return NULL; + } + + return bstr; +} + +} +/* + "sealed" can improve optimizations by asserting a class cannot be derived + from, optimizing out accesses to the v-table from inside the class +*/ +#if defined(_MSC_VER) && _MSC_VER >= 1400 +#define SEALED_ sealed +#else +#define SEALED_ +#endif + #pragma warning(push) #pragma warning(disable: 4584) -class RdpClient sealed: // FIXME: wrap "sealed" in a macro +class RdpClient SEALED_: /* COM basics */ public IUnknown, public IDispatch, @@ -70,7 +136,7 @@ public IViewObject, public IViewObject2, - // NOTE: the original has a vestigial implementation of this, which we omit + // NOTE: the original has a vestigial, non-functional implementation of this, which we omit // public ISpecifyPropertyPages, // Hidden interfaces, not available through QueryInterface @@ -85,6 +151,15 @@ // Reference counting LONG m_refCount; +#ifdef _DEBUG + DWORD m_apartmentThreadId; + + bool InsideApartment() const + { + return GetCurrentThreadId() == m_apartmentThreadId; + } +#endif + // Aggregation support IUnknown * m_punkOuter; @@ -119,6 +194,7 @@ CLSID m_classId; // Late binding support + unsigned m_typeLibIndex; ITypeLib * m_typeLib; ITypeInfo * m_dispTypeInfo; @@ -154,7 +230,6 @@ /* Properties */ // Storage fields // NOTE: keep sorted by alignment (pointers and handles, integers, enumerations, booleans) - BSTR m_Server; BSTR m_Domain; BSTR m_UserName; BSTR m_DisconnectedText; @@ -162,13 +237,14 @@ BSTR m_FullScreenTitle; BSTR m_StartProgram; BSTR m_WorkDir; - BSTR m_LoadBalanceInfo; BSTR m_ConnectedStatusText; BSTR m_ClearTextPassword; // FIXME! dangerous, shouldn't store in cleartext! BSTR m_RdpdrLocalPrintingDocName; BSTR m_RdpdrClipCleanTempDirString; BSTR m_RdpdrClipPasteInfoString; - // TODO: keyboard layout + BSTR m_KeyboardLayoutString; + LPSTR m_Server; + LPSTR m_LoadBalanceInfo; // TODO: plugin DLLs HWND m_UIParentWindowHandle; long m_DesktopWidth; @@ -246,6 +322,8 @@ // Generic getters/setters HRESULT GetProperty(BSTR& prop, BSTR * retVal) const { + assert(InsideApartment()); + if(retVal == NULL) return E_POINTER; @@ -257,8 +335,25 @@ return S_OK; } + HRESULT GetProperty(LPSTR& prop, BSTR * retVal) const + { + assert(InsideApartment()); + + if(retVal == NULL) + return E_POINTER; + + *retVal = LpszToBstr(prop); + + if(*retVal == NULL) + return E_OUTOFMEMORY; + + return S_OK; + } + HRESULT SetProperty(BSTR& prop, BSTR newValue) { + assert(InsideApartment()); + if(m_Connected) return E_FAIL; @@ -283,17 +378,43 @@ return S_OK; } - template<class Type> HRESULT SetProperty(bool& prop, const Type& newValue) - { + HRESULT SetProperty(LPSTR& prop, BSTR newValue) + { + assert(InsideApartment()); + if(m_Connected) return E_FAIL; + delete[] prop; + + if(SysStringLen(newValue)) + { + prop = BstrToLpsz(newValue); + + if(prop == NULL) + return E_OUTOFMEMORY; + } + else + prop = NULL; + + return S_OK; + } + + template<class Type> HRESULT SetProperty(bool& prop, const Type& newValue) + { + assert(InsideApartment()); + + if(m_Connected) + return E_FAIL; + prop = !!newValue; return S_OK; } template<class Type> HRESULT SetProperty(Type& prop, const Type& newValue) { + assert(InsideApartment()); + if(m_Connected) return E_FAIL; @@ -303,6 +424,8 @@ template<class Type> HRESULT GetProperty(const bool& prop, Type * retVal) const { + assert(InsideApartment()); + if(retVal == NULL) return E_POINTER; @@ -312,6 +435,8 @@ template<class Type> HRESULT GetProperty(const Type& prop, Type * retVal) const { + assert(InsideApartment()); + if(retVal == NULL) return E_POINTER; @@ -337,6 +462,8 @@ // Generic event riser & helpers void InvokeSinks(DISPID eventId, VARIANTARG rgvarg[], unsigned int cArgs, VARIANTARG * retval) { + assert(InsideApartment()); + DISPPARAMS params; params.rgvarg = rgvarg; @@ -385,6 +512,8 @@ AsyncEventCallback callback = NULL ) { + assert(InsideApartment()); + if(retval == NULL && callback) { VARIANTARG localRetval = { }; @@ -406,8 +535,13 @@ AsyncEventCallback callback; }; - static const UINT RDPC_WM_SYNC_EVENT = WM_USER + 1; - static const UINT RDPC_WM_ASYNC_EVENT = WM_USER + 2; + enum + { + RDPC_WM_ = WM_USER, + RDPC_WM_SYNC_EVENT, + RDPC_WM_ASYNC_EVENT, + RDPC_WM_DISCONNECT, + }; bool HandleEvent(UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT& result) { @@ -415,19 +549,52 @@ { case RDPC_WM_SYNC_EVENT: case RDPC_WM_ASYNC_EVENT: + { + const EventArguments * eventArgs = reinterpret_cast<EventArguments *>(lParam); + assert(eventArgs); + + FireEventInsideApartment + ( + eventArgs->eventId, + eventArgs->rgvarg, + eventArgs->cArgs, + eventArgs->retval, + eventArgs->callback + ); + + if(uMsg == RDPC_WM_ASYNC_EVENT) + delete eventArgs; + } + + break; + + case RDPC_WM_DISCONNECT: + { + assert(m_Connected); + + VARIANTARG arg = { }; + + arg.vt = VT_I4; + arg.lVal = static_cast<long>(wParam); + + FireEventInsideApartment(4, &arg, 1); + + if(m_protocolThread) + { + WaitForSingleObject(m_protocolThread, INFINITE); + CloseHandle(m_protocolThread); + } + + // TODO: do other disconnection work here... + + m_Connected = false; + } + break; default: return false; } - - const EventArguments * eventArgs = reinterpret_cast<EventArguments *>(lParam); - assert(eventArgs); - - FireEventInsideApartment(eventArgs->eventId, eventArgs->rgvarg, eventArgs->cArgs, eventArgs->retval, eventArgs->callback); - - if(uMsg == RDPC_WM_ASYNC_EVENT) - delete eventArgs; return true; } @@ -442,6 +609,7 @@ AsyncEventCallback callback = NULL ) { + assert(!InsideApartment()); EventArguments syncEvent = { eventId, rgvarg, cArgs, retval, callback }; SendMessage(m_controlWindow, RDPC_WM_SYNC_EVENT, 0, reinterpret_cast<LPARAM>(&syncEvent)); } @@ -456,6 +624,8 @@ AsyncEventCallback callback = NULL ) { + assert(!InsideApartment()); + EventArguments * asyncEvent = new EventArguments(); if(asyncEvent == NULL) @@ -496,13 +666,8 @@ void FireDisconnected(long reason) { - VARIANTARG arg = { }; - - arg.vt = VT_I4; - arg.lVal = reason; - - // Source: protocol - FireEventOutsideApartment(4, &arg, 1); + // Source: control or protocol. Special handling + SendNotifyMessage(m_controlWindow, RDPC_WM_DISCONNECT, reason, 0); } void FireEnterFullScreenMode() @@ -519,7 +684,7 @@ HRESULT FireChannelReceivedData(char (& chanName)[CHANNEL_NAME_LEN + 1], void * chanData, unsigned int chanDataSize) { - // BUGBUG: what to do when we run outside of memory? + // BUGBUG: what to do when we run out of memory? OLECHAR wchanName[ARRAYSIZE(chanName)]; std::copy(chanName + 0, chanName + ARRAYSIZE(chanName), wchanName); @@ -727,7 +892,7 @@ pvObject = static_cast<IViewObject *>(this); else if(riid == IID_IViewObject2) pvObject = static_cast<IViewObject2 *>(this); - else if(riid == IID_IMsTscAx) + else if(riid == IID_IMsTscAx || riid == MSTSCLib_Redist::IID_IMsTscAx) pvObject = static_cast<IMsTscAx *>(this); else if(riid == IID_IMsRdpClient) pvObject = static_cast<IMsRdpClient *>(this); @@ -771,11 +936,12 @@ } /* Constructor */ - RdpClient(REFCLSID classId, IUnknown * punkOuter): + RdpClient(REFCLSID classId, unsigned libIndex, IUnknown * punkOuter): // COM/OLE internals m_refCount(0), m_punkOuter(punkOuter), m_classId(classId), + m_typeLibIndex(libIndex), m_typeLib(), m_dispTypeInfo(), m_controlWindow(NULL), @@ -785,6 +951,10 @@ m_freezeEvents(0), m_uiActive(false), m_SafetyOptions(), + +#ifdef _DEBUG + m_apartmentThreadId(GetCurrentThreadId()), +#endif // rdesktop-core interface m_protocolState(), @@ -814,8 +984,8 @@ m_ColorDepth(16), m_KeyboardHookMode(2), m_AudioRedirectionMode(0), - m_TransportType(1), // BUGBUG: ??? - m_SasSequence(0xAA03), // BUGBUG: ??? + m_TransportType(1), // BUGBUG: ??? what's this ??? + m_SasSequence(0xAA03), // BUGBUG: ??? what's this ??? m_RDPPort(3389), m_HotKeyFullScreen(VK_CANCEL), m_HotKeyAltEsc(VK_INSERT), @@ -877,8 +1047,6 @@ { if(m_punkOuter == NULL) m_punkOuter = &m_inner; - - // TODO: initialize RDPCLIENT fields } /* Destructor */ @@ -913,7 +1081,6 @@ if(m_adviseHolder) m_adviseHolder->Release(); - SysFreeString(m_Server); SysFreeString(m_Domain); SysFreeString(m_UserName); SysFreeString(m_DisconnectedText); @@ -921,20 +1088,25 @@ SysFreeString(m_FullScreenTitle); SysFreeString(m_StartProgram); SysFreeString(m_WorkDir); - SysFreeString(m_LoadBalanceInfo); SysFreeString(m_ConnectedStatusText); SysFreeString(m_ClearTextPassword); SysFreeString(m_RdpdrLocalPrintingDocName); SysFreeString(m_RdpdrClipCleanTempDirString); SysFreeString(m_RdpdrClipPasteInfoString); - // TODO: decrease module reference count + if(m_LoadBalanceInfo) + delete[] m_LoadBalanceInfo; + + if(m_Server) + delete[] m_Server; + + unlockServer(); } /* Advanced settings wrapper */ friend class AdvancedSettings; - class AdvancedSettings sealed: public MSTSCLib::IMsRdpClientAdvancedSettings4 + class AdvancedSettings SEALED_: public MSTSCLib::IMsRdpClientAdvancedSettings4 { private: RdpClient * Outer() @@ -959,6 +1131,8 @@ if(FAILED(hr)) return hr; + + assert(MSTSCLib::IID_IMsRdpClientAdvancedSettings4 == MSTSCLib_Redist::IID_IMsRdpClientAdvancedSettings4); hr = Outer()->m_typeLib->GetTypeInfoOfGuid(MSTSCLib::IID_IMsRdpClientAdvancedSettings4, &m_dispTypeInfo); @@ -1070,7 +1244,7 @@ return Outer()->SetProperty(Outer()->m_Compress, pcompress); } - virtual STDMETHODIMP IMsTscAdvancedSettings::get_Compress(long * pcompress) + virtual STDMETHODIMP IMsTscAdvancedSettings::get_Compress(long * pcompress) const { return Outer()->GetProperty(Outer()->m_Compress, pcompress); } @@ -1080,7 +1254,7 @@ return Outer()->SetProperty(Outer()->m_BitmapPersistence, pbitmapPeristence); } - virtual STDMETHODIMP IMsTscAdvancedSettings::get_BitmapPeristence(long * pbitmapPeristence) + virtual STDMETHODIMP IMsTscAdvancedSettings::get_BitmapPeristence(long * pbitmapPeristence) const { return Outer()->GetProperty(Outer()->m_BitmapPersistence, pbitmapPeristence); } @@ -1093,14 +1267,14 @@ return Outer()->SetProperty(Outer()->m_allowBackgroundInput, pallowBackgroundInput); } - virtual STDMETHODIMP IMsTscAdvancedSettings::get_allowBackgroundInput(long * pallowBackgroundInput) + virtual STDMETHODIMP IMsTscAdvancedSettings::get_allowBackgroundInput(long * pallowBackgroundInput) const { return Outer()->GetProperty(Outer()->m_allowBackgroundInput, pallowBackgroundInput); } virtual STDMETHODIMP IMsTscAdvancedSettings::put_KeyBoardLayoutStr(BSTR rhs) { - return E_NOTIMPL; // TODO + return Outer()->SetProperty(Outer()->m_KeyboardLayoutString, rhs); } virtual STDMETHODIMP IMsTscAdvancedSettings::put_PluginDlls(BSTR rhs) @@ -1135,7 +1309,7 @@ return Outer()->SetProperty(Outer()->m_ContainerHandledFullScreen, pContainerHandledFullScreen); } - virtual STDMETHODIMP IMsTscAdvancedSettings::get_ContainerHandledFullScreen(long * pContainerHandledFullScreen) + virtual STDMETHODIMP IMsTscAdvancedSettings::get_ContainerHandledFullScreen(long * pContainerHandledFullScreen) const { return Outer()->GetProperty(Outer()->m_ContainerHandledFullScreen, pContainerHandledFullScreen); } @@ -1145,7 +1319,7 @@ return Outer()->SetProperty(Outer()->m_DisableRdpdr, pDisableRdpdr); } - virtual STDMETHODIMP IMsTscAdvancedSettings::get_DisableRdpdr(long * pDisableRdpdr) + virtual STDMETHODIMP IMsTscAdvancedSettings::get_DisableRdpdr(long * pDisableRdpdr) const { return Outer()->GetProperty(Outer()->m_DisableRdpdr, pDisableRdpdr); } @@ -1156,7 +1330,7 @@ return S_FALSE; } - virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_SmoothScroll(long * psmoothScroll) + virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_SmoothScroll(long * psmoothScroll) const { return S_FALSE; } @@ -1166,7 +1340,7 @@ return Outer()->SetProperty(Outer()->m_AcceleratorPassthrough, pacceleratorPassthrough); } - virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_AcceleratorPassthrough(long * pacceleratorPassthrough) + virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_AcceleratorPassthrough(long * pacceleratorPassthrough) const { return Outer()->GetProperty(Outer()->m_AcceleratorPassthrough, pacceleratorPassthrough); } @@ -1176,7 +1350,7 @@ return Outer()->SetProperty(Outer()->m_ShadowBitmap, pshadowBitmap); } - virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_ShadowBitmap(long * pshadowBitmap) + virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_ShadowBitmap(long * pshadowBitmap) const { return Outer()->GetProperty(Outer()->m_ShadowBitmap, pshadowBitmap); } @@ -1187,7 +1361,7 @@ return Outer()->SetProperty(Outer()->m_TransportType, ptransportType); } - virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_TransportType(long * ptransportType) + virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_TransportType(long * ptransportType) const { // Reserved return Outer()->GetProperty(Outer()->m_TransportType, ptransportType); @@ -1199,7 +1373,7 @@ return Outer()->SetProperty(Outer()->m_SasSequence, psasSequence); } - virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_SasSequence(long * psasSequence) + virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_SasSequence(long * psasSequence) const { // Reserved return Outer()->GetProperty(Outer()->m_SasSequence, psasSequence); @@ -1210,7 +1384,7 @@ return Outer()->SetProperty(Outer()->m_EncryptionEnabled, pencryptionEnabled); } - virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_EncryptionEnabled(long * pencryptionEnabled) + virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_EncryptionEnabled(long * pencryptionEnabled) const { return Outer()->GetProperty(Outer()->m_EncryptionEnabled, pencryptionEnabled); } @@ -1220,7 +1394,7 @@ return Outer()->SetProperty(Outer()->m_DedicatedTerminal, pdedicatedTerminal); } - virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_DedicatedTerminal(long * pdedicatedTerminal) + virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_DedicatedTerminal(long * pdedicatedTerminal) const { return Outer()->GetProperty(Outer()->m_DedicatedTerminal, pdedicatedTerminal); } @@ -1233,7 +1407,7 @@ return Outer()->SetProperty(Outer()->m_RDPPort, prdpPort); } - virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_RDPPort(long * prdpPort) + virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_RDPPort(long * prdpPort) const { return Outer()->GetProperty(Outer()->m_RDPPort, prdpPort); } @@ -1243,7 +1417,7 @@ return S_FALSE; // TBD? implement? } - virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_EnableMouse(long * penableMouse) + virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_EnableMouse(long * penableMouse) const { return S_FALSE; // TBD? implement? } @@ -1253,7 +1427,7 @@ return Outer()->SetProperty(Outer()->m_DisableCtrlAltDel, pdisableCtrlAltDel); } - virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_DisableCtrlAltDel(long * pdisableCtrlAltDel) + virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_DisableCtrlAltDel(long * pdisableCtrlAltDel) const { return Outer()->GetProperty(Outer()->m_DisableCtrlAltDel, pdisableCtrlAltDel); } @@ -1263,7 +1437,7 @@ return Outer()->SetProperty(Outer()->m_EnableWindowsKey, penableWindowsKey); } - virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_EnableWindowsKey(long * penableWindowsKey) + virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_EnableWindowsKey(long * penableWindowsKey) const { return Outer()->GetProperty(Outer()->m_EnableWindowsKey, penableWindowsKey); } @@ -1273,7 +1447,7 @@ return Outer()->SetProperty(Outer()->m_DoubleClickDetect, pdoubleClickDetect); } - virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_DoubleClickDetect(long * pdoubleClickDetect) + virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_DoubleClickDetect(long * pdoubleClickDetect) const { return Outer()->GetProperty(Outer()->m_DoubleClickDetect, pdoubleClickDetect); } @@ -1283,7 +1457,7 @@ return Outer()->SetProperty(Outer()->m_MaximizeShell, pmaximizeShell); } - virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_MaximizeShell(long * pmaximizeShell) + virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_MaximizeShell(long * pmaximizeShell) const { return Outer()->GetProperty(Outer()->m_MaximizeShell, pmaximizeShell); } @@ -1293,7 +1467,7 @@ return Outer()->SetProperty(Outer()->m_HotKeyFullScreen, photKeyFullScreen); } - virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_HotKeyFullScreen(long * photKeyFullScreen) + virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_HotKeyFullScreen(long * photKeyFullScreen) const { return Outer()->GetProperty(Outer()->m_HotKeyFullScreen, photKeyFullScreen); } @@ -1303,7 +1477,7 @@ return Outer()->SetProperty(Outer()->m_HotKeyCtrlEsc, photKeyCtrlEsc); } - virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_HotKeyCtrlEsc(long * photKeyCtrlEsc) + virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_HotKeyCtrlEsc(long * photKeyCtrlEsc) const { return Outer()->GetProperty(Outer()->m_HotKeyCtrlEsc, photKeyCtrlEsc); } @@ -1313,7 +1487,7 @@ return Outer()->SetProperty(Outer()->m_HotKeyAltEsc, photKeyAltEsc); } - virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_HotKeyAltEsc(long * photKeyAltEsc) + virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_HotKeyAltEsc(long * photKeyAltEsc) const { return Outer()->GetProperty(Outer()->m_HotKeyAltEsc, photKeyAltEsc); } @@ -1323,7 +1497,7 @@ return Outer()->SetProperty(Outer()->m_HotKeyAltTab, photKeyAltTab); } - virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_HotKeyAltTab(long * photKeyAltTab) + virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_HotKeyAltTab(long * photKeyAltTab) const { return Outer()->GetProperty(Outer()->m_HotKeyAltTab, photKeyAltTab); } @@ -1333,7 +1507,7 @@ return Outer()->SetProperty(Outer()->m_HotKeyAltShiftTab, photKeyAltShiftTab); } - virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_HotKeyAltShiftTab(long * photKeyAltShiftTab) + virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_HotKeyAltShiftTab(long * photKeyAltShiftTab) const { return Outer()->GetProperty(Outer()->m_HotKeyAltShiftTab, photKeyAltShiftTab); } @@ -1343,7 +1517,7 @@ return Outer()->SetProperty(Outer()->m_HotKeyAltSpace, photKeyAltSpace); } - virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_HotKeyAltSpace(long * photKeyAltSpace) + virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_HotKeyAltSpace(long * photKeyAltSpace) const { return Outer()->GetProperty(Outer()->m_HotKeyAltSpace, photKeyAltSpace); } @@ -1353,7 +1527,7 @@ return Outer()->SetProperty(Outer()->m_HotKeyCtrlAltDel, photKeyCtrlAltDel); } - virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_HotKeyCtrlAltDel(long * photKeyCtrlAltDel) + virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_HotKeyCtrlAltDel(long * photKeyCtrlAltDel) const { return Outer()->GetProperty(Outer()->m_HotKeyCtrlAltDel, photKeyCtrlAltDel); } @@ -1363,7 +1537,7 @@ return S_FALSE; } - virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_orderDrawThreshold(long * porderDrawThreshold) + virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_orderDrawThreshold(long * porderDrawThreshold) const { return S_FALSE; } @@ -1377,7 +1551,7 @@ return Outer()->SetProperty(Outer()->m_BitmapCacheSize, pbitmapCacheSize); } - virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_BitmapCacheSize(long * pbitmapCacheSize) + virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_BitmapCacheSize(long * pbitmapCacheSize) const { return Outer()->GetProperty(Outer()->m_BitmapCacheSize, pbitmapCacheSize); } @@ -1390,7 +1564,7 @@ return Outer()->SetProperty(Outer()->m_BitmapVirtualCacheSize, pbitmapVirtualCacheSize); } - virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_BitmapVirtualCacheSize(long * pbitmapVirtualCacheSize) + virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_BitmapVirtualCacheSize(long * pbitmapVirtualCacheSize) const { return Outer()->GetProperty(Outer()->m_BitmapVirtualCacheSize, pbitmapVirtualCacheSize); } @@ -1400,7 +1574,7 @@ return S_FALSE; } - virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_ScaleBitmapCachesByBPP(long * pbScale) + virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_ScaleBitmapCachesByBPP(long * pbScale) const { return S_FALSE; } @@ -1410,7 +1584,7 @@ return Outer()->SetProperty(Outer()->m_NumBitmapCaches, pnumBitmapCaches); } - virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_NumBitmapCaches(long * pnumBitmapCaches) + virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_NumBitmapCaches(long * pnumBitmapCaches) const { return Outer()->GetProperty(Outer()->m_NumBitmapCaches, pnumBitmapCaches); } @@ -1420,7 +1594,7 @@ return Outer()->SetProperty(Outer()->m_CachePersistenceActive, pcachePersistenceActive); } - virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_CachePersistenceActive(long * pcachePersistenceActive) + virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_CachePersistenceActive(long * pcachePersistenceActive) const { return Outer()->GetProperty(Outer()->m_CachePersistenceActive, pcachePersistenceActive); } @@ -1435,7 +1609,7 @@ return Outer()->SetProperty(Outer()->m_brushSupportLevel, pbrushSupportLevel); } - virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_brushSupportLevel(long * pbrushSupportLevel) + virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_brushSupportLevel(long * pbrushSupportLevel) const { return Outer()->GetProperty(Outer()->m_brushSupportLevel, pbrushSupportLevel); } @@ -1446,7 +1620,7 @@ return S_FALSE; } - virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_minInputSendInterval(long * pminInputSendInterval) + virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_minInputSendInterval(long * pminInputSendInterval) const { // TODO return S_FALSE; @@ -1458,7 +1632,7 @@ return S_FALSE; } - virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_InputEventsAtOnce(long * pinputEventsAtOnce) + virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_InputEventsAtOnce(long * pinputEventsAtOnce) const { // TODO return S_FALSE; @@ -1470,7 +1644,7 @@ return S_FALSE; } - virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_maxEventCount(long * pmaxEventCount) + virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_maxEventCount(long * pmaxEventCount) const { // TODO return S_FALSE; @@ -1484,7 +1658,7 @@ return Outer()->SetProperty(Outer()->m_keepAliveInternal, pkeepAliveInterval); } - virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_keepAliveInterval(long * pkeepAliveInterval) + virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_keepAliveInterval(long * pkeepAliveInterval) const { return Outer()->GetProperty(Outer()->m_keepAliveInternal, pkeepAliveInterval); } @@ -1497,7 +1671,7 @@ return Outer()->SetProperty(Outer()->m_shutdownTimeout, pshutdownTimeout); } - virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_shutdownTimeout(long * pshutdownTimeout) + virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_shutdownTimeout(long * pshutdownTimeout) const { return Outer()->GetProperty(Outer()->m_shutdownTimeout, pshutdownTimeout); } @@ -1510,7 +1684,7 @@ return Outer()->SetProperty(Outer()->m_overallConnectionTimeout, poverallConnectionTimeout); } - virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_overallConnectionTimeout(long * poverallConnectionTimeout) + virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_overallConnectionTimeout(long * poverallConnectionTimeout) const { return Outer()->GetProperty(Outer()->m_overallConnectionTimeout, poverallConnectionTimeout); } @@ -1523,7 +1697,7 @@ return Outer()->SetProperty(Outer()->m_singleConnectionTimeout, psingleConnectionTimeout); } - virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_singleConnectionTimeout(long * psingleConnectionTimeout) + virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_singleConnectionTimeout(long * psingleConnectionTimeout) const { return Outer()->GetProperty(Outer()->m_singleConnectionTimeout, psingleConnectionTimeout); } @@ -1533,7 +1707,7 @@ return E_NOTIMPL; } - virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_KeyboardType(long * pkeyboardType) + virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_KeyboardType(long * pkeyboardType) const { return E_NOTIMPL; } @@ -1543,7 +1717,7 @@ return E_NOTIMPL; } - virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_KeyboardSubType(long * pkeyboardSubType) + virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_KeyboardSubType(long * pkeyboardSubType) const { return E_NOTIMPL; } @@ -1553,7 +1727,7 @@ return E_NOTIMPL; } - virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_KeyboardFunctionKey(long * pkeyboardFunctionKey) + virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_KeyboardFunctionKey(long * pkeyboardFunctionKey) const { return E_NOTIMPL; } @@ -1563,7 +1737,7 @@ return E_NOTIMPL; } - virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_WinceFixedPalette(long * pwinceFixedPalette) + virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_WinceFixedPalette(long * pwinceFixedPalette) const { return E_NOTIMPL; } @@ -1573,7 +1747,7 @@ return Outer()->SetProperty(Outer()->m_ConnectToServerConsole, pConnectToConsole); } - virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_ConnectToServerConsole(VARIANT_BOOL * pConnectToConsole) + virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_ConnectToServerConsole(VARIANT_BOOL * pConnectToConsole) const { return Outer()->GetProperty(Outer()->m_ConnectToServerConsole, pConnectToConsole); } @@ -1583,7 +1757,7 @@ return put_BitmapPeristence(pbitmapPersistence); } - virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_BitmapPersistence(long * pbitmapPersistence) + virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_BitmapPersistence(long * pbitmapPersistence) const { return get_BitmapPeristence(pbitmapPersistence); } @@ -1596,7 +1770,7 @@ return Outer()->SetProperty(Outer()->m_MinutesToIdleTimeout, pminutesToIdleTimeout); } - virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_MinutesToIdleTimeout(long * pminutesToIdleTimeout) + virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_MinutesToIdleTimeout(long * pminutesToIdleTimeout) const { return Outer()->GetProperty(Outer()->m_MinutesToIdleTimeout, pminutesToIdleTimeout); } @@ -1606,7 +1780,7 @@ return Outer()->SetProperty(Outer()->m_SmartSizing, pfSmartSizing); } - virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_SmartSizing(VARIANT_BOOL * pfSmartSizing) + virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_SmartSizing(VARIANT_BOOL * pfSmartSizing) const { return Outer()->GetProperty(Outer()->m_SmartSizing, pfSmartSizing); } @@ -1616,7 +1790,7 @@ return Outer()->SetProperty(Outer()->m_RdpdrLocalPrintingDocName, pLocalPrintingDocName); } - virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_RdpdrLocalPrintingDocName(BSTR * pLocalPrintingDocName) + virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_RdpdrLocalPrintingDocName(BSTR * pLocalPrintingDocName) const { return Outer()->GetProperty(Outer()->m_RdpdrLocalPrintingDocName, pLocalPrintingDocName); } @@ -1626,7 +1800,7 @@ return Outer()->SetProperty(Outer()->m_RdpdrClipCleanTempDirString, clipCleanTempDirString); } - virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_RdpdrClipCleanTempDirString(BSTR * clipCleanTempDirString) + virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_RdpdrClipCleanTempDirString(BSTR * clipCleanTempDirString) const { return Outer()->GetProperty(Outer()->m_RdpdrClipCleanTempDirString, clipCleanTempDirString); } @@ -1636,7 +1810,7 @@ return Outer()->SetProperty(Outer()->m_RdpdrClipPasteInfoString, clipPasteInfoString); } - virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_RdpdrClipPasteInfoString(BSTR * clipPasteInfoString) + virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_RdpdrClipPasteInfoString(BSTR * clipPasteInfoString) const { return Outer()->GetProperty(Outer()->m_RdpdrClipPasteInfoString, clipPasteInfoString); } @@ -1654,7 +1828,7 @@ return Outer()->SetProperty(Outer()->m_DisplayConnectionBar, pDisplayConnectionBar); } - virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_DisplayConnectionBar(VARIANT_BOOL * pDisplayConnectionBar) + virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_DisplayConnectionBar(VARIANT_BOOL * pDisplayConnectionBar) const { return Outer()->GetProperty(Outer()->m_DisplayConnectionBar, pDisplayConnectionBar); } @@ -1667,7 +1841,7 @@ return Outer()->SetProperty(Outer()->m_PinConnectionBar, pPinConnectionBar); } - virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_PinConnectionBar(VARIANT_BOOL * pPinConnectionBar) + virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_PinConnectionBar(VARIANT_BOOL * pPinConnectionBar) const { return Outer()->GetProperty(Outer()->m_PinConnectionBar, pPinConnectionBar); } @@ -1677,7 +1851,7 @@ return Outer()->SetProperty(Outer()->m_GrabFocusOnConnect, pfGrabFocusOnConnect); } - virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_GrabFocusOnConnect(VARIANT_BOOL * pfGrabFocusOnConnect) + virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_GrabFocusOnConnect(VARIANT_BOOL * pfGrabFocusOnConnect) const { return Outer()->GetProperty(Outer()->m_GrabFocusOnConnect, pfGrabFocusOnConnect); } @@ -1687,7 +1861,7 @@ return Outer()->SetProperty(Outer()->m_LoadBalanceInfo, pLBInfo); } - virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_LoadBalanceInfo(BSTR * pLBInfo) + virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_LoadBalanceInfo(BSTR * pLBInfo) const { return Outer()->GetProperty(Outer()->m_LoadBalanceInfo, pLBInfo); } @@ -1697,7 +1871,7 @@ return Outer()->SetProperty(Outer()->m_RedirectDrives, pRedirectDrives); } - virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_RedirectDrives(VARIANT_BOOL * pRedirectDrives) + virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_RedirectDrives(VARIANT_BOOL * pRedirectDrives) const { return Outer()->GetProperty(Outer()->m_RedirectDrives, pRedirectDrives); } @@ -1707,7 +1881,7 @@ return Outer()->SetProperty(Outer()->m_RedirectPrinters, pRedirectPrinters); } - virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_RedirectPrinters(VARIANT_BOOL * pRedirectPrinters) + virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_RedirectPrinters(VARIANT_BOOL * pRedirectPrinters) const { return Outer()->GetProperty(Outer()->m_RedirectPrinters, pRedirectPrinters); } @@ -1717,7 +1891,7 @@ return Outer()->SetProperty(Outer()->m_RedirectPorts, pRedirectPorts); } - virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_RedirectPorts(VARIANT_BOOL * pRedirectPorts) + virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_RedirectPorts(VARIANT_BOOL * pRedirectPorts) const { return Outer()->GetProperty(Outer()->m_RedirectPorts, pRedirectPorts); } @@ -1727,7 +1901,7 @@ return Outer()->SetProperty(Outer()->m_RedirectSmartCards, pRedirectSmartCards); } - virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_RedirectSmartCards(VARIANT_BOOL * pRedirectSmartCards) + virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_RedirectSmartCards(VARIANT_BOOL * pRedirectSmartCards) const { return Outer()->GetProperty(Outer()->m_RedirectSmartCards, pRedirectSmartCards); } @@ -1740,7 +1914,7 @@ return Outer()->SetProperty(Outer()->m_BitmapVirtualCache16BppSize, pBitmapVirtualCache16BppSize); } - virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_BitmapVirtualCache16BppSize(long * pBitmapVirtualCache16BppSize) + virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_BitmapVirtualCache16BppSize(long * pBitmapVirtualCache16BppSize) const { return Outer()->GetProperty(Outer()->m_BitmapVirtualCache16BppSize, pBitmapVirtualCache16BppSize); } @@ -1753,7 +1927,7 @@ return Outer()->SetProperty(Outer()->m_BitmapVirtualCache24BppSize, pBitmapVirtualCache24BppSize); } - virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_BitmapVirtualCache24BppSize(long * pBitmapVirtualCache24BppSize) + virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_BitmapVirtualCache24BppSize(long * pBitmapVirtualCache24BppSize) const { return Outer()->GetProperty(Outer()->m_BitmapVirtualCache24BppSize, pBitmapVirtualCache24BppSize); } @@ -1763,7 +1937,7 @@ return Outer()->SetProperty(Outer()->m_PerformanceFlags, pDisableList); } - virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_PerformanceFlags(long * pDisableList) + virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_PerformanceFlags(long * pDisableList) const { return Outer()->GetProperty(Outer()->m_PerformanceFlags, pDisableList); } @@ -1779,13 +1953,13 @@ return Outer()->SetProperty(Outer()->m_NotifyTSPublicKey, pfNotify); } - virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_NotifyTSPublicKey(VARIANT_BOOL * pfNotify) + virtual STDMETHODIMP IMsRdpClientAdvancedSettings::get_NotifyTSPublicKey(VARIANT_BOOL * pfNotify) const { return Outer()->GetProperty(Outer()->m_NotifyTSPublicKey, pfNotify); } /* IMsRdpClientAdvancedSettings2 */ - virtual STDMETHODIMP IMsRdpClientAdvancedSettings2::get_CanAutoReconnect(VARIANT_BOOL * pfCanAutoReconnect) + virtual STDMETHODIMP IMsRdpClientAdvancedSettings2::get_CanAutoReconnect(VARIANT_BOOL * pfCanAutoReconnect) const { return E_NOTIMPL; // TODO } @@ -1795,7 +1969,7 @@ return Outer()->SetProperty(Outer()->m_EnableAutoReconnect, pfEnableAutoReconnect); } - virtual STDMETHODIMP IMsRdpClientAdvancedSettings2::get_EnableAutoReconnect(VARIANT_BOOL * pfEnableAutoReconnect) + virtual STDMETHODIMP IMsRdpClientAdvancedSettings2::get_EnableAutoReconnect(VARIANT_BOOL * pfEnableAutoReconnect) const { return Outer()->GetProperty(Outer()->m_EnableAutoReconnect, pfEnableAutoReconnect); } @@ -1808,7 +1982,7 @@ return Outer()->SetProperty(Outer()->m_MaxReconnectAttempts, pMaxReconnectAttempts); } - virtual STDMETHODIMP IMsRdpClientAdvancedSettings2::get_MaxReconnectAttempts(long * pMaxReconnectAttempts) + virtual STDMETHODIMP IMsRdpClientAdvancedSettings2::get_MaxReconnectAttempts(long * pMaxReconnectAttempts) const { return Outer()->GetProperty(Outer()->m_MaxReconnectAttempts, pMaxReconnectAttempts); } @@ -1819,7 +1993,7 @@ return Outer()->SetProperty(Outer()->m_ConnectionBarShowMinimizeButton, pfShowMinimize); } - virtual STDMETHODIMP IMsRdpClientAdvancedSettings3::get_ConnectionBarShowMinimizeButton(VARIANT_BOOL * pfShowMinimize) + virtual STDMETHODIMP IMsRdpClientAdvancedSettings3::get_ConnectionBarShowMinimizeButton(VARIANT_BOOL * pfShowMinimize) const { return Outer()->GetProperty(Outer()->m_ConnectionBarShowMinimizeButton, pfShowMinimize); } @@ -1829,7 +2003,7 @@ return Outer()->SetProperty(Outer()->m_ConnectionBarShowRestoreButton, pfShowRestore); } - virtual STDMETHODIMP IMsRdpClientAdvancedSettings3::get_ConnectionBarShowRestoreButton(VARIANT_BOOL * pfShowRestore) + virtual STDMETHODIMP IMsRdpClientAdvancedSettings3::get_ConnectionBarShowRestoreButton(VARIANT_BOOL * pfShowRestore) const { return Outer()->GetProperty(Outer()->m_ConnectionBarShowRestoreButton, pfShowRestore); } @@ -1841,7 +2015,7 @@ return Outer()->SetProperty(Outer()->m_AuthenticationLevel, puiAuthLevel); } - virtual STDMETHODIMP IMsRdpClientAdvancedSettings4::get_AuthenticationLevel(unsigned int * puiAuthLevel) + virtual STDMETHODIMP IMsRdpClientAdvancedSettings4::get_AuthenticationLevel(unsigned int * puiAuthLevel) const { return Outer()->GetProperty(Outer()->m_AuthenticationLevel, puiAuthLevel); } @@ -1858,7 +2032,7 @@ /* Secured settings wrapper */ friend class SecuredSettings; - class SecuredSettings sealed: public MSTSCLib::IMsRdpClientSecuredSettings + class SecuredSettings SEALED_: public MSTSCLib::IMsRdpClientSecuredSettings { private: RdpClient * Outer() @@ -1883,6 +2057,8 @@ if(FAILED(hr)) return hr; + + assert(MSTSCLib::IID_IMsRdpClientSecuredSettings == MSTSCLib_Redist::IID_IMsRdpClientSecuredSettings); hr = Outer()->m_typeLib->GetTypeInfoOfGuid(MSTSCLib::IID_IMsRdpClientSecuredSettings, &m_dispTypeInfo); @@ -1991,7 +2167,7 @@ return Outer()->SetProperty(Outer()->m_StartProgram, pStartProgram); } - virtual STDMETHODIMP IMsTscSecuredSettings::get_StartProgram(BSTR * pStartProgram) + virtual STDMETHODIMP IMsTscSecuredSettings::get_StartProgram(BSTR * pStartProgram) const { return Outer()->GetProperty(Outer()->m_StartProgram, pStartProgram); } @@ -2001,7 +2177,7 @@ return Outer()->SetProperty(Outer()->m_WorkDir, pWorkDir); } - virtual STDMETHODIMP IMsTscSecuredSettings::get_WorkDir(BSTR * pWorkDir) + virtual STDMETHODIMP IMsTscSecuredSettings::get_WorkDir(BSTR * pWorkDir) const { return Outer()->GetProperty(Outer()->m_WorkDir, pWorkDir); } @@ -2011,7 +2187,7 @@ return Outer()->put_FullScreen(!!pfFullScreen); } - virtual STDMETHODIMP IMsTscSecuredSettings::get_FullScreen(long * pfFullScreen) + virtual STDMETHODIMP IMsTscSecuredSettings::get_FullScreen(long * pfFullScreen) const { return Outer()->GetProperty(Outer()->m_FullScreen, pfFullScreen); } @@ -2025,7 +2201,7 @@ return Outer()->SetProperty(Outer()->m_KeyboardHookMode, pkeyboardHookMode); } - virtual STDMETHODIMP IMsRdpClientSecuredSettings::get_KeyboardHookMode(long * pkeyboardHookMode) + virtual STDMETHODIMP IMsRdpClientSecuredSettings::get_KeyboardHookMode(long * pkeyboardHookMode) const { return Outer()->GetProperty(Outer()->m_KeyboardHookMode, pkeyboardHookMode); } @@ -2038,7 +2214,7 @@ return Outer()->SetProperty(Outer()->m_AudioRedirectionMode, pAudioRedirectionMode); } - virtual STDMETHODIMP IMsRdpClientSecuredSettings::get_AudioRedirectionMode(long * pAudioRedirectionMode) + virtual STDMETHODIMP IMsRdpClientSecuredSettings::get_AudioRedirectionMode(long * pAudioRedirectionMode) const { return Outer()->GetProperty(Outer()->m_AudioRedirectionMode, pAudioRedirectionMode); } @@ -2061,11 +2237,24 @@ if(m_typeLib) return S_OK; + // Get the DLL name of the ActiveX control WCHAR szPath[MAX_PATH + 1]; - - if(GetModuleFileNameW(GetCurrentModule(), szPath, ARRAYSIZE(szPath) - 1) == 0) + DWORD cchPathLen = GetModuleFileNameW(GetCurrentModule(), szPath, ARRAYSIZE(szPath) - 1); + + if(cchPathLen == 0) return HRESULT_FROM_WIN32(GetLastError()); + if(cchPathLen > ((ARRAYSIZE(szPath) - 1) - 2)) + return E_FAIL; + + // Append the resource id of the type library + assert(m_typeLibIndex < 10); + + szPath[cchPathLen + 0] = L'\\'; + szPath[cchPathLen + 1] = static_cast<WCHAR>(L'0' + m_typeLibIndex); + szPath[cchPathLen + 2] = 0; + + // Load the type library HRESULT hr = LoadTypeLibEx(szPath, REGKIND_NONE, &m_typeLib); if(FAILED(hr)) @@ -2085,6 +2274,8 @@ if(FAILED(hr)) return hr; + + assert(MSTSCLib::IID_IMsRdpClient4 == MSTSCLib_Redist::IID_IMsRdpClient4); hr = m_typeLib->GetTypeInfoOfGuid(MSTSCLib::IID_IMsRdpClient4, &m_dispTypeInfo); @@ -2149,28 +2340,41 @@ void ProtocolLoop() { + WCHAR hostname[MAX_COMPUTERNAME_LENGTH + 1]; + DWORD hostnameLen = ARRAYSIZE(hostname); + + if(!GetComputerNameW(hostname, &hostnameLen)) + hostname[0] = 0; + FireConnecting(); - uint32 flags = 0; // TODO + uint32 flags = RDP_LOGON_NORMAL; + + if(m_Compress) + flags |= RDP_LOGON_COMPRESSION | RDP_LOGON_COMPRESSION2; + + if(m_AudioRedirectionMode == 1) + flags |= RDP_LOGON_LEAVE_AUDIO; + + if(m_ClearTextPassword) + flags |= RDP_LOGON_AUTO; // Initial connection - rdp_connect + BOOL disconnected = rdp_connect ( &m_protocolState, - NULL, // TODO server + m_Server, flags, m_UserName, m_Domain, m_ClearTextPassword, m_StartProgram, m_WorkDir, - NULL, // TODO hostname - NULL // TODO cookie + hostname, + m_LoadBalanceInfo ); - BOOL disconnected = False; - - do + while(!disconnected) { BOOL deactivated = False; uint32 extendedDisconnectReason = 0; @@ -2206,6 +2410,7 @@ long totalReconnections = 0; // Reconnection + // BUGBUG: reconnection semantics may not be entirely accurate do { ++ totalReconnections; @@ -2243,20 +2448,19 @@ success = rdp_reconnect ( &m_protocolState, - NULL, // TODO + m_Server, flags, m_UserName, m_Domain, m_ClearTextPassword, m_StartProgram, m_WorkDir, - NULL, // TODO - NULL // TODO + hostname, + m_LoadBalanceInfo ); } while(!success); } - while(!disconnected); // Disconnected // TODO: clean up protocol state, clear "connected" flag @@ -2264,10 +2468,22 @@ } public: + /* Startup initialization */ + static BOOL Startup() + { + // TODO: register control window class here + return TRUE; + } + + static void Shutdown() + { + // TODO + } + /* Class factory */ - static HRESULT CreateInstance(REFCLSID rclsid, IUnknown * punkOuter, REFIID riid, void ** ppObj) - { - RdpClient * obj = new RdpClient(rclsid, punkOuter); + static HRESULT CreateInstance(REFCLSID rclsid, unsigned libIndex, IUnknown * punkOuter, REFIID riid, void ** ppObj) + { + RdpClient * obj = new RdpClient(rclsid, libIndex, punkOuter); if(obj == NULL) return E_OUTOFMEMORY; @@ -3207,10 +3423,11 @@ /* IMsTscAx */ // 23/30 virtual STDMETHODIMP IMsTscAx::put_Server(BSTR pServer) { + // FIXME: convert the hostname to Punycode, not the ANSI codepage return SetProperty(m_Server, pServer); } - virtual STDMETHODIMP IMsTscAx::get_Server(BSTR * pServer) + virtual STDMETHODIMP IMsTscAx::get_Server(BSTR * pServer) const { return GetProperty(m_Server, pServer); } @@ -3220,7 +3437,7 @@ return SetProperty(m_Domain, pDomain); } - virtual STDMETHODIMP IMsTscAx::get_Domain(BSTR * pDomain) + virtual STDMETHODIMP IMsTscAx::get_Domain(BSTR * pDomain) const { return GetProperty(m_Domain, pDomain); } @@ -3230,7 +3447,7 @@ return SetProperty(m_UserName, pUserName); } - virtual STDMETHODIMP IMsTscAx::get_UserName(BSTR * pUserName) + virtual STDMETHODIMP IMsTscAx::get_UserName(BSTR * pUserName) const { return GetProperty(m_UserName, pUserName); } @@ -3240,7 +3457,7 @@ return SetProperty(m_DisconnectedText, pDisconnectedText); } - virtual STDMETHODIMP IMsTscAx::get_DisconnectedText(BSTR * pDisconnectedText) + virtual STDMETHODIMP IMsTscAx::get_DisconnectedText(BSTR * pDisconnectedText) const { return GetProperty(m_DisconnectedText, pDisconnectedText); } @@ -3250,12 +3467,12 @@ return SetProperty(m_ConnectingText, pConnectingText); } - virtual STDMETHODIMP IMsTscAx::get_ConnectingText(BSTR * pConnectingText) + virtual STDMETHODIMP IMsTscAx::get_ConnectingText(BSTR * pConnectingText) const { return GetProperty(m_ConnectingText, pConnectingText); } - virtual STDMETHODIMP IMsTscAx::get_Connected(short * pIsConnected) + virtual STDMETHODIMP IMsTscAx::get_Connected(short * pIsConnected) const { return GetProperty(m_Connected, pIsConnected); } @@ -3268,7 +3485,7 @@ return SetProperty(m_DesktopWidth, pVal); } - virtual STDMETHODIMP IMsTscAx::get_DesktopWidth(long * pVal) + virtual STDMETHODIMP IMsTscAx::get_DesktopWidth(long * pVal) const { return GetProperty(m_DesktopWidth, pVal); } @@ -3281,7 +3498,7 @@ return SetProperty(m_DesktopHeight, pVal); } - virtual STDMETHODIMP IMsTscAx::get_DesktopHeight(long * pVal) + virtual STDMETHODIMP IMsTscAx::get_DesktopHeight(long * pVal) const { return GetProperty(m_DesktopHeight, pVal); } @@ -3291,28 +3508,28 @@ return SetProperty(m_StartConnected, pfStartConnected); } - virtual STDMETHODIMP IMsTscAx::get_StartConnected(long * pfStartConnected) + virtual STDMETHODIMP IMsTscAx::get_StartConnected(long * pfStartConnected) const { return GetProperty(m_StartConnected, pfStartConnected); } - virtual STDMETHODIMP IMsTscAx::get_HorizontalScrollBarVisible(long * pfHScrollVisible) + virtual STDMETHODIMP IMsTscAx::get_HorizontalScrollBarVisible(long * pfHScrollVisible) const { return GetProperty(m_HorizontalScrollBarVisible, pfHScrollVisible); } - virtual STDMETHODIMP IMsTscAx::get_VerticalScrollBarVisible(long * pfVScrollVisible) + virtual STDMETHODIMP IMsTscAx::get_VerticalScrollBarVisible(long * pfVScrollVisible) const { return GetProperty(m_VerticalScrollBarVisible, pfVScrollVisible); } virtual STDMETHODIMP IMsTscAx::put_FullScreenTitle(BSTR rhs) { - // TODO: limit length - return SetProperty(m_FullScreenTitle, rhs); - } - - virtual STDMETHODIMP IMsTscAx::get_CipherStrength(long * pCipherStrength) + // TODO + return E_NOTIMPL; + } + + virtual STDMETHODIMP IMsTscAx::get_CipherStrength(long * pCipherStrength) const { if(pCipherStrength == NULL) return E_INVALIDARG; @@ -3321,7 +3538,7 @@ return S_OK; } - virtual STDMETHODIMP IMsTscAx::get_Version(BSTR * pVersion) + virtual STDMETHODIMP IMsTscAx::get_Version(BSTR * pVersion) const { if(pVersion == NULL) return E_INVALIDARG; @@ -3335,23 +3552,23 @@ return S_OK; } - virtual STDMETHODIMP IMsTscAx::get_SecuredSettingsEnabled(long * pSecuredSettingsEnabled) + virtual STDMETHODIMP IMsTscAx::get_SecuredSettingsEnabled(long * pSecuredSettingsEnabled) const { // TODO: initialize m_SecuredSettingsEnabled as soon as we have an OLE client site return GetProperty(m_SecuredSettingsEnabled, pSecuredSettingsEnabled); } - virtual STDMETHODIMP IMsTscAx::get_SecuredSettings(MSTSCLib::IMsTscSecuredSettings ** ppSecuredSettings) + virtual STDMETHODIMP IMsTscAx::get_SecuredSettings(MSTSCLib::IMsTscSecuredSettings ** ppSecuredSettings) const { return GetSecuredSettings(ppSecuredSettings); } - virtual STDMETHODIMP IMsTscAx::get_AdvancedSettings(MSTSCLib::IMsTscAdvancedSettings ** ppAdvSettings) + virtual STDMETHODIMP IMsTscAx::get_AdvancedSettings(MSTSCLib::IMsTscAdvancedSettings ** ppAdvSettings) const { return GetAdvancedSettings(ppAdvSettings); } - virtual STDMETHODIMP IMsTscAx::get_Debugger(MSTSCLib::IMsTscDebug ** ppDebugger) + virtual STDMETHODIMP IMsTscAx::get_Debugger(MSTSCLib::IMsTscDebug ** ppDebugger) const { return E_NOTIMPL; } @@ -3365,8 +3582,6 @@ // TODO: if the protocol thread is waiting to reconnect, wake it up - // TODO: initialize plugin DLLs/channels - HRESULT hr; if(m_controlWindow == NULL) @@ -3379,7 +3594,81 @@ for(;;) { - // TODO: initialize m_protocolState + // TODO: initialize plugin DLLs/channels + + m_protocolState.licence_username = BstrToLpsz(m_UserName); + + if(m_protocolState.licence_username == NULL) + { + hr = E_OUTOFMEMORY; + break; + } + + DWORD dwSize = ARRAYSIZE(m_protocolState.licence_hostname); + + if(!GetComputerNameA(m_protocolState.licence_hostname, &dwSize)) + { + hr = HRESULT_FROM_WIN32(GetLastError()); + break; + } + + // Keyboard layout + // BUGBUG: not too sure about the semantics + long keyboardLayout = -1; + WCHAR * endPtr = NULL; + + if(m_KeyboardLayoutString) + keyboardLayout = wcstol(m_KeyboardLayoutString, &endPtr, 0); + + // no keyboard layout specified or invalid keyboard layout: use current keyboard layout + if(endPtr == NULL || *endPtr == 0 || keyboardLayout == -1) + keyboardLayout = PtrToLong(GetKeyboardLayout(0)); // FIXME? use LOWORD()? + + m_protocolState.keylayout = keyboardLayout; + + // in case of failure, assume English (US) + if(m_protocolState.keylayout == 0) + m_protocolState.keylayout = MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US); + + // Physical keyboard information + m_protocolState.keyboard_type = GetKeyboardType(0); + m_protocolState.keyboard_subtype = GetKeyboardType(1); + m_protocolState.keyboard_functionkeys = GetKeyboardType(2); + + // in case of failure, assume an IBM Enhanced keyboard with 12 function keys + if(m_protocolState.keyboard_type == 0 || m_protocolState.keyboard_functionkeys == 0) + { + m_protocolState.keyboard_type = 4; + m_protocolState.keyboard_subtype = 0; + m_protocolState.keyboard_functionkeys = 12; + } + + // More initialization + m_protocolState.width = m_DesktopWidth; + m_protocolState.height = m_DesktopHeight; + m_protocolState.server_depth = m_ColorDepth; + m_protocolState.bitmap_compression = m_Compress ? TRUE : FALSE; + m_protocolState.bitmap_cache = True; // TODO + m_protocolState.bitmap_cache_persist_enable = False; // TODO + m_protocolState.bitmap_cache_precache = True; // FIXME? + m_protocolState.encryption = m_EncryptionEnabled ? TRUE : FALSE; // TBD: detect automatically + m_protocolState.packet_encryption = m_EncryptionEnabled ? TRUE : FALSE; + m_protocolState.desktop_save = True; // FIXME? tie to bitmap cache setting? + m_protocolState.polygon_ellipse_orders = True; + m_protocolState.use_rdp5 = True; // TBD: detect automatically + m_protocolState.console_session = m_ConnectToServerConsole ? TRUE : FALSE; + m_protocolState.rdp5_performanceflags = m_PerformanceFlags; + m_protocolState.tcp_port_rdp = m_RDPPort; + m_protocolState.rdp.current_status = 1; + + // TODO: cache tuning based on the provided parameters + + m_protocolState.cache.bmpcache_lru[0] = -1; + m_protocolState.cache.bmpcache_lru[1] = -1; + m_protocolState.cache.bmpcache_lru[2] = -1; + m_protocolState.cache.bmpcache_mru[0] = -1; + m_protocolState.cache.bmpcache_mru[1] = -1; + m_protocolState.cache.bmpcache_mru[2] = -1; DWORD dwIgnore; m_protocolThread = CreateThread(NULL, 0, ProtocolLoopThreadProc, this, 0, &dwIgnore); @@ -3438,22 +3727,22 @@ return SetProperty(m_ColorDepth, pcolorDepth); } - virtual STDMETHODIMP IMsRdpClient::get_ColorDepth(long * pcolorDepth) + virtual STDMETHODIMP IMsRdpClient::get_ColorDepth(long * pcolorDepth) const { return GetProperty(m_ColorDepth, pcolorDepth); } - virtual STDMETHODIMP IMsRdpClient::get_AdvancedSettings2(MSTSCLib::IMsRdpClientAdvancedSettings ** ppAdvSettings) + virtual STDMETHODIMP IMsRdpClient::get_AdvancedSettings2(MSTSCLib::IMsRdpClientAdvancedSettings ** ppAdvSettings) const { return GetAdvancedSettings(ppAdvSettings); } - virtual STDMETHODIMP IMsRdpClient::get_SecuredSettings2(MSTSCLib::IMsRdpClientSecuredSettings ** ppSecuredSettings) + virtual STDMETHODIMP IMsRdpClient::get_SecuredSettings2(MSTSCLib::IMsRdpClientSecuredSettings ** ppSecuredSettings) const { return GetSecuredSettings(ppSecuredSettings); } - virtual STDMETHODIMP IMsRdpClient::get_ExtendedDisconnectReason(MSTSCLib::ExtendedDisconnectReasonCode * pExtendedDisconnectReason) + virtual STDMETHODIMP IMsRdpClient::get_ExtendedDisconnectReason(MSTSCLib::ExtendedDisconnectReasonCode * pExtendedDisconnectReason) const { return GetProperty(m_ExtendedDisconnectReason, pExtendedDisconnectReason); } @@ -3470,7 +3759,7 @@ return E_NOTIMPL; } - virtual STDMETHODIMP IMsRdpClient::get_FullScreen(VARIANT_BOOL * pfFullScreen) + virtual STDMETHODIMP IMsRdpClient::get_FullScreen(VARIANT_BOOL * pfFullScreen) const { return GetProperty(m_FullScreen, pfFullScreen); } @@ -3491,7 +3780,7 @@ } /* IMsRdpClient2 */ - virtual STDMETHODIMP IMsRdpClient2::get_AdvancedSettings3(MSTSCLib::IMsRdpClientAdvancedSettings2 ** ppAdvSettings) + virtual STDMETHODIMP IMsRdpClient2::get_AdvancedSettings3(MSTSCLib::IMsRdpClientAdvancedSettings2 ** ppAdvSettings) const { return GetAdvancedSettings(ppAdvSettings); } @@ -3501,19 +3790,19 @@ return SetProperty(m_ConnectedStatusText, pConnectedStatusText); } - virtual STDMETHODIMP IMsRdpClient2::get_ConnectedStatusText(BSTR * pConnectedStatusText) + virtual STDMETHODIMP IMsRdpClient2::get_ConnectedStatusText(BSTR * pConnectedStatusText) const { return GetProperty(m_ConnectedStatusText, pConnectedStatusText); } /* IMsRdpClient3 */ - virtual STDMETHODIMP IMsRdpClient3::get_AdvancedSettings4(MSTSCLib::IMsRdpClientAdvancedSettings3 ** ppAdvSettings) + virtual STDMETHODIMP IMsRdpClient3::get_AdvancedSettings4(MSTSCLib::IMsRdpClientAdvancedSettings3 ** ppAdvSettings) const { return GetAdvancedSettings(ppAdvSettings); } /* IMsRdpClient4 */ - virtual STDMETHODIMP IMsRdpClient4::get_AdvancedSettings5(MSTSCLib::IMsRdpClientAdvancedSettings4 ** ppAdvSettings5) + virtual STDMETHODIMP IMsRdpClient4::get_AdvancedSettings5(MSTSCLib::IMsRdpClientAdvancedSettings4 ** ppAdvSettings5) const { return GetAdvancedSettings(ppAdvSettings5); } @@ -3529,7 +3818,7 @@ return E_NOTIMPL; } - virtual STDMETHODIMP IMsTscNonScriptable::get_PortablePassword(BSTR * pPortablePass) + virtual STDMETHODIMP IMsTscNonScriptable::get_PortablePassword(BSTR * pPortablePass) const { return E_NOTIMPL; } @@ -3539,7 +3828,7 @@ return E_NOTIMPL; } - virtual STDMETHODIMP IMsTscNonScriptable::get_PortableSalt(BSTR * pPortableSalt) + virtual STDMETHODIMP IMsTscNonScriptable::get_PortableSalt(BSTR * pPortableSalt) const { return E_NOTIMPL; } @@ -3549,7 +3838,7 @@ return E_NOTIMPL; } - virtual STDMETHODIMP IMsTscNonScriptable::get_BinaryPassword(BSTR * pBinaryPassword) + virtual STDMETHODIMP IMsTscNonScriptable::get_BinaryPassword(BSTR * pBinaryPassword) const { return E_NOTIMPL; } @@ -3559,7 +3848,7 @@ return E_NOTIMPL; } - virtual STDMETHODIMP IMsTscNonScriptable::get_BinarySalt(BSTR * pSalt) + virtual STDMETHODIMP IMsTscNonScriptable::get_BinarySalt(BSTR * pSalt) const { return E_NOTIMPL; } @@ -3588,7 +3877,7 @@ return SetProperty(m_UIParentWindowHandle, phwndUIParentWindowHandle); } - virtual STDMETHODIMP IMsRdpClientNonScriptable2::get_UIParentWindowHandle(HWND * phwndUIParentWindowHandle) + virtual STDMETHODIMP IMsRdpClientNonScriptable2::get_UIParentWindowHandle(HWND * phwndUIParentWindowHandle) const { return GetProperty(m_UIParentWindowHandle, phwndUIParentWindowHandle); } @@ -3601,9 +3890,10 @@ private: LONG m_refCount; CLSID m_classId; + unsigned m_libIndex; public: - ClassFactory(REFCLSID rclsid): + ClassFactory(REFCLSID rclsid, unsigned libIndex): m_refCount(1), m_classId(rclsid) { @@ -3649,7 +3939,7 @@ if(pUnkOuter && riid != IID_IUnknown) return CLASS_E_NOAGGREGATION; - return RdpClient::CreateInstance(m_classId, pUnkOuter, riid, ppvObject); + return RdpClient::CreateInstance(m_classId, m_libIndex, pUnkOuter, riid, ppvObject); } virtual STDMETHODIMP LockServer(BOOL fLock) @@ -3668,17 +3958,30 @@ STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID * ppv) { + unsigned libindex; + if ( - rclsid != MSTSCLib::CLSID_MsTscAx && - rclsid != MSTSCLib::CLSID_MsRdpClient && - rclsid != MSTSCLib::CLSID_MsRdpClient2 && - rclsid != MSTSCLib::CLSID_MsRdpClient3 && - rclsid != MSTSCLib::CLSID_MsRdpClient4 + rclsid == MSTSCLib::CLSID_MsTscAx || + rclsid == MSTSCLib::CLSID_MsRdpClient || + rclsid == MSTSCLib::CLSID_MsRdpClient2 || + rclsid == MSTSCLib::CLSID_MsRdpClient3 || + rclsid == MSTSCLib::CLSID_MsRdpClient4 ) + libindex = 1; + else if + ( + rclsid == MSTSCLib_Redist::CLSID_MsTscAx || + rclsid == MSTSCLib_Redist::CLSID_MsRdpClient || + rclsid == MSTSCLib_Redist::CLSID_MsRdpClient2 || + rclsid == MSTSCLib_Redist::CLSID_MsRdpClient3 // || + // rclsid != MSTSCLib::CLSID_MsRdpClient4 + ) + libindex = 2; + else return CLASS_E_CLASSNOTAVAILABLE; - ClassFactory * p = new ClassFactory(rclsid); + ClassFactory * p = new ClassFactory(rclsid, libindex); if(p == NULL) return E_OUTOFMEMORY; @@ -3704,6 +4007,39 @@ return 0x05020ECE; // 5.2.3790 } +DWORD WINAPI DllMain(HINSTANCE hInstance, DWORD fdwReason, LPVOID lpvReserved) +{ + assert(hInstance == GetCurrentModule()); + + switch(fdwReason) + { + case DLL_PROCESS_ATTACH: + { + DisableThreadLibraryCalls(hInstance); + + InitCommonControls(); + + if(!RdpClient::Startup()) + return FALSE; + } + + break; + + case DLL_PROCESS_DETACH: + { + // Process is terminating, no need to clean up + if(lpvReserved) + break; + + RdpClient::Shutdown(); + } + + break; + } + + return TRUE; } +} + // EOF Modified: trunk/reactos/base/applications/tsclient/porting-tools/rdesktop-core-tester/rdesktop-core-tester.vcproj URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/tsclient…
============================================================================== --- trunk/reactos/base/applications/tsclient/porting-tools/rdesktop-core-tester/rdesktop-core-tester.vcproj (original) +++ trunk/reactos/base/applications/tsclient/porting-tools/rdesktop-core-tester/rdesktop-core-tester.vcproj Sun Aug 20 01:44:41 2006 @@ -62,7 +62,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="kernel32.lib user32.lib gdi32.lib ws2_32.lib libeay32.lib advapi32.lib msimg32.lib ole32.lib oleaut32.lib $(NoInherit)" + AdditionalDependencies="kernel32.lib user32.lib gdi32.lib ws2_32.lib libeay32.lib advapi32.lib msimg32.lib ole32.lib oleaut32.lib comctl32.lib $(NoInherit)" LinkIncremental="2" AdditionalLibraryDirectories=""C:\Documents and Settings\All Users\Documenti\openssl-0.9.8b\out32"" GenerateDebugInformation="true" @@ -139,7 +139,7 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="kernel32.lib user32.lib gdi32.lib ws2_32.lib libeay32.lib advapi32.lib msimg32.lib ole32.lib oleaut32.lib $(NoInherit)" + AdditionalDependencies="kernel32.lib user32.lib gdi32.lib ws2_32.lib libeay32.lib advapi32.lib msimg32.lib ole32.lib oleaut32.lib comctl32.lib $(NoInherit)" LinkIncremental="1" AdditionalLibraryDirectories=""C:\Documents and Settings\All Users\Documenti\openssl-0.9.8b\out32"" GenerateDebugInformation="true" Modified: trunk/reactos/base/applications/tsclient/porting-tools/rdesktop-core-tester/stdafx.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/tsclient…
============================================================================== --- trunk/reactos/base/applications/tsclient/porting-tools/rdesktop-core-tester/stdafx.h (original) +++ trunk/reactos/base/applications/tsclient/porting-tools/rdesktop-core-tester/stdafx.h Sun Aug 20 01:44:41 2006 @@ -27,4 +27,6 @@ #include <ocidl.h> #include <objsafe.h> +#include <commctrl.h> + // EOF Modified: trunk/reactos/base/applications/tsclient/rdesktop/rdesktop.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/tsclient…
============================================================================== --- trunk/reactos/base/applications/tsclient/rdesktop/rdesktop.h (original) +++ trunk/reactos/base/applications/tsclient/rdesktop/rdesktop.h Sun Aug 20 01:44:41 2006 @@ -163,34 +163,6 @@ sint16 previous; sint16 next; }; - -#if 0 -typedef struct _seamless_group -{ - Window wnd; - unsigned long id; - unsigned int refcnt; -} seamless_group; -typedef struct _seamless_window -{ - Window wnd; - unsigned long id; - unsigned long behind; - seamless_group *group; - int xoffset, yoffset; - int width, height; - int state; /* normal/minimized/maximized. */ - unsigned int desktop; - struct timeval *position_timer; - - BOOL outstanding_position; - unsigned int outpos_serial; - int outpos_xoffset, outpos_yoffset; - int outpos_width, outpos_height; - - struct _seamless_window *next; -} seamless_window; -#endif /* holds the whole state of the RDP client */ struct rdpclient Modified: trunk/reactos/base/applications/tsclient/rdesktop/rdp.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/tsclient…
============================================================================== --- trunk/reactos/base/applications/tsclient/rdesktop/rdp.c (original) +++ trunk/reactos/base/applications/tsclient/rdesktop/rdp.c Sun Aug 20 01:44:41 2006 @@ -35,7 +35,7 @@ /* Receive an RDP packet */ static STREAM -rdp_recv(RDPCLIENT * This, uint8 * type) // EXITS +rdp_recv(RDPCLIENT * This, uint8 * type) { static STREAM rdp_s; // FIXME HORROR uint16 length, pdu_type; @@ -948,7 +948,7 @@ /* Respond to a demand active PDU */ static BOOL -process_demand_active(RDPCLIENT * This, STREAM s) // EXITS +process_demand_active(RDPCLIENT * This, STREAM s) { uint8 type; uint16 len_src_descriptor, len_combined_caps; @@ -1081,7 +1081,7 @@ /* Process bitmap updates */ void -process_bitmap_updates(RDPCLIENT * This, STREAM s) // EXITS +process_bitmap_updates(RDPCLIENT * This, STREAM s) { uint16 num_updates; uint16 left, top, right, bottom, width, height; @@ -1161,7 +1161,7 @@ /* Process a palette update */ void -process_palette(RDPCLIENT * This, STREAM s) // EXITS +process_palette(RDPCLIENT * This, STREAM s) { COLOURENTRY *entry; COLOURMAP map; @@ -1242,7 +1242,7 @@ /* Process data PDU */ static BOOL -process_data_pdu(RDPCLIENT * This, STREAM s, uint32 * ext_disc_reason) // EXITS +process_data_pdu(RDPCLIENT * This, STREAM s, uint32 * ext_disc_reason) { uint8 data_pdu_type; uint8 ctype; @@ -1397,7 +1397,7 @@ /* used in uiports and rdp_main_loop, processes the rdp packets waiting */ BOOL -rdp_loop(RDPCLIENT * This, BOOL * deactivated, uint32 * ext_disc_reason) // EXITS +rdp_loop(RDPCLIENT * This, BOOL * deactivated, uint32 * ext_disc_reason) { uint8 type; BOOL disc = False; /* True when a disconnect PDU was received */ @@ -1441,7 +1441,7 @@ /* Establish a connection up to the RDP layer */ BOOL rdp_connect(RDPCLIENT * This, char *server, uint32 flags, wchar_t *username, wchar_t *domain, wchar_t *password, - wchar_t *command, wchar_t *directory, wchar_t *hostname, char *cookie) // EXITS + wchar_t *command, wchar_t *directory, wchar_t *hostname, char *cookie) { if (!sec_connect(This, server, hostname, cookie)) return False; @@ -1453,7 +1453,7 @@ /* Establish a reconnection up to the RDP layer */ BOOL rdp_reconnect(RDPCLIENT * This, char *server, uint32 flags, wchar_t *username, wchar_t *domain, wchar_t *password, - wchar_t *command, wchar_t *directory, wchar_t *hostname, char *cookie) // EXITS + wchar_t *command, wchar_t *directory, wchar_t *hostname, char *cookie) { if (!sec_reconnect(This, server, hostname, cookie)) return False; Modified: trunk/reactos/base/applications/tsclient/rdesktop/secure.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/tsclient…
============================================================================== --- trunk/reactos/base/applications/tsclient/rdesktop/secure.c (original) +++ trunk/reactos/base/applications/tsclient/rdesktop/secure.c Sun Aug 20 01:44:41 2006 @@ -902,7 +902,7 @@ /* Establish a secure connection */ BOOL -sec_connect(RDPCLIENT * This, char *server, wchar_t *hostname, char *cookie) // EXITS +sec_connect(RDPCLIENT * This, char *server, wchar_t *hostname, char *cookie) { struct stream mcs_data; void * p = malloc(512); @@ -930,7 +930,7 @@ /* Establish a secure connection */ BOOL -sec_reconnect(RDPCLIENT * This, char *server, wchar_t *hostname, char *cookie) // EXITS +sec_reconnect(RDPCLIENT * This, char *server, wchar_t *hostname, char *cookie) { struct stream mcs_data; void * p = malloc(512);
18 years, 4 months
1
0
0
0
[mc] 23612: modified porting-tools/rdesktop-core-tester/activex.cpp Getting closer and closer and closer yet... modified porting-tools/rdesktop-core-tester/mstsclib_h.h modified porting-tools/rdesktop-core-tester/mstsclib_i.c modified porting-tools/rdesktop-core-tester/mstsclib_redist_h.h modified porting-tools/rdesktop-core-tester/mstsclib_redist_i.c Regenerated, no code changes modified porting-tools/rdesktop-core-tester/rdesktop-core-tester.cpp modified rdesktop/cache.c modified rdesktop/iso.
by mc@svn.reactos.org
Author: mc Date: Sat Aug 19 22:40:53 2006 New Revision: 23612 URL:
http://svn.reactos.org/svn/reactos?rev=23612&view=rev
Log: modified porting-tools/rdesktop-core-tester/activex.cpp Getting closer and closer and closer yet... modified porting-tools/rdesktop-core-tester/mstsclib_h.h modified porting-tools/rdesktop-core-tester/mstsclib_i.c modified porting-tools/rdesktop-core-tester/mstsclib_redist_h.h modified porting-tools/rdesktop-core-tester/mstsclib_redist_i.c Regenerated, no code changes modified porting-tools/rdesktop-core-tester/rdesktop-core-tester.cpp modified rdesktop/cache.c modified rdesktop/iso.c modified rdesktop/licence.c modified rdesktop/mcs.c modified rdesktop/orders.c modified rdesktop/parse.h modified rdesktop/proto.h modified rdesktop/pstcache.c modified rdesktop/rdesktop.h modified rdesktop/rdp.c modified rdesktop/rdp5.c modified rdesktop/secure.c modified rdesktop/tcp.c Trimmed down rdesktop-core library to the maximum extent possible Handle errors gracefully Use actual Unicode strings Fixed most warnings Added hooks for events happening inside the protocol's main loop modified porting-tools/rdesktop-core-tester/stdafx.cpp Clean-up Modified: trunk/reactos/base/applications/tsclient/porting-tools/rdesktop-core-tester/activex.cpp trunk/reactos/base/applications/tsclient/porting-tools/rdesktop-core-tester/mstsclib_h.h trunk/reactos/base/applications/tsclient/porting-tools/rdesktop-core-tester/mstsclib_i.c trunk/reactos/base/applications/tsclient/porting-tools/rdesktop-core-tester/mstsclib_redist_h.h trunk/reactos/base/applications/tsclient/porting-tools/rdesktop-core-tester/mstsclib_redist_i.c trunk/reactos/base/applications/tsclient/porting-tools/rdesktop-core-tester/rdesktop-core-tester.cpp trunk/reactos/base/applications/tsclient/porting-tools/rdesktop-core-tester/stdafx.cpp trunk/reactos/base/applications/tsclient/rdesktop/cache.c trunk/reactos/base/applications/tsclient/rdesktop/iso.c trunk/reactos/base/applications/tsclient/rdesktop/licence.c trunk/reactos/base/applications/tsclient/rdesktop/mcs.c trunk/reactos/base/applications/tsclient/rdesktop/orders.c trunk/reactos/base/applications/tsclient/rdesktop/parse.h trunk/reactos/base/applications/tsclient/rdesktop/proto.h trunk/reactos/base/applications/tsclient/rdesktop/pstcache.c trunk/reactos/base/applications/tsclient/rdesktop/rdesktop.h trunk/reactos/base/applications/tsclient/rdesktop/rdp.c trunk/reactos/base/applications/tsclient/rdesktop/rdp5.c trunk/reactos/base/applications/tsclient/rdesktop/secure.c trunk/reactos/base/applications/tsclient/rdesktop/tcp.c [This mail would be too long, it was shortened to contain the URLs only.] Modified: trunk/reactos/base/applications/tsclient/porting-tools/rdesktop-core-tester/activex.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/tsclient…
Modified: trunk/reactos/base/applications/tsclient/porting-tools/rdesktop-core-tester/mstsclib_h.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/tsclient…
Modified: trunk/reactos/base/applications/tsclient/porting-tools/rdesktop-core-tester/mstsclib_i.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/tsclient…
Modified: trunk/reactos/base/applications/tsclient/porting-tools/rdesktop-core-tester/mstsclib_redist_h.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/tsclient…
Modified: trunk/reactos/base/applications/tsclient/porting-tools/rdesktop-core-tester/mstsclib_redist_i.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/tsclient…
Modified: trunk/reactos/base/applications/tsclient/porting-tools/rdesktop-core-tester/rdesktop-core-tester.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/tsclient…
Modified: trunk/reactos/base/applications/tsclient/porting-tools/rdesktop-core-tester/stdafx.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/tsclient…
Modified: trunk/reactos/base/applications/tsclient/rdesktop/cache.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/tsclient…
Modified: trunk/reactos/base/applications/tsclient/rdesktop/iso.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/tsclient…
Modified: trunk/reactos/base/applications/tsclient/rdesktop/licence.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/tsclient…
Modified: trunk/reactos/base/applications/tsclient/rdesktop/mcs.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/tsclient…
Modified: trunk/reactos/base/applications/tsclient/rdesktop/orders.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/tsclient…
Modified: trunk/reactos/base/applications/tsclient/rdesktop/parse.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/tsclient…
Modified: trunk/reactos/base/applications/tsclient/rdesktop/proto.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/tsclient…
Modified: trunk/reactos/base/applications/tsclient/rdesktop/pstcache.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/tsclient…
Modified: trunk/reactos/base/applications/tsclient/rdesktop/rdesktop.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/tsclient…
Modified: trunk/reactos/base/applications/tsclient/rdesktop/rdp.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/tsclient…
Modified: trunk/reactos/base/applications/tsclient/rdesktop/rdp5.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/tsclient…
Modified: trunk/reactos/base/applications/tsclient/rdesktop/secure.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/tsclient…
Modified: trunk/reactos/base/applications/tsclient/rdesktop/tcp.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/tsclient…
18 years, 4 months
1
0
0
0
[fireball] 23611: Fix a bit of warnings
by fireball@svn.reactos.org
Author: fireball Date: Sat Aug 19 22:09:30 2006 New Revision: 23611 URL:
http://svn.reactos.org/svn/reactos?rev=23611&view=rev
Log: Fix a bit of warnings Modified: trunk/reactos/drivers/usb/nt4compat/usbdriver/usb.h Modified: trunk/reactos/drivers/usb/nt4compat/usbdriver/usb.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/nt4compat/usbd…
============================================================================== --- trunk/reactos/drivers/usb/nt4compat/usbdriver/usb.h (original) +++ trunk/reactos/drivers/usb/nt4compat/usbdriver/usb.h Sat Aug 19 22:09:30 2006 @@ -260,7 +260,15 @@ pseTup->wIndex = endp_aDdr;\ } - +// Forward structs declarations +struct _URB; +struct _HCD; +struct _USB_DEV_MANAGER; +struct _USB_DEV; +struct _USB_ENDPOINT; +struct _USB_EVENT; +struct _USB_EVENT_POOL; +struct _USB_DRIVER; /* USB constants */
18 years, 4 months
1
0
0
0
[fireball] 23610: - Brandon Turner's warning fixing patch - When compiled with gcc we assume that CPU can't do TSC (the function will be rewritten anyway since it's weird to use inline assembly in a driver) - Changed to the correct .rc file, removed duplicate one (ehci.rc) - usbdriver now compiles with reactos build system
by fireball@svn.reactos.org
Author: fireball Date: Sat Aug 19 20:53:49 2006 New Revision: 23610 URL:
http://svn.reactos.org/svn/reactos?rev=23610&view=rev
Log: - Brandon Turner's warning fixing patch - When compiled with gcc we assume that CPU can't do TSC (the function will be rewritten anyway since it's weird to use inline assembly in a driver) - Changed to the correct .rc file, removed duplicate one (ehci.rc) - usbdriver now compiles with reactos build system Removed: trunk/reactos/drivers/usb/nt4compat/usbdriver/ehci.rc Modified: trunk/reactos/drivers/usb/nt4compat/directory.rbuild trunk/reactos/drivers/usb/nt4compat/usbdriver/gendrv.c trunk/reactos/drivers/usb/nt4compat/usbdriver/usb.c trunk/reactos/drivers/usb/nt4compat/usbdriver/usbdriver.rbuild trunk/reactos/drivers/usb/nt4compat/usbdriver/usbdriver.rc Modified: trunk/reactos/drivers/usb/nt4compat/directory.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/nt4compat/dire…
============================================================================== --- trunk/reactos/drivers/usb/nt4compat/directory.rbuild (original) +++ trunk/reactos/drivers/usb/nt4compat/directory.rbuild Sat Aug 19 20:53:49 2006 @@ -1,3 +1,3 @@ -<!--<directory name="usbdriver"> +<directory name="usbdriver"> <xi:include href="usbdriver/usbdriver.rbuild" /> -</directory>--> +</directory> Removed: trunk/reactos/drivers/usb/nt4compat/usbdriver/ehci.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/nt4compat/usbd…
============================================================================== --- trunk/reactos/drivers/usb/nt4compat/usbdriver/ehci.rc (original) +++ trunk/reactos/drivers/usb/nt4compat/usbdriver/ehci.rc (removed) @@ -1,45 +1,0 @@ -// Resource script for USBISO driver -// Generated by Walt Oney's driver wizard - -#include <windows.h> - -LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL - - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 0,0,1,0 - PRODUCTVERSION 0,0,1,0 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x40004L - FILETYPE 0x1L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "Comments", "This is a beta version of usb driver stack( ehci ), contact me at mypublic99(a)yahoo.com\0" - VALUE "CompanyName", "Woodhead Software\0" - VALUE "FileDescription", "ehci.sys\0" - VALUE "FileVersion", "0, 0, 1, 0\0" - VALUE "InternalName", "ehci.sys\0" - VALUE "LegalCopyright", "Copyright © 2002-2004 Woodhead Software\0" - VALUE "LegalTrademarks", "\0" - VALUE "OriginalFilename", "ehci.sys\0" - VALUE "PrivateBuild", "0.01\0" - VALUE "ProductName", "usb driver stack for windows NT\0" - VALUE "ProductVersion", "0, 0, 1, 0\0" - VALUE "SpecialBuild", "0131.d\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END - Modified: trunk/reactos/drivers/usb/nt4compat/usbdriver/gendrv.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/nt4compat/usbd…
============================================================================== --- trunk/reactos/drivers/usb/nt4compat/usbdriver/gendrv.c (original) +++ trunk/reactos/drivers/usb/nt4compat/usbdriver/gendrv.c Sat Aug 19 20:53:49 2006 @@ -57,7 +57,7 @@ return;\ } -extern POBJECT_TYPE *IoDriverObjectType; +extern POBJECT_TYPE NTSYSAPI IoDriverObjectType; extern VOID disp_urb_completion( @@ -295,9 +295,8 @@ PUSB_CTRL_SETUP_PACKET psetup; NTSTATUS status; PUCHAR buf; - LONG credit, i, j, match; + LONG i; PUSB_CONFIGURATION_DESC pconfig_desc; - PUSB_INTERFACE_DESC pif_desc; PUSB_DEV_MANAGER dev_mgr; if( param == NULL || dev_handle == 0 ) @@ -401,7 +400,6 @@ // and call its AddDevice. // LONG i; - NTSTATUS status; PUSB_DRIVER pdrvr; PGENDRV_DRVR_EXTENSION pdrvr_ext; PGENDRV_EXT_DRVR_ENTRY pentry; @@ -411,10 +409,9 @@ PDEVICE_OBJECT pdev_obj; PDRIVER_OBJECT pdrvr_obj; - HANDLE handle; PLIST_ENTRY pthis, pnext; - USE_IRQL; + USE_BASIC_NON_PENDING_IRQL; if( pdev == NULL ) return FALSE; @@ -509,12 +506,11 @@ { DEV_HANDLE dev_handle; PUSB_DEV_MANAGER dev_mgr; - PWORK_QUEUE_ITEM pwork_item; PUSB_DRIVER pdriver; NTSTATUS status; PUSB_DEV pdev; PUSB_EVENT pevent; - USE_IRQL; + USE_BASIC_NON_PENDING_IRQL; if( purb == NULL || context == NULL ) return; @@ -576,7 +572,7 @@ pevent->context = 0; pevent->param = ( ULONG )pdriver; pevent->pnext = 0; //vertical queue for serialized operation - pevent->process_event = gendrv_event_select_driver; + pevent->process_event = (PROCESS_EVENT)gendrv_event_select_driver; pevent->process_queue = event_list_default_process_queue; InsertTailList( &dev_mgr->event_list, &pevent->event_link ); @@ -828,7 +824,6 @@ PVOID pctx ) { - PDRIVER_EXTENSION pwin_drvr_ext; if( pdev_obj == NULL ) return STATUS_INVALID_PARAMETER; @@ -842,7 +837,7 @@ pdrvr_obj = (PDRIVER_OBJECT )pctx; if( pdrvr_obj->DriverExtension ) { - return pdrvr_obj->DriverExtension->AddDevice( pdrvr_obj, &pdev_obj ); + return pdrvr_obj->DriverExtension->AddDevice( pdrvr_obj, pdev_obj ); } return STATUS_IO_DEVICE_ERROR; } @@ -896,9 +891,8 @@ PDEVICE_OBJECT pdev_obj; PDRIVER_OBJECT pdrvr_obj; - HANDLE handle; PLIST_ENTRY pthis, pnext; - USE_IRQL; + USE_BASIC_NON_PENDING_IRQL; pdev = NULL; usb_dbg_print( DBGLVL_MAXIMUM, ( "gendrv_if_connect(): entering...\n" ) ); @@ -1062,13 +1056,11 @@ ) { PUSB_DEV pdev; - PDEVICE_OBJECT dev_obj; + PDEVICE_OBJECT dev_obj = NULL; NTSTATUS status; PUSB_DRIVER pdrvr; - PGENDRV_DRVR_EXTENSION pdrvr_ext; - PGENDRV_EXT_DRVR_ENTRY pentry; - PLIST_ENTRY pthis; - PGENDRV_DEVICE_EXTENSION pdev_ext; + PGENDRV_DRVR_EXTENSION pdrvr_ext = NULL; + PGENDRV_DEVICE_EXTENSION pdev_ext = NULL; ULONG if_idx; status = usb_query_and_lock_dev( dev_mgr, if_handle, &pdev ); @@ -1178,8 +1170,7 @@ ) { PGENDRV_DRVR_EXTENSION pdrvr_ext; - LONG i; - PLIST_ENTRY pthis, pnext; + PLIST_ENTRY pthis; PGENDRV_EXT_DRVR_ENTRY pentry; if( dev_mgr == NULL || pdriver == NULL ) return FALSE; @@ -1225,7 +1216,7 @@ OBJECT_ATTRIBUTES oa; HANDLE drvr_handle; UNICODE_STRING oname; - PDRIVER_OBJECT pdrvr; + PDRIVER_OBJECT pdrvr = NULL; RtlZeroMemory( &oa, sizeof( oa ) ); oa.Length = sizeof( oa ); @@ -1235,7 +1226,7 @@ RtlAppendUnicodeStringToString( &oname, unicode_string ); status = ObOpenObjectByName( &oa, - *IoDriverObjectType, // object type + IoDriverObjectType, // object type KernelMode, // access mode NULL, // access state FILE_READ_DATA, // STANDARD_RIGHTS_READ, access right @@ -1248,9 +1239,9 @@ } ObReferenceObjectByHandle( drvr_handle, FILE_READ_DATA, - *IoDriverObjectType, + IoDriverObjectType, KernelMode, - &pdrvr, + (PVOID)&pdrvr, NULL // OUT POBJECT_HANDLE_INFORMATION HandleInformation OPTIONAL ); ZwClose( drvr_handle ); @@ -1334,8 +1325,6 @@ } else if( irpstack->MinorFunction == IOCTL_GET_DEV_HANDLE ) { - PUCHAR user_buffer; - ULONG user_buffer_length; PGENDRV_DEVICE_EXTENSION pdev_ext; pdev_ext = dev_obj->DeviceExtension; if( irpstack->Parameters.DeviceIoControl.OutputBufferLength < sizeof( LONG ) ) @@ -1383,8 +1372,6 @@ } else if( irpstack->MinorFunction == IOCTL_GET_DEV_HANDLE ) { - PUCHAR user_buffer; - ULONG user_buffer_length; PGENDRV_DEVICE_EXTENSION pdev_ext; pdev_ext = dev_obj->DeviceExtension; if( irpstack->Parameters.DeviceIoControl.OutputBufferLength < sizeof( LONG ) ) @@ -1409,14 +1396,14 @@ PUSB_DEV_MANAGER dev_mgr ) { - PDEVEXT_HEADER dev_hdr; + PDEVEXT_HEADER dev_hdr = NULL; if( dev_obj == NULL || dev_mgr == NULL ) return FALSE; dev_hdr = ( PDEVEXT_HEADER )dev_obj->DeviceExtension; dev_hdr->type = NTDEV_TYPE_CLIENT_DEV; dev_hdr->dispatch = gendrv_dispatch; - dev_hdr->start_io = gendrv_startio; + dev_hdr->start_io = (PDRIVER_STARTIO)gendrv_startio; return TRUE; } @@ -1557,7 +1544,6 @@ UCHAR dev_name[ 64 ]; STRING string; UNICODE_STRING symb_link; - NTSTATUS status; PGENDRV_DRVR_EXTENSION pdrvr_ext; if( dev_mgr == NULL || dev_obj == 0 ) @@ -1810,7 +1796,7 @@ PIO_STACK_LOCATION irp_stack; ULONG ctrl_code; PUSB_DEV_MANAGER dev_mgr; - USE_IRQL; + USE_NON_PENDING_IRQL; if( dev_obj == NULL || irp == NULL ) return; @@ -1847,17 +1833,14 @@ case IOCTL_SUBMIT_URB_NOIO: case IOCTL_SUBMIT_URB_WR: { - LONG buf_size; PURB purb; - KIRQL old_irql; - ULONG endp_idx, if_idx, user_buffer_length; - PUCHAR user_buffer; + ULONG endp_idx, if_idx, user_buffer_length = 0; + PUCHAR user_buffer = NULL; PUSB_DEV pdev; DEV_HANDLE endp_handle; PUSB_ENDPOINT pendp; NTSTATUS status; - PUSB_CTRL_SETUP_PACKET psetup; if( irp_stack->Parameters.DeviceIoControl.InputBufferLength < sizeof( URB ) ) { @@ -2004,8 +1987,7 @@ KIRQL cancelIrql; PIRP irp, cur_irp; PKDEVICE_QUEUE_ENTRY packet; - LIST_ENTRY cancel_irps, *pthis, *pnext; - PDEVEXT_HEADER dev_hdr; + LIST_ENTRY cancel_irps, *pthis; // // cancel all the irps in the queue @@ -2018,7 +2000,7 @@ // remove the irps from device queue IoAcquireCancelSpinLock( &cancelIrql ); cur_irp = dev_obj->CurrentIrp; - while( packet = KeRemoveDeviceQueue( &dev_obj->DeviceQueue ) ) + while(( packet = KeRemoveDeviceQueue( &dev_obj->DeviceQueue ) )) { irp = struct_ptr( packet, IRP, Tail.Overlay.DeviceQueueEntry ); InsertTailList( &cancel_irps, &irp->Tail.Overlay.DeviceQueueEntry.DeviceListEntry ); @@ -2050,7 +2032,6 @@ // cancel routine for irps queued in the device queue PUSB_DEV_MANAGER dev_mgr; PDEVEXT_HEADER pdev_ext_hdr; - ULONG i; pdev_ext_hdr = ( PDEVEXT_HEADER )dev_obj->DeviceExtension; dev_mgr = pdev_ext_hdr->dev_mgr; Modified: trunk/reactos/drivers/usb/nt4compat/usbdriver/usb.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/nt4compat/usbd…
============================================================================== --- trunk/reactos/drivers/usb/nt4compat/usbdriver/usb.c (original) +++ trunk/reactos/drivers/usb/nt4compat/usbdriver/usb.c Sat Aug 19 20:53:49 2006 @@ -1076,6 +1076,7 @@ return count; } +// checks if processor supports Time Stamp Counter __inline BOOL usb_query_clicks( PLARGE_INTEGER clicks @@ -1084,6 +1085,8 @@ BOOL ret_val; //so we have to use intel's cpu??? ret_val = FALSE; + +#ifdef _MSC_VER __asm { push ebx; @@ -1102,6 +1105,9 @@ pop eax; pop ebx; } +#else + ret_val = FALSE; +#endif return ret_val; } Modified: trunk/reactos/drivers/usb/nt4compat/usbdriver/usbdriver.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/nt4compat/usbd…
============================================================================== --- trunk/reactos/drivers/usb/nt4compat/usbdriver/usbdriver.rbuild (original) +++ trunk/reactos/drivers/usb/nt4compat/usbdriver/usbdriver.rbuild Sat Aug 19 20:53:49 2006 @@ -15,5 +15,5 @@ <file>compdrv.c</file> <file>etd.c</file> <file>gendrv.c</file> - <file>ehci.rc</file> + <file>usbdriver.rc</file> </module> Modified: trunk/reactos/drivers/usb/nt4compat/usbdriver/usbdriver.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/nt4compat/usbd…
============================================================================== --- trunk/reactos/drivers/usb/nt4compat/usbdriver/usbdriver.rc (original) +++ trunk/reactos/drivers/usb/nt4compat/usbdriver/usbdriver.rc Sat Aug 19 20:53:49 2006 @@ -25,12 +25,12 @@ BEGIN VALUE "Comments", "This is a beta version of usb driver stack( ehci ), contact me at mypublic99(a)yahoo.com\0" VALUE "CompanyName", "Woodhead Software\0" - VALUE "FileDescription", "ehci.sys\0" + VALUE "FileDescription", "usbdriver.sys\0" VALUE "FileVersion", "0, 0, 1, 0\0" - VALUE "InternalName", "ehci.sys\0" + VALUE "InternalName", "usbdriver.sys\0" VALUE "LegalCopyright", "Copyright © 2002-2004 Woodhead Software\0" VALUE "LegalTrademarks", "\0" - VALUE "OriginalFilename", "ehci.sys\0" + VALUE "OriginalFilename", "usbdriver.sys\0" VALUE "PrivateBuild", "0.01\0" VALUE "ProductName", "usb driver stack for windows NT\0" VALUE "ProductVersion", "0, 0, 1, 0\0"
18 years, 4 months
1
0
0
0
[janderwald] 23609: * implement console resources * based on a patch by Lohnegrim
by janderwald@svn.reactos.org
Author: janderwald Date: Sat Aug 19 14:35:00 2006 New Revision: 23609 URL:
http://svn.reactos.org/svn/reactos?rev=23609&view=rev
Log: * implement console resources * based on a patch by Lohnegrim Modified: trunk/reactos/dll/win32/console/en.rc trunk/reactos/dll/win32/console/resource.h Modified: trunk/reactos/dll/win32/console/en.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/console/en.rc?re…
============================================================================== --- trunk/reactos/dll/win32/console/en.rc (original) +++ trunk/reactos/dll/win32/console/en.rc Sat Aug 19 14:35:00 2006 @@ -36,28 +36,96 @@ CHECKBOX "&Insert Mode", IDC_CHECK_INSERT_MODE, 150, 120, 60, 15, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_PROPPAGEFONT DIALOGEX 0, 0, 220, 220 +IDD_PROPPAGEFONT DIALOGEX 0, 0, 250, 220 STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_CAPTION CAPTION "Font" FONT 8, "MS Shell Dlg" BEGIN -LTEXT "This space is intentionally left blank", -1, 55, 103, 120, 10 +LTEXT "Window Preview", -1, 10, 7, 65, 10 +LTEXT "Size", -1, 130, 10, 30, 10 +CONTROL "", IDC_STATIC_FONT_WINDOW_PREVIEW, "Static", SS_BLACKRECT | SS_SUNKEN, 10, 20, 115, 70 +LISTBOX IDC_LBOX_FONTS, 130, 20, 55, 80, LBS_DISABLENOSCROLL | WS_VSCROLL +LTEXT "&Font", -1, 10, 105, 35, 10 +CHECKBOX "&Bold fonts", IDC_CHECK_BOLD_FONTS, 45, 105, 60, 10 +LISTBOX IDC_LBOX_TYPE, 10, 120, 110, 50, LBS_DISABLENOSCROLL | WS_VSCROLL +GROUPBOX "", IDC_GROUPBOX_FONT_NAME, 10, 155, 200, 50 +CONTROL "", IDC_STATIC_SELECT_FONT_PREVIEW, "Static", SS_BLACKRECT | SS_SUNKEN, 15, 165, 95, 35 +LTEXT "Each character is:", -1, 130, 165, 75, 10 +LTEXT "screen pixel wide\nscreen pixel high", -1, 140, 180, 65, 20 +LTEXT "", IDC_FONT_SIZE_X, 125, 180, 10, 10 +LTEXT "", IDC_FONT_SIZE_Y, 125, 190, 10, 10 END -IDD_PROPPAGELAYOUT DIALOGEX 0, 0, 220, 220 +IDD_PROPPAGELAYOUT DIALOGEX 0, 0, 250, 220 STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_CAPTION CAPTION "Layout" FONT 8, "MS Shell Dlg" BEGIN -LTEXT "This space is intentionally left blank", -1, 55, 103, 120, 10 +LTEXT "Window Preview", -1, 10, 10, 65, 10 +CONTROL "", IDC_STATIC_LAYOUT_WINDOW_PREVIEW, "Static", SS_BLACKRECT | SS_SUNKEN, 10, 20, 100, 70 +GROUPBOX "Screen Buffer Size", -1, 115, 15, 115, 40 +LTEXT "&Width:", -1, 120, 30, 25, 10 +LTEXT "&Height:", -1, 120, 40, 25, 10 +EDITTEXT IDC_EDIT_SCREEN_BUFFER_WIDTH, 165, 30, 30, 10, ES_RIGHT | WS_GROUP +CONTROL "", IDC_UPDOWN_SCREEN_BUFFER_WIDTH, UPDOWN_CLASS,UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_BORDER | WS_GROUP, 170, 30, 30, 10 +EDITTEXT IDC_EDIT_SCREEN_BUFFER_HEIGHT, 165, 40, 30, 10, ES_RIGHT | WS_GROUP +CONTROL "", IDC_UPDOWN_SCREEN_BUFFER_HEIGHT, UPDOWN_CLASS,UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_BORDER | WS_GROUP, 170, 30, 30, 10 +GROUPBOX "Window Size", -1, 115, 60, 115, 40 +LTEXT "&W&idth:", -1, 120, 70, 25, 10 +LTEXT "&H&eight:", -1, 120, 80, 25, 10 +EDITTEXT IDC_EDIT_WINDOW_SIZE_WIDTH, 165, 70, 30, 10, ES_RIGHT | WS_GROUP +CONTROL "", IDC_UPDOWN_WINDOW_SIZE_WIDTH, UPDOWN_CLASS,UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_BORDER | WS_GROUP, 170, 30, 30, 10 +EDITTEXT IDC_EDIT_WINDOW_SIZE_HEIGHT, 165, 80, 30, 10, ES_RIGHT | WS_GROUP +CONTROL "", IDC_UPDOWN_WINDOW_SIZE_HEIGHT, UPDOWN_CLASS,UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_BORDER | WS_GROUP, 170, 30, 30, 10 +GROUPBOX "Window Position", -1, 115, 105, 115, 55 +LTEXT "&Left:", -1, 120, 120, 25, 10 +LTEXT "&Top:", -1, 120, 130, 25, 10 +EDITTEXT IDC_EDIT_WINDOW_POS_LEFT, 165, 120, 30, 10, ES_RIGHT | WS_GROUP +CONTROL "", IDC_UPDOWN_WINDOW_POS_LEFT, UPDOWN_CLASS,UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_BORDER | WS_GROUP, 170, 30, 30, 10 +EDITTEXT IDC_EDIT_WINDOW_POS_TOP, 165, 130, 30, 10, ES_RIGHT | WS_GROUP +CONTROL "", IDC_UPDOWN_WINDOW_POS_TOP, UPDOWN_CLASS,UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_BORDER | WS_GROUP, 170, 30, 30, 10 +CHECKBOX "Let system &position window", IDC_CHECK_SYSTEM_POS_WINDOW, 120, 145, 100, 10 END -IDD_PROPPAGECOLORS DIALOGEX 0, 0, 220, 220 +IDD_PROPPAGECOLORS DIALOGEX 0, 0, 250, 220 STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_CAPTION CAPTION "Colors" FONT 8, "MS Shell Dlg" BEGIN -LTEXT "This space is intentionally left blank", -1, 55, 103, 120, 10 +CONTROL "Screen &Text", IDC_RADIO_SCREEN_TEXT, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 15, 15, 90, 10 +CONTROL "Screen &Background", IDC_RADIO_SCREEN_BACKGROUND, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 15, 25, 90, 10 +CONTROL "&Popup Text", IDC_RADIO_POPUP_TEXT, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 15, 35, 90, 10 +CONTROL "Pop&up Background", IDC_RADIO_POPUP_BACKGROUND, "Button", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 15, 45, 90, 10 +GROUPBOX "Selected Color Values", -1, 120, 15, 90, 45 +LTEXT "&Red:", -1, 125, 25, 30, 10 +EDITTEXT IDC_EDIT_COLOR_RED, 150, 25, 30, 10, ES_RIGHT | WS_GROUP +CONTROL "", IDC_UPDOWN_COLOR_RED, UPDOWN_CLASS, UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_BORDER | WS_GROUP, 165, 25, 30, 10 +LTEXT "&Green:", -1, 125, 35, 30, 10 +EDITTEXT IDC_EDIT_COLOR_BLUE, 150, 35, 30, 10, ES_RIGHT | WS_GROUP +CONTROL "", IDC_UPDOWN_COLOR_GREEN, UPDOWN_CLASS, UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_BORDER | WS_GROUP, 165, 35, 30, 10 +LTEXT "&Blue:", -1, 125, 45, 30, 10 +EDITTEXT IDC_EDIT_COLOR_BLUE, 150, 45, 30, 10, ES_RIGHT | WS_GROUP +CONTROL "", IDC_UPDOWN_COLOR_BLUE, UPDOWN_CLASS, UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | WS_BORDER | WS_GROUP, 165, 45, 30, 10 +CONTROL "", IDC_STATIC_COLOR1, "Static", SS_BLACKRECT | SS_NOTIFY | SS_SUNKEN, 15, 90, 10, 10 +CONTROL "", IDC_STATIC_COLOR2, "Static", SS_BLACKRECT | SS_NOTIFY | SS_SUNKEN, 27, 90, 10, 10 +CONTROL "", IDC_STATIC_COLOR3, "Static", SS_BLACKRECT | SS_NOTIFY | SS_SUNKEN, 39, 90, 10, 10 +CONTROL "", IDC_STATIC_COLOR4, "Static", SS_BLACKRECT | SS_NOTIFY | SS_SUNKEN, 51, 90, 10, 10 +CONTROL "", IDC_STATIC_COLOR5, "Static", SS_BLACKRECT | SS_NOTIFY | SS_SUNKEN, 63, 90, 10, 10 +CONTROL "", IDC_STATIC_COLOR6, "Static", SS_BLACKRECT | SS_NOTIFY | SS_SUNKEN, 75, 90, 10, 10 +CONTROL "", IDC_STATIC_COLOR7, "Static", SS_BLACKRECT | SS_NOTIFY | SS_SUNKEN, 87, 90, 10, 10 +CONTROL "", IDC_STATIC_COLOR8, "Static", SS_BLACKRECT | SS_NOTIFY | SS_SUNKEN, 99, 90, 10, 10 +CONTROL "", IDC_STATIC_COLOR9, "Static", SS_BLACKRECT | SS_NOTIFY | SS_SUNKEN, 111, 90, 10, 10 +CONTROL "", IDC_STATIC_COLOR10, "Static", SS_BLACKRECT | SS_NOTIFY | SS_SUNKEN, 123, 90, 10, 10 +CONTROL "", IDC_STATIC_COLOR11, "Static", SS_BLACKRECT | SS_NOTIFY | SS_SUNKEN, 135, 90, 10, 10 +CONTROL "", IDC_STATIC_COLOR12, "Static", SS_BLACKRECT | SS_NOTIFY | SS_SUNKEN, 147, 90, 10, 10 +CONTROL "", IDC_STATIC_COLOR13, "Static", SS_BLACKRECT | SS_NOTIFY | SS_SUNKEN, 159, 90, 10, 10 +CONTROL "", IDC_STATIC_COLOR14, "Static", SS_BLACKRECT | SS_NOTIFY | SS_SUNKEN, 171, 90, 10, 10 +CONTROL "", IDC_STATIC_COLOR15, "Static", SS_BLACKRECT | SS_NOTIFY | SS_SUNKEN, 183, 90, 10, 10 +CONTROL "", IDC_STATIC_COLOR16, "Static", SS_BLACKRECT | SS_NOTIFY | SS_SUNKEN, 195, 90, 10, 10 +GROUPBOX "Selected Screen Colors", -1, 10, 110, 200, 40 +CONTROL "", IDC_STATIC_SCREEN_COLOR, "Static", SS_BLACKRECT | SS_SUNKEN, 15, 120, 180, 20 +GROUPBOX "Selected Popup Colors", -1, 10, 155, 200, 40 +CONTROL "", IDC_STATIC_POPUP_COLOR, "Static", SS_BLACKRECT | SS_SUNKEN, 15, 165, 180, 20 END IDD_APPLYOPTIONS DIALOGEX 0, 0, 220, 100 Modified: trunk/reactos/dll/win32/console/resource.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/console/resource…
============================================================================== --- trunk/reactos/dll/win32/console/resource.h (original) +++ trunk/reactos/dll/win32/console/resource.h Sat Aug 19 14:35:00 2006 @@ -32,8 +32,60 @@ //font dialog #define IDC_CHECK_BOLD_FONTS 400 +#define IDC_STATIC_SELECT_FONT_PREVIEW 401 +#define IDC_FONT_SIZE_X 402 +#define IDC_FONT_SIZE_Y 403 +#define IDC_LBOX_FONTS 404 +#define IDC_STATIC_FONT_WINDOW_PREVIEW 405 +#define IDC_LBOX_TYPE 406 +#define IDC_GROUPBOX_FONT_NAME 407 +//layout dialog +#define IDC_UPDOWN_SCREEN_BUFFER_WIDTH 500 +#define IDC_EDIT_SCREEN_BUFFER_WIDTH 501 +#define IDC_EDIT_SCREEN_BUFFER_HEIGHT 502 +#define IDC_UPDOWN_SCREEN_BUFFER_HEIGHT 503 +#define IDC_EDIT_WINDOW_SIZE_WIDTH 504 +#define IDC_UPDOWN_WINDOW_SIZE_WIDTH 505 +#define IDC_EDIT_WINDOW_SIZE_HEIGHT 506 +#define IDC_UPDOWN_WINDOW_SIZE_HEIGHT 507 +#define IDC_EDIT_WINDOW_POS_LEFT 508 +#define IDC_UPDOWN_WINDOW_POS_LEFT 509 +#define IDC_EDIT_WINDOW_POS_TOP 510 +#define IDC_UPDOWN_WINDOW_POS_TOP 511 +#define IDC_CHECK_SYSTEM_POS_WINDOW 512 +#define IDC_STATIC_LAYOUT_WINDOW_PREVIEW 513 +//color dialog + +#define IDC_RADIO_SCREEN_TEXT 600 +#define IDC_RADIO_SCREEN_BACKGROUND 601 +#define IDC_RADIO_POPUP_TEXT 602 +#define IDC_RADIO_POPUP_BACKGROUND 603 +#define IDC_EDIT_COLOR_RED 604 +#define IDC_UPDOWN_COLOR_RED 605 +#define IDC_EDIT_COLOR_GREEN 606 +#define IDC_UPDOWN_COLOR_GREEN 607 +#define IDC_EDIT_COLOR_BLUE 608 +#define IDC_UPDOWN_COLOR_BLUE 609 +#define IDC_STATIC_SCREEN_COLOR 610 +#define IDC_STATIC_POPUP_COLOR 611 +#define IDC_STATIC_COLOR1 612 +#define IDC_STATIC_COLOR2 613 +#define IDC_STATIC_COLOR3 614 +#define IDC_STATIC_COLOR4 615 +#define IDC_STATIC_COLOR5 616 +#define IDC_STATIC_COLOR6 617 +#define IDC_STATIC_COLOR7 618 +#define IDC_STATIC_COLOR8 619 +#define IDC_STATIC_COLOR9 620 +#define IDC_STATIC_COLOR10 621 +#define IDC_STATIC_COLOR11 622 +#define IDC_STATIC_COLOR12 623 +#define IDC_STATIC_COLOR13 624 +#define IDC_STATIC_COLOR14 625 +#define IDC_STATIC_COLOR15 626 +#define IDC_STATIC_COLOR16 627 #endif
18 years, 4 months
1
0
0
0
[greatlrd] 23608: 1. make so bootcd can be build again. 2. Remove stuff that does not include in 0.3.0 branch
by greatlrd@svn.reactos.org
Author: greatlrd Date: Sat Aug 19 14:22:42 2006 New Revision: 23608 URL:
http://svn.reactos.org/svn/reactos?rev=23608&view=rev
Log: 1. make so bootcd can be build again. 2. Remove stuff that does not include in 0.3.0 branch Modified: branches/ros-branch-0_3_0/reactos/boot/bootdata/packages/reactos.dff Modified: branches/ros-branch-0_3_0/reactos/boot/bootdata/packages/reactos.dff URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_0/reactos/boot/b…
============================================================================== --- branches/ros-branch-0_3_0/reactos/boot/bootdata/packages/reactos.dff (original) +++ branches/ros-branch-0_3_0/reactos/boot/bootdata/packages/reactos.dff Sat Aug 19 14:22:42 2006 @@ -31,8 +31,6 @@ ; Base files base\applications\cacls\cacls.exe 1 base\applications\calc\calc.exe 1 -base\applications\cmdutils\find\find.exe 1 -base\applications\cmdutils\more\more.exe 1 base\applications\control\control.exe 1 base\applications\devmgr\devmgrapp.exe 1 base\applications\games\solitaire\sol.exe 1 @@ -59,10 +57,8 @@ ;base\applications\reporterror\reporterror.exe 1 base\applications\sc\sc.exe 1 base\applications\screenshot\screenshot.exe 1 -base\applications\screensavers\matrix\matrix.scr 1 base\applications\servman\servman.exe 1 base\applications\shutdown\shutdown.exe 1 -base\applications\sm\sm.exe 1 base\applications\sndvol32\sndvol32.exe 1 base\applications\taskmgr\taskmgr.exe 1 ;base\applications\utils\rosperf\rosperf.exe 1 @@ -110,7 +106,6 @@ dll\cpl\main\main.cpl 1 dll\cpl\mmsys\mmsys.cpl 1 dll\cpl\ncpa\ncpa.cpl 1 -dll\cpl\powercfg\powercfg.cpl 1 dll\cpl\sysdm\sysdm.cpl 1 dll\cpl\timedate\timedate.cpl 1 @@ -154,7 +149,6 @@ dll\win32\comdlg32\comdlg32.dll 1 dll\win32\crtdll\crtdll.dll 1 dll\win32\crypt32\crypt32.dll 1 -dll\win32\cryptdll\cryptdll.dll 1 dll\win32\dbghelp\dbghelp.dll 1 dll\win32\devmgr\devmgr.dll 1 dll\win32\dhcpcsvc\dhcpcsvc.dll 1 @@ -170,7 +164,6 @@ dll\win32\iphlpapi\iphlpapi.dll 1 dll\win32\kernel32\kernel32.dll 1 dll\win32\lsasrv\lsasrv.dll 1 -dll\win32\lz32\lz32.dll 1 dll\win32\mapi32\mapi32.dll 1 dll\win32\winmm\midimap\midimap.dll 1 dll\win32\mmdrv\mmdrv.dll 1 @@ -196,9 +189,7 @@ dll\win32\olepro32\olepro32.dll 1 dll\win32\opengl32\opengl32.dll 1 dll\win32\psapi\psapi.dll 1 -dll\win32\powrprof\powrprof.dll 1 dll\win32\riched20\riched20.dll 1 -dll\win32\riched32\riched32.dll 1 dll\win32\rpcrt4\rpcrt4.dll 1 dll\win32\samlib\samlib.dll 1 dll\win32\samsrv\samsrv.dll 1 @@ -211,7 +202,6 @@ dll\win32\shlwapi\shlwapi.dll 1 dll\win32\smdll\smdll.dll 1 dll\win32\syssetup\syssetup.dll 1 -dll\win32\twain_32\twain_32.dll 1 dll\win32\urlmon\urlmon.dll 1 dll\win32\user32\user32.dll 1 dll\win32\userenv\userenv.dll 1 @@ -271,26 +261,6 @@ drivers\video\videoprt\videoprt.sys 2 ; Media -media\fonts\DejaVuSans.ttf 3 -media\fonts\DejaVuSans-Bold.ttf 3 -media\fonts\DejaVuSans-BoldOblique.ttf 3 -media\fonts\DejaVuSansCondensed.ttf 3 -media\fonts\DejaVuSansCondensed-Bold.ttf 3 -media\fonts\DejaVuSansCondensed-Oblique.ttf 3 -media\fonts\DejaVuSans-ExtraLight.ttf 3 -media\fonts\DejaVuSansMono.ttf 3 -media\fonts\DejaVuSansMono-Bold.ttf 3 -media\fonts\DejaVuSansMono-BoldOblique.ttf 3 -media\fonts\DejaVuSansMono-Oblique.ttf 3 -media\fonts\DejaVuSans-Oblique.ttf 3 -media\fonts\DejaVuSerif.ttf 3 -media\fonts\DejaVuSerif-Bold.ttf 3 -media\fonts\DejaVuSerif-BoldOblique.ttf 3 -media\fonts\DejaVuSerifCondensed.ttf 3 -media\fonts\DejaVuSerifCondensed-Bold.ttf 3 -media\fonts\DejaVuSerifCondensed-BoldOblique.ttf 3 -media\fonts\DejaVuSerifCondensed-Oblique.ttf 3 -media\fonts\DejaVuSerif-Oblique.ttf 3 media\fonts\c0419bt_.ttf 3 media\fonts\c0582bt_.ttf 3 media\fonts\c0583bt_.ttf 3 @@ -387,7 +357,6 @@ media\inf\scsi.inf 6 media\inf\syssetup.inf 6 media\inf\usbport.inf 6 -media\inf\usb.inf 6 media\inf\usbstor.inf 6 media\inf\xboxdisp.inf 6 @@ -413,7 +382,9 @@ modules\vms\server\vmssrv.dll 1 optional modules\vms\dll\win32\vmsdll\vmsdll.dll 1 optional modules\rosapps\cmdutils\comp\comp.exe 1 optional +modules\rosapps\cmdutils\find\find.exe 1 optional modules\rosapps\cmdutils\mode\mode.exe 1 optional +modules\rosapps\cmdutils\more\more.exe 1 optional modules\rosapps\cmdutils\sort\sort.exe 1 optional modules\rosapps\cmdutils\tee\tee.exe 1 optional modules\rosapps\cmdutils\touch\touch.exe 1 optional
18 years, 4 months
1
0
0
0
← Newer
1
...
21
22
23
24
25
26
27
...
45
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
Results per page:
10
25
50
100
200