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
November 2007
----- 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
20 participants
888 discussions
Start a n
N
ew thread
[greatlrd] 30139: start building up ksguid.a/ksguid.lib it is need it for ks.h
by greatlrd@svn.reactos.org
Author: greatlrd Date: Mon Nov 5 02:24:42 2007 New Revision: 30139 URL:
http://svn.reactos.org/svn/reactos?rev=30139&view=rev
Log: start building up ksguid.a/ksguid.lib it is need it for ks.h Added: branches/reactx/reactos/lib/sdk/ksguid/ branches/reactx/reactos/lib/sdk/ksguid/ksguid.c (with props) branches/reactx/reactos/lib/sdk/ksguid/ksguid.rbuild (with props) Added: branches/reactx/reactos/lib/sdk/ksguid/ksguid.c URL:
http://svn.reactos.org/svn/reactos/branches/reactx/reactos/lib/sdk/ksguid/k…
============================================================================== --- branches/reactx/reactos/lib/sdk/ksguid/ksguid.c (added) +++ branches/reactx/reactos/lib/sdk/ksguid/ksguid.c Mon Nov 5 02:24:42 2007 @@ -1,0 +1,27 @@ +/* + + ksguid.c - DirectX GUIDs + + Written by Magnus Olsen + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +*/ + +#define INITGUID +#include <basetyps.h> +#include <guiddef.h> + + +DEFINE_GUID(KSPROPSETID_GM, 0xAF627536, 0xE719, 0x11D2, 0x8A, 0x1D, 0x00, 0x60, 0x97, 0xD2, 0xDF, 0x5D); +DEFINE_GUID(KSPROPSETID_Topology, 0x720D4AC0, 0x7533, 0x11D0, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00); +DEFINE_GUID(KSPROPSETID_MediaSeeking, 0xEE904F0C, 0xD09B, 0x11D0, 0xAB, 0xE9, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96); +DEFINE_GUID(KSMETHODSETID_StreamIo, 0x65D003CA, 0x1523, 0x11D2, 0xB2, 0x7A, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96); +DEFINE_GUID(KSPROPSETID_General, 0x1464EDA5, 0x6A8F, 0x11D1, 0x9A, 0xA7, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96); +DEFINE_GUID(KSPROPTYPESETID_General, 0x97E99BA0, 0xBDEA, 0x11CF, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00); +DEFINE_GUID(GUID_NULL, 0x00000000, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00); +DEFINE_GUID(BUSID_SoftwareDeviceEnumerator, 0x4747B320, 0x62CE, 0x11CF, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00); + + Propchange: branches/reactx/reactos/lib/sdk/ksguid/ksguid.c ------------------------------------------------------------------------------ svn:eol-style = native Added: branches/reactx/reactos/lib/sdk/ksguid/ksguid.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/reactx/reactos/lib/sdk/ksguid/k…
============================================================================== --- branches/reactx/reactos/lib/sdk/ksguid/ksguid.rbuild (added) +++ branches/reactx/reactos/lib/sdk/ksguid/ksguid.rbuild Mon Nov 5 02:24:42 2007 @@ -1,0 +1,7 @@ +<?xml version="1.0"?> +<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> +<module name="ksguid" type="staticlibrary"> + <define name="_DISABLE_TIDENTS" /> + <define name="__USE_W32API" /> + <file>ksguid.c</file> +</module> Propchange: branches/reactx/reactos/lib/sdk/ksguid/ksguid.rbuild ------------------------------------------------------------------------------ svn:eol-style = native
17 years, 1 month
1
0
0
0
[jimtabor] 30138: Fix gdi batch size.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Mon Nov 5 01:49:19 2007 New Revision: 30138 URL:
http://svn.reactos.org/svn/reactos?rev=30138&view=rev
Log: Fix gdi batch size. Modified: trunk/reactos/include/reactos/win32k/ntgdityp.h Modified: trunk/reactos/include/reactos/win32k/ntgdityp.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/win32k/ntg…
============================================================================== --- trunk/reactos/include/reactos/win32k/ntgdityp.h (original) +++ trunk/reactos/include/reactos/win32k/ntgdityp.h Mon Nov 5 01:49:19 2007 @@ -77,7 +77,7 @@ GdiGetDCOrg = 6, } GETDCPOINT, *PGETDCPOINT; -#define GDIBATCHBUFSIZE 0x136 +#define GDIBATCHBUFSIZE 0x136*4 #define GDI_BATCH_LIMIT 20 typedef enum _GDIBATCHCMD
17 years, 1 month
1
0
0
0
[pschweitzer] 30137: Add French translation for mstsc
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Mon Nov 5 01:46:05 2007 New Revision: 30137 URL:
http://svn.reactos.org/svn/reactos?rev=30137&view=rev
Log: Add French translation for mstsc Added: trunk/reactos/base/applications/mstsc/lang/fr-FR.rc (with props) Modified: trunk/reactos/base/applications/mstsc/rsrc.rc Added: trunk/reactos/base/applications/mstsc/lang/fr-FR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mstsc/la…
============================================================================== --- trunk/reactos/base/applications/mstsc/lang/fr-FR.rc (added) +++ trunk/reactos/base/applications/mstsc/lang/fr-FR.rc Mon Nov 5 01:46:05 2007 @@ -1,0 +1,53 @@ +LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL + +IDD_GENERAL DIALOGEX 0, 0, 242, 175 +STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Paramètres d'identification",IDC_STATIC,7,7,228,89 + GROUPBOX "Paramètres de connexion",IDC_STATIC,7,103,228,65 + ICON "", IDC_LOGONICON, 15,19,20,20 + LTEXT "Entrez l'adresse du serveur",IDC_STATIC,47,24,81,8 + LTEXT "Serveur:",IDC_STATIC,47,41,25,8 + LTEXT "Nom d'utilisateur:",IDC_STATIC,47,58,38,8 + COMBOBOX IDC_SERVERCOMBO,79,39,141,30,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP + PUSHBUTTON "Enregistrer",IDC_SAVE,67,139,50,14 + PUSHBUTTON "EnregistrerSous...",IDC_SAVEAS,123,139,50,14 + PUSHBUTTON "Ouvrir...",IDC_OPEN,177,139,50,14 + ICON "", IDC_CONNICON, 16,114,20,20 + LTEXT "Enregistrer les paramètres actuels de connexion ou ouvrir une configuration existante",IDC_STATIC,50,115,172,20 +END + +IDD_DISPLAY DIALOGEX 0, 0, 242, 175 +STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "Taille du bureau distant",IDC_STATIC,7,7,228,68 + GROUPBOX "Couleurs",IDC_STATIC,7,83,228,85 + ICON "", IDC_REMICON, 15,19,20,20 + ICON "", IDC_COLORSICON, 15,98,20,20 + LTEXT "Définissez la taille de l'écran de votre bureau distant. Déplacez la barre de défilement complètement à droite pour être en mode plein écran",IDC_STATIC,53,22,175,21 + CONTROL "",IDC_GEOSLIDER,"msctls_trackbar32",WS_TABSTOP,56,49,124,15 + COMBOBOX IDC_BPPCOMBO,56,102,128,30,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP + CONTROL "",IDC_COLORIMAGE,"Static",SS_OWNERDRAW | SS_SUNKEN, 56,121,127,13 + LTEXT "Note: Les paramètres de l'ordinateur distant pourraient remplacer ce paramètre.",IDC_STATIC,56,143,165,18 + LTEXT "Moins",IDC_STATIC,35,52,15,8 + LTEXT "Plus",IDC_STATIC,189,51,17,8 +END + +IDD_CONNECTDIALOG DIALOGEX 0, 0, 260, 277 +STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Connexion au bureau distant" +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + DEFPUSHBUTTON "Connecter",IDOK,147,256,50,14 + PUSHBUTTON "Annuler",IDCANCEL,203,256,50,14 + CONTROL "",IDC_TAB,"SysTabControl32",0x0,7,54,246,198 +END + + +STRINGTABLE +BEGIN + IDS_TAB_GENERAL "Général" + IDS_TAB_DISPLAY "Affichage" +END Propchange: trunk/reactos/base/applications/mstsc/lang/fr-FR.rc ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/base/applications/mstsc/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mstsc/rs…
============================================================================== --- trunk/reactos/base/applications/mstsc/rsrc.rc (original) +++ trunk/reactos/base/applications/mstsc/rsrc.rc Mon Nov 5 01:46:05 2007 @@ -15,4 +15,5 @@ #include "lang/de-DE.rc" #include "lang/en-US.rc" +#include "lang/fr-FR.rc" #include "lang/ru-RU.rc"
17 years, 1 month
1
0
0
0
[pschweitzer] 30136: - Updated translations according to changes in rev 30015 - Updated changelog
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Mon Nov 5 01:25:35 2007 New Revision: 30136 URL:
http://svn.reactos.org/svn/reactos?rev=30136&view=rev
Log: - Updated translations according to changes in rev 30015 - Updated changelog Modified: trunk/tools/RosBE-Windows/Root/ChangeLog.txt trunk/tools/RosBE-Windows/Tools/config/lang/de-DE.rc trunk/tools/RosBE-Windows/Tools/config/lang/en-US.rc trunk/tools/RosBE-Windows/Tools/config/lang/fr-FR.rc trunk/tools/RosBE-Windows/Tools/config/lang/ru-RU.rc Modified: trunk/tools/RosBE-Windows/Root/ChangeLog.txt URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE-Windows/Root/ChangeLog…
============================================================================== --- trunk/tools/RosBE-Windows/Root/ChangeLog.txt (original) +++ trunk/tools/RosBE-Windows/Root/ChangeLog.txt Mon Nov 5 01:25:35 2007 @@ -20,10 +20,13 @@ - Updated todo list. (Pierre Schweitzer) - Reorganized resources. (Pierre Schweitzer) - Added a basic font preview. (Pierre Schweitzer) - - Code cleanup. (Pierre Schweitzer, Ged Murphy) + - Code cleanup. (Pierre Schweitzer, Ged Murphy, Peter Ward) - Added checks to avoid buffers overflow. (Pierre Schweitzer) - Fixed a small regression with save button state introduced in rev 29850. (Pierre Schweitzer) - Moved UINT i to loop as it was done previously. (Pierre Schweitzer) + - Improved Save button status (Pierre Schweitzer) + - Previous settings are loaded (Pierre Schweitzer) + - Fixed various bugs (Pierre Schweitzer) - Fixed German RC File of Options.exe. (Daniel Reimer) - Modify options.exe to enable and disable stripping and ccache. This gives back the possibility to give more than one command to make. (Daniel Reimer) - Fixed Russian RC File of options.exe (towerr) Modified: trunk/tools/RosBE-Windows/Tools/config/lang/de-DE.rc URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE-Windows/Tools/config/l…
============================================================================== --- trunk/tools/RosBE-Windows/Tools/config/lang/de-DE.rc (original) +++ trunk/tools/RosBE-Windows/Tools/config/lang/de-DE.rc Mon Nov 5 01:25:35 2007 @@ -32,6 +32,6 @@ STRINGTABLE BEGIN MSG_NOGCCFOUND, "Kein GCC Compiler gefunden ! Bitte überprüfen sie ihren Pfad." - MSG_FILEFAILED, "options.cmd konnte nicht erstellt werden!" + MSG_FILEFAILED, "rosbe-options.cmd konnte nicht erstellt werden!" MSG_DIREFAILED, "Log directory konnte nicht erstellt werden!" END Modified: trunk/tools/RosBE-Windows/Tools/config/lang/en-US.rc URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE-Windows/Tools/config/l…
============================================================================== --- trunk/tools/RosBE-Windows/Tools/config/lang/en-US.rc (original) +++ trunk/tools/RosBE-Windows/Tools/config/lang/en-US.rc Mon Nov 5 01:25:35 2007 @@ -32,6 +32,6 @@ STRINGTABLE BEGIN MSG_NOGCCFOUND, "No GCC compiler found ! Please check your directory." - MSG_FILEFAILED, "Failed to create options.cmd!" + MSG_FILEFAILED, "Failed to create rosbe-options.cmd!" MSG_DIREFAILED, "Failed to create log directory!" END Modified: trunk/tools/RosBE-Windows/Tools/config/lang/fr-FR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE-Windows/Tools/config/l…
============================================================================== --- trunk/tools/RosBE-Windows/Tools/config/lang/fr-FR.rc (original) +++ trunk/tools/RosBE-Windows/Tools/config/lang/fr-FR.rc Mon Nov 5 01:25:35 2007 @@ -32,6 +32,6 @@ STRINGTABLE BEGIN MSG_NOGCCFOUND, "Impossible de trouver le compilateur GCC ! Veuillez vérifier votre répertoire." - MSG_FILEFAILED, "Impossible de créer options.cmd!" + MSG_FILEFAILED, "Impossible de créer rosbe-options.cmd!" MSG_DIREFAILED, "Impossible de créer le répertoire pour le journal!" END Modified: trunk/tools/RosBE-Windows/Tools/config/lang/ru-RU.rc URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE-Windows/Tools/config/l…
============================================================================== --- trunk/tools/RosBE-Windows/Tools/config/lang/ru-RU.rc (original) +++ trunk/tools/RosBE-Windows/Tools/config/lang/ru-RU.rc Mon Nov 5 01:25:35 2007 @@ -34,6 +34,6 @@ STRINGTABLE BEGIN MSG_NOGCCFOUND, "Êîìïèëÿòîð GCC íåíàéäåí! Ïðîâåðüòå ïðàâèëüíîñòü óñòàíîâêè." - MSG_FILEFAILED, "Íåâîçìîæíî ñîçäàòü ôàéë options.cmd" + MSG_FILEFAILED, "Íåâîçìîæíî ñîçäàòü ôàéë rosbe-options.cmd" MSG_DIREFAILED, "Íåâîçìîæíî ñîçäàòü ïàïêó äëÿ ëîãîâ!" END
17 years, 1 month
1
0
0
0
[ekohl] 30135: Get rid of static variables.
by ekohl@svn.reactos.org
Author: ekohl Date: Mon Nov 5 01:12:25 2007 New Revision: 30135 URL:
http://svn.reactos.org/svn/reactos?rev=30135&view=rev
Log: Get rid of static variables. Modified: trunk/reactos/dll/cpl/sysdm/general.c trunk/reactos/dll/cpl/sysdm/licence.c trunk/reactos/dll/cpl/sysdm/startrec.c trunk/reactos/dll/cpl/sysdm/virtmem.c Modified: trunk/reactos/dll/cpl/sysdm/general.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/sysdm/general.c?re…
============================================================================== --- trunk/reactos/dll/cpl/sysdm/general.c (original) +++ trunk/reactos/dll/cpl/sysdm/general.c Mon Nov 5 01:12:25 2007 @@ -275,8 +275,8 @@ TCHAR Buf[32]; INT CurMachineLine = IDC_MACHINELINE1; - - /* Get Processor information * + /* + * Get Processor information * although undocumented, this information is being pulled * directly out of the registry instead of via setupapi as it * contains all the info we need, and should remain static @@ -372,16 +372,31 @@ WPARAM wParam, LPARAM lParam) { - static IMGINFO ImgInfo; + PIMGINFO pImgInfo; UNREFERENCED_PARAMETER(lParam); UNREFERENCED_PARAMETER(wParam); + pImgInfo = (PIMGINFO)GetWindowLongPtr(hwndDlg, DWLP_USER); + switch (uMsg) { case WM_INITDIALOG: - InitImageInfo(&ImgInfo); + pImgInfo = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IMGINFO)); + if (pImgInfo == NULL) + { + EndDialog(hwndDlg, 0); + return FALSE; + } + + SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)pImgInfo); + + InitImageInfo(pImgInfo); GetSystemInformation(hwndDlg); + break; + + case WM_DESTROY: + HeapFree(GetProcessHeap(), 0, pImgInfo); break; case WM_COMMAND: @@ -406,12 +421,12 @@ LONG left; /* position image in centre of dialog */ - left = (lpDrawItem->rcItem.right - ImgInfo.cxSource) / 2; + left = (lpDrawItem->rcItem.right - pImgInfo->cxSource) / 2; hdcMem = CreateCompatibleDC(lpDrawItem->hDC); if (hdcMem != NULL) { - SelectObject(hdcMem, ImgInfo.hBitmap); + SelectObject(hdcMem, pImgInfo->hBitmap); BitBlt(lpDrawItem->hDC, left, lpDrawItem->rcItem.top, Modified: trunk/reactos/dll/cpl/sysdm/licence.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/sysdm/licence.c?re…
============================================================================== --- trunk/reactos/dll/cpl/sysdm/licence.c (original) +++ trunk/reactos/dll/cpl/sysdm/licence.c Mon Nov 5 01:12:25 2007 @@ -9,6 +9,55 @@ #include "precomp.h" +typedef struct _LICINFO +{ + HICON hIcon; +} LICINFO, *PLICINFO; + + +static BOOL +OnInitDialog(HWND hDlg, PLICINFO pLicInfo) +{ + HRSRC hResInfo; + HGLOBAL hResMem; + WCHAR *LicenseText; + + pLicInfo->hIcon = LoadImage(hApplet, + MAKEINTRESOURCE(IDI_CPLSYSTEM), + IMAGE_ICON, + 16, + 16, + 0); + + SendMessage(hDlg, + WM_SETICON, + ICON_SMALL, + (LPARAM)pLicInfo->hIcon); + + /* load license from resource */ + if (!(hResInfo = FindResource(hApplet, + MAKEINTRESOURCE(RC_LICENSE), + MAKEINTRESOURCE(RTDATA))) || + !(hResMem = LoadResource(hApplet, hResInfo)) || + !(LicenseText = LockResource(hResMem))) + { + ShowLastWin32Error(hDlg); + return FALSE; + } + + /* insert the license into the edit control (unicode!) */ + SetDlgItemText(hDlg, + IDC_LICENCEEDIT, + LicenseText); + + PostMessage(GetDlgItem(hDlg, IDC_LICENCEEDIT), + EM_SETSEL, + -1, + 0); + + return TRUE; +} + INT_PTR CALLBACK LicenceDlgProc(HWND hDlg, @@ -16,55 +65,35 @@ WPARAM wParam, LPARAM lParam) { - HRSRC hResInfo; - HGLOBAL hResMem; - WCHAR *LicenseText; - static HICON hIcon; + PLICINFO pLicInfo; UNREFERENCED_PARAMETER(lParam); + + pLicInfo = (PLICINFO)GetWindowLongPtr(hDlg, DWLP_USER); switch (uMsg) { case WM_INITDIALOG: - hIcon = LoadImage(hApplet, - MAKEINTRESOURCE(IDI_CPLSYSTEM), - IMAGE_ICON, - 16, - 16, - 0); + pLicInfo = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(LICINFO)); + if (pLicInfo == NULL) + { + EndDialog(hDlg, 0); + return FALSE; + } + SetWindowLongPtr(hDlg, DWLP_USER, (LONG_PTR)pLicInfo); + return OnInitDialog(hDlg, pLicInfo); - SendMessage(hDlg, - WM_SETICON, - ICON_SMALL, - (LPARAM)hIcon); - - /* load license from resource */ - if(!(hResInfo = FindResource(hApplet, - MAKEINTRESOURCE(RC_LICENSE), - MAKEINTRESOURCE(RTDATA))) || - !(hResMem = LoadResource(hApplet, hResInfo)) || - !(LicenseText = LockResource(hResMem))) + case WM_DESTROY: + if (pLicInfo) { - ShowLastWin32Error(hDlg); - break; + DestroyIcon(pLicInfo->hIcon); + HeapFree(GetProcessHeap(), 0, pLicInfo); } - - /* insert the license into the edit control (unicode!) */ - SetDlgItemText(hDlg, - IDC_LICENCEEDIT, - LicenseText); - - PostMessage(GetDlgItem(hDlg, IDC_LICENCEEDIT), - EM_SETSEL, - -1, - 0); - - return TRUE; + break; case WM_COMMAND: if ((LOWORD(wParam) == IDOK) || (LOWORD(wParam) == IDCANCEL)) { - DestroyIcon(hIcon); EndDialog(hDlg, LOWORD(wParam)); return TRUE; Modified: trunk/reactos/dll/cpl/sysdm/startrec.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/sysdm/startrec.c?r…
============================================================================== --- trunk/reactos/dll/cpl/sysdm/startrec.c (original) +++ trunk/reactos/dll/cpl/sysdm/startrec.c Mon Nov 5 01:12:25 2007 @@ -9,11 +9,16 @@ */ #include "precomp.h" -static TCHAR m_szFreeldrIni[MAX_PATH + 15]; -static int m_FreeLdrIni = 0; -static TCHAR m_szDumpFile[MAX_PATH]; -static TCHAR m_szMinidumpDir[MAX_PATH]; -static DWORD m_dwCrashDumpEnabled = 0; + +typedef struct _STARTINFO +{ + TCHAR szFreeldrIni[MAX_PATH + 15]; + TCHAR szDumpFile[MAX_PATH]; + TCHAR szMinidumpDir[MAX_PATH]; + DWORD dwCrashDumpEnabled; + INT iFreeLdrIni; +} STARTINFO, *PSTARTINFO; + static VOID SetTimeout(HWND hwndDlg, INT Timeout) @@ -422,7 +427,7 @@ } static LRESULT -LoadOSList(HWND hwndDlg) +LoadOSList(HWND hwndDlg, PSTARTINFO pStartInfo) { DWORD dwBufSize; TCHAR *szSystemDrive; @@ -432,13 +437,13 @@ if (!dwBufSize) return FALSE; - _tcscpy(m_szFreeldrIni, szSystemDrive); - _tcscat(m_szFreeldrIni, _T("\\freeldr.ini")); - - if (PathFileExists(m_szFreeldrIni)) + _tcscpy(pStartInfo->szFreeldrIni, szSystemDrive); + _tcscat(pStartInfo->szFreeldrIni, _T("\\freeldr.ini")); + + if (PathFileExists(pStartInfo->szFreeldrIni)) { /* freeldr.ini exists */ - hInf = SetupOpenInfFile(m_szFreeldrIni, + hInf = SetupOpenInfFile(pStartInfo->szFreeldrIni, NULL, INF_STYLE_OLDNT, NULL); @@ -447,20 +452,20 @@ { LoadFreeldrSettings(hInf, hwndDlg); SetupCloseInfFile(hInf); - m_FreeLdrIni = 1; + pStartInfo->iFreeLdrIni = 1; return TRUE; } return FALSE; } /* try load boot.ini settings */ - _tcscpy(m_szFreeldrIni, szSystemDrive); - _tcscat(m_szFreeldrIni, _T("\\boot.ini")); - - if (PathFileExists(m_szFreeldrIni)) + _tcscpy(pStartInfo->szFreeldrIni, szSystemDrive); + _tcscat(pStartInfo->szFreeldrIni, _T("\\boot.ini")); + + if (PathFileExists(pStartInfo->szFreeldrIni)) { /* load boot.ini settings */ - hInf = SetupOpenInfFile(m_szFreeldrIni, + hInf = SetupOpenInfFile(pStartInfo->szFreeldrIni, NULL, INF_STYLE_OLDNT, NULL); @@ -469,7 +474,7 @@ { LoadBootSettings(hInf, hwndDlg); SetupCloseInfFile(hInf); - m_FreeLdrIni = 2; + pStartInfo->iFreeLdrIni = 2; return TRUE; } @@ -480,36 +485,37 @@ } static VOID -SetCrashDlgItems(HWND hwnd) -{ - if (m_dwCrashDumpEnabled == 0) +SetCrashDlgItems(HWND hwnd, PSTARTINFO pStartInfo) +{ + if (pStartInfo->dwCrashDumpEnabled == 0) { /* no crash information required */ EnableWindow(GetDlgItem(hwnd, IDC_STRRECDUMPFILE), FALSE); EnableWindow(GetDlgItem(hwnd, IDC_STRRECOVERWRITE), FALSE); } - else if (m_dwCrashDumpEnabled == 3) + else if (pStartInfo->dwCrashDumpEnabled == 3) { /* minidump type */ EnableWindow(GetDlgItem(hwnd, IDC_STRRECDUMPFILE), TRUE); EnableWindow(GetDlgItem(hwnd, IDC_STRRECOVERWRITE), FALSE); - SendMessage(GetDlgItem(hwnd, IDC_STRRECDUMPFILE), WM_SETTEXT, (WPARAM)0, (LPARAM)m_szMinidumpDir); - } - else if (m_dwCrashDumpEnabled == 1 || m_dwCrashDumpEnabled == 2) + SendMessage(GetDlgItem(hwnd, IDC_STRRECDUMPFILE), WM_SETTEXT, (WPARAM)0, (LPARAM)pStartInfo->szMinidumpDir); + } + else if (pStartInfo->dwCrashDumpEnabled == 1 || pStartInfo->dwCrashDumpEnabled == 2) { /* kernel or complete dump */ EnableWindow(GetDlgItem(hwnd, IDC_STRRECDUMPFILE), TRUE); EnableWindow(GetDlgItem(hwnd, IDC_STRRECOVERWRITE), TRUE); - SendMessage(GetDlgItem(hwnd, IDC_STRRECDUMPFILE), WM_SETTEXT, (WPARAM)0, (LPARAM)m_szDumpFile); - } - SendDlgItemMessage(hwnd, IDC_STRRECDEBUGCOMBO, CB_SETCURSEL, (WPARAM)m_dwCrashDumpEnabled, (LPARAM)0); + SendMessage(GetDlgItem(hwnd, IDC_STRRECDUMPFILE), WM_SETTEXT, (WPARAM)0, (LPARAM)pStartInfo->szDumpFile); + } + SendDlgItemMessage(hwnd, IDC_STRRECDEBUGCOMBO, CB_SETCURSEL, (WPARAM)pStartInfo->dwCrashDumpEnabled, (LPARAM)0); } static VOID -WriteStartupRecoveryOptions(HWND hwndDlg) +WriteStartupRecoveryOptions(HWND hwndDlg, PSTARTINFO pStartInfo) { HKEY hKey; DWORD lResult; + if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, _T("System\\CurrentControlSet\\Control\\CrashControl"), 0, @@ -533,23 +539,23 @@ RegSetValueEx(hKey, _T("Overwrite"), 0, REG_DWORD, (LPBYTE)&lResult, sizeof(lResult)); - if (m_dwCrashDumpEnabled == 1 || m_dwCrashDumpEnabled == 2) - { - SendDlgItemMessage(hwndDlg, IDC_STRRECDUMPFILE, WM_GETTEXT, (WPARAM)sizeof(m_szDumpFile) / sizeof(TCHAR), (LPARAM)m_szDumpFile); - RegSetValueEx(hKey, _T("DumpFile"), 0, REG_EXPAND_SZ, (LPBYTE)&m_szDumpFile, (_tcslen(m_szDumpFile) + 1) * sizeof(TCHAR)); - } - else if (m_dwCrashDumpEnabled == 3) - { - SendDlgItemMessage(hwndDlg, IDC_STRRECDUMPFILE, WM_GETTEXT, (WPARAM)sizeof(m_szDumpFile) / sizeof(TCHAR), (LPARAM)m_szDumpFile); - RegSetValueEx(hKey, _T("MinidumpDir"), 0, REG_EXPAND_SZ, (LPBYTE)&m_szDumpFile, (_tcslen(m_szDumpFile) + 1) * sizeof(TCHAR)); - } - - RegSetValueEx(hKey, _T("CrashDumpEnabled"), 0, REG_DWORD, (LPBYTE)&m_dwCrashDumpEnabled, sizeof(m_dwCrashDumpEnabled)); + if (pStartInfo->dwCrashDumpEnabled == 1 || pStartInfo->dwCrashDumpEnabled == 2) + { + SendDlgItemMessage(hwndDlg, IDC_STRRECDUMPFILE, WM_GETTEXT, (WPARAM)sizeof(pStartInfo->szDumpFile) / sizeof(TCHAR), (LPARAM)pStartInfo->szDumpFile); + RegSetValueEx(hKey, _T("DumpFile"), 0, REG_EXPAND_SZ, (LPBYTE)pStartInfo->szDumpFile, (_tcslen(pStartInfo->szDumpFile) + 1) * sizeof(TCHAR)); + } + else if (pStartInfo->dwCrashDumpEnabled == 3) + { + SendDlgItemMessage(hwndDlg, IDC_STRRECDUMPFILE, WM_GETTEXT, (WPARAM)sizeof(pStartInfo->szDumpFile) / sizeof(TCHAR), (LPARAM)pStartInfo->szDumpFile); + RegSetValueEx(hKey, _T("MinidumpDir"), 0, REG_EXPAND_SZ, (LPBYTE)pStartInfo->szDumpFile, (_tcslen(pStartInfo->szDumpFile) + 1) * sizeof(TCHAR)); + } + + RegSetValueEx(hKey, _T("CrashDumpEnabled"), 0, REG_DWORD, (LPBYTE)pStartInfo->dwCrashDumpEnabled, sizeof(pStartInfo->dwCrashDumpEnabled)); RegCloseKey(hKey); } static VOID -LoadRecoveryOptions(HWND hwndDlg) +LoadRecoveryOptions(HWND hwndDlg, PSTARTINFO pStartInfo) { HKEY hKey; DWORD dwValues; @@ -626,15 +632,15 @@ } else if (!_tcscmp(szName, _T("DumpFile"))) { - _tcscpy(m_szDumpFile, szValue); + _tcscpy(pStartInfo->szDumpFile, szValue); } else if (!_tcscmp(szName, _T("MinidumpDir"))) { - _tcscpy(m_szMinidumpDir, szValue); + _tcscpy(pStartInfo->szMinidumpDir, szValue); } else if (!_tcscmp(szName, _T("CrashDumpEnabled"))) { - m_dwCrashDumpEnabled = dwValue; + pStartInfo->dwCrashDumpEnabled = dwValue; } } @@ -650,7 +656,7 @@ if (LoadString(hApplet, IDS_MINI_DUMP, szValue, sizeof(szValue) / sizeof(TCHAR)) < sizeof(szValue) / sizeof(TCHAR)) SendDlgItemMessage(hwndDlg, IDC_STRRECDEBUGCOMBO, CB_ADDSTRING, (WPARAM)0, (LPARAM) szValue); - SetCrashDlgItems(hwndDlg); + SetCrashDlgItems(hwndDlg, pStartInfo); RegCloseKey(hKey); } @@ -662,6 +668,7 @@ WPARAM wParam, LPARAM lParam) { + PSTARTINFO pStartInfo; PBOOTRECORD pRecord; int iTimeout; LRESULT lResult; @@ -669,17 +676,27 @@ UNREFERENCED_PARAMETER(lParam); + pStartInfo = (PSTARTINFO)GetWindowLongPtr(hwndDlg, DWLP_USER); + switch(uMsg) { case WM_INITDIALOG: - LoadRecoveryOptions(hwndDlg); - return LoadOSList(hwndDlg); + pStartInfo = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(STARTINFO)); + SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)pStartInfo); + + LoadRecoveryOptions(hwndDlg, pStartInfo); + return LoadOSList(hwndDlg, pStartInfo); + + case WM_DESTROY: + DeleteBootRecords(hwndDlg); + HeapFree(GetProcessHeap(), 0, pStartInfo); + break; case WM_COMMAND: switch(LOWORD(wParam)) { case IDC_STRRECEDIT: - ShellExecute(0, _T("open"), _T("notepad"), m_szFreeldrIni, NULL, SW_SHOWNORMAL); + ShellExecute(0, _T("open"), _T("notepad"), pStartInfo->szFreeldrIni, NULL, SW_SHOWNORMAL); // FIXME use CreateProcess and wait untill finished // DeleteBootRecords(hwndDlg); // LoadOSList(hwndDlg); @@ -705,44 +722,42 @@ if ((INT)pRecord != CB_ERR) { - if (m_FreeLdrIni == 1) // FreeLdrIni style + if (pStartInfo->iFreeLdrIni == 1) // FreeLdrIni style { /* set default timeout */ WritePrivateProfileString(_T("FREELOADER"), _T("TimeOut"), szTimeout, - m_szFreeldrIni); + pStartInfo->szFreeldrIni); /* set default os */ WritePrivateProfileString(_T("FREELOADER"), _T("DefaultOS"), pRecord->szSectionName, - m_szFreeldrIni); + pStartInfo->szFreeldrIni); } - else if (m_FreeLdrIni == 2) // BootIni style + else if (pStartInfo->iFreeLdrIni == 2) // BootIni style { /* set default timeout */ WritePrivateProfileString(_T("boot loader"), _T("timeout"), szTimeout, - m_szFreeldrIni); + pStartInfo->szFreeldrIni); /* set default os */ WritePrivateProfileString(_T("boot loader"), _T("default"), pRecord->szBootPath, - m_szFreeldrIni); + pStartInfo->szFreeldrIni); } } - WriteStartupRecoveryOptions(hwndDlg); - DeleteBootRecords(hwndDlg); + WriteStartupRecoveryOptions(hwndDlg, pStartInfo); EndDialog(hwndDlg, LOWORD(wParam)); return TRUE; case IDCANCEL: - DeleteBootRecords(hwndDlg); EndDialog(hwndDlg, LOWORD(wParam)); return TRUE; @@ -760,19 +775,19 @@ LRESULT lResult; lResult = SendDlgItemMessage(hwndDlg, IDC_STRRECDEBUGCOMBO, CB_GETCURSEL, (WPARAM)0, (LPARAM)0); - if (lResult != CB_ERR && lResult != m_dwCrashDumpEnabled) + if (lResult != CB_ERR && lResult != pStartInfo->dwCrashDumpEnabled) { - if (m_dwCrashDumpEnabled == 1 || m_dwCrashDumpEnabled == 2) + if (pStartInfo->dwCrashDumpEnabled == 1 || pStartInfo->dwCrashDumpEnabled == 2) { - SendDlgItemMessage(hwndDlg, IDC_STRRECDUMPFILE, WM_GETTEXT, (WPARAM)sizeof(m_szDumpFile) / sizeof(TCHAR), (LPARAM)m_szDumpFile); + SendDlgItemMessage(hwndDlg, IDC_STRRECDUMPFILE, WM_GETTEXT, (WPARAM)sizeof(pStartInfo->szDumpFile) / sizeof(TCHAR), (LPARAM)pStartInfo->szDumpFile); } - else if (m_dwCrashDumpEnabled == 3) + else if (pStartInfo->dwCrashDumpEnabled == 3) { - SendDlgItemMessage(hwndDlg, IDC_STRRECDUMPFILE, WM_GETTEXT, (WPARAM)sizeof(m_szMinidumpDir) / sizeof(TCHAR), (LPARAM)m_szMinidumpDir); + SendDlgItemMessage(hwndDlg, IDC_STRRECDUMPFILE, WM_GETTEXT, (WPARAM)sizeof(pStartInfo->szMinidumpDir) / sizeof(TCHAR), (LPARAM)pStartInfo->szMinidumpDir); } - m_dwCrashDumpEnabled = lResult; - SetCrashDlgItems(hwndDlg); + pStartInfo->dwCrashDumpEnabled = lResult; + SetCrashDlgItems(hwndDlg, pStartInfo); } } break; Modified: trunk/reactos/dll/cpl/sysdm/virtmem.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/sysdm/virtmem.c?re…
============================================================================== --- trunk/reactos/dll/cpl/sysdm/virtmem.c (original) +++ trunk/reactos/dll/cpl/sysdm/virtmem.c Mon Nov 5 01:12:25 2007 @@ -422,43 +422,12 @@ { WritePageFileSettings(pVirtMem); } - - if (pVirtMem->szPagingFiles) - HeapFree(GetProcessHeap(), - 0, - pVirtMem->szPagingFiles); - - HeapFree(GetProcessHeap(), - 0, - pVirtMem); -} - - -static VOID -OnCancel(PVIRTMEM pVirtMem) -{ - if (pVirtMem->szPagingFiles) - HeapFree(GetProcessHeap(), - 0, - pVirtMem->szPagingFiles); - - HeapFree(GetProcessHeap(), - 0, - pVirtMem); -} - - -static PVIRTMEM -OnInitDialog(HWND hwnd) -{ - PVIRTMEM pVirtMem = (PVIRTMEM)HeapAlloc(GetProcessHeap(), - HEAP_ZERO_MEMORY, - sizeof(VIRTMEM)); - if (pVirtMem == NULL) - { - EndDialog(hwnd, 0); - } - +} + + +static VOID +OnInitDialog(HWND hwnd, PVIRTMEM pVirtMem) +{ pVirtMem->hSelf = hwnd; pVirtMem->hListBox = GetDlgItem(hwnd, IDC_PAGEFILELIST); pVirtMem->bSave = FALSE; @@ -471,8 +440,6 @@ /* Parse our settings and set up dialog */ ParseMemSettings(pVirtMem); } - - return pVirtMem; } @@ -482,22 +449,38 @@ WPARAM wParam, LPARAM lParam) { - /* there can only be one instance of this dialog */ - static PVIRTMEM pVirtMem = NULL; + PVIRTMEM pVirtMem; UNREFERENCED_PARAMETER(lParam); + pVirtMem = (PVIRTMEM)GetWindowLongPtr(hwndDlg, DWLP_USER); + switch (uMsg) { case WM_INITDIALOG: - pVirtMem = OnInitDialog(hwndDlg); + pVirtMem = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(VIRTMEM)); + if (pVirtMem == NULL) + { + EndDialog(hwndDlg, 0); + return FALSE; + } + + SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)pVirtMem); + + OnInitDialog(hwndDlg, pVirtMem); + break; + + case WM_DESTROY: + if (pVirtMem->szPagingFiles) + HeapFree(GetProcessHeap(), 0, + pVirtMem->szPagingFiles); + HeapFree(GetProcessHeap(), 0, pVirtMem); break; case WM_COMMAND: switch (LOWORD(wParam)) { case IDCANCEL: - OnCancel(pVirtMem); EndDialog(hwndDlg, 0); return TRUE;
17 years, 1 month
1
0
0
0
[pschweitzer] 30134: - Silent A warning - Fixed THE last bug (bis)
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Mon Nov 5 01:11:44 2007 New Revision: 30134 URL:
http://svn.reactos.org/svn/reactos?rev=30134&view=rev
Log: - Silent A warning - Fixed THE last bug (bis) Modified: trunk/tools/RosBE-Windows/Tools/config/options.c Modified: trunk/tools/RosBE-Windows/Tools/config/options.c URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE-Windows/Tools/config/o…
============================================================================== --- trunk/tools/RosBE-Windows/Tools/config/options.c (original) +++ trunk/tools/RosBE-Windows/Tools/config/options.c Mon Nov 5 01:11:44 2007 @@ -28,7 +28,7 @@ WriteSettings(HWND hwnd) { INT foreground, background; - BOOL showtime, writelog, useccache, strip; + BOOL showtime, writelog, useccache, strip, objstate, outstate; WCHAR logdir[MAX_PATH], objdir[MAX_PATH], outdir[MAX_PATH], mingwpath[MAX_PATH], checkmgw[MAX_PATH], checklog[MAX_PATH], optionsfile[MAX_PATH]; WCHAR msgerror[256]; HANDLE hFile; @@ -38,6 +38,8 @@ writelog = (SendDlgItemMessage(hwnd, ID_SAVELOGS, BM_GETCHECK, 0, 0) == BST_CHECKED); useccache = (SendDlgItemMessage(hwnd, ID_USECCACHE, BM_GETCHECK, 0, 0) == BST_CHECKED); strip = (SendDlgItemMessageW(hwnd, ID_STRIP, BM_GETCHECK, 0, 0) == BST_CHECKED); + objstate = (SendDlgItemMessage(hwnd, ID_OTHEROBJ, BM_GETCHECK, 0, 0) == BST_CHECKED); + outstate = (SendDlgItemMessageW(hwnd, ID_OTHEROUT, BM_GETCHECK, 0, 0) == BST_CHECKED); foreground = SendDlgItemMessageW(hwnd, IDC_FONT, CB_GETCURSEL, 0, 0); background = SendDlgItemMessageW(hwnd, IDC_BACK, CB_GETCURSEL, 0, 0); GetDlgItemTextW(hwnd, ID_LOGDIR, logdir, MAX_PATH); @@ -92,8 +94,8 @@ fprintf(pFile, "set _ROSBE_WRITELOG=%d\n", writelog); if (wcslen(logdir) > 0) fprintf(pFile, "set _ROSBE_LOGDIR=%S\n", logdir); if (wcslen(mingwpath) > 0) fprintf(pFile, "set _ROSBE_MINGWPATH=%S\n", mingwpath); - if (wcslen(objdir) > 0) fprintf(pFile, "set _ROSBE_OBJPATH=%S\n", objdir); - if (wcslen(outdir) > 0) fprintf(pFile, "set _ROSBE_OUTPATH=%S\n", outdir); + if ((wcslen(objdir) > 0) && objstate) fprintf(pFile, "set _ROSBE_OBJPATH=%S\n", objdir); + if ((wcslen(outdir) > 0) && outstate) fprintf(pFile, "set _ROSBE_OUTPATH=%S\n", outdir); fclose(pFile); return TRUE; } @@ -127,7 +129,7 @@ { ptr = wcstok(NULL, L" "); LoadedSettings->background = strtoul((WCHAR*)&ptr[0], NULL, 16); - LoadedSettings->foreground = strtoul((WCHAR*)&ptr[1], NULL, 16); + LoadedSettings->foreground = wcstoul(&ptr[1], NULL, 16); } else if (wcscmp(ptr, L"set") == 0) {
17 years, 1 month
1
0
0
0
[jimtabor] 30133: - Removed NtGdiDeleteObject from w32ksvc.db and ntgdibad.h. - Moved the define export to gdiobj.h and made it a FASTCALL internal to win32k. - I did not rename it to IntXXXX. - Implemented a functional DeleteObject for gdi.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Mon Nov 5 01:10:59 2007 New Revision: 30133 URL:
http://svn.reactos.org/svn/reactos?rev=30133&view=rev
Log: - Removed NtGdiDeleteObject from w32ksvc.db and ntgdibad.h. - Moved the define export to gdiobj.h and made it a FASTCALL internal to win32k. - I did not rename it to IntXXXX. - Implemented a functional DeleteObject for gdi. Modified: trunk/reactos/dll/win32/gdi32/objects/dc.c trunk/reactos/include/reactos/win32k/ntgdibad.h trunk/reactos/subsystems/win32/win32k/include/gdiobj.h trunk/reactos/subsystems/win32/win32k/objects/dc.c trunk/reactos/subsystems/win32/win32k/objects/gdiobj.c trunk/reactos/subsystems/win32/win32k/w32ksvc.db Modified: trunk/reactos/dll/win32/gdi32/objects/dc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/objects/dc…
============================================================================== --- trunk/reactos/dll/win32/gdi32/objects/dc.c (original) +++ trunk/reactos/dll/win32/gdi32/objects/dc.c Mon Nov 5 01:10:59 2007 @@ -276,29 +276,58 @@ return Ret; } - -/* - +/* * @implemented */ BOOL STDCALL DeleteObject(HGDIOBJ hObject) { + UINT Type = 0; + /* From Wine: DeleteObject does not SetLastError() on a null object */ if(!hObject) return FALSE; if (0 != ((DWORD) hObject & GDI_HANDLE_STOCK_MASK)) - { - DPRINT1("Trying to delete system object 0x%x\n", hObject); - return TRUE; - } - - /* deleting a handle that doesn't belong to the caller should be rather rarely - so for the sake of speed just try to delete it without checking validity */ - return NtGdiDeleteObject(hObject); -} - + { // Relax! This is a normal return! + DPRINT("Trying to delete system object 0x%x\n", hObject); + return TRUE; + } + // If you dont own it?! Get OUT! + if(!GdiIsHandleValid(hObject)) return FALSE; + + Type = GDI_HANDLE_GET_TYPE(hObject); + + if ((Type == GDI_OBJECT_TYPE_METAFILE) || + (Type == GDI_OBJECT_TYPE_ENHMETAFILE)) + return FALSE; + + switch (Type) + { + case GDI_OBJECT_TYPE_DC: + return DeleteDC((HDC) hObject); + case GDI_OBJECT_TYPE_COLORSPACE: + return NtGdiDeleteColorSpace((HCOLORSPACE) hObject); +#if 0 + case GDI_OBJECT_TYPE_METADC: + return MFDRV_DeleteObject( hObject ); + case GDI_OBJECT_TYPE_EMF: + { + PLDC pLDC = GdiGetLDC(hObject); + if ( !pLDC ) return FALSE; + return EMFDRV_DeleteObject( hObject ); + } +#endif + case GDI_OBJECT_TYPE_REGION: + case GDI_OBJECT_TYPE_BRUSH: + case GDI_OBJECT_TYPE_EXTPEN: + case GDI_OBJECT_TYPE_PEN: + case GDI_OBJECT_TYPE_FONT: + case GDI_OBJECT_TYPE_BITMAP: + break; + } + return NtGdiDeleteObjectApp(hObject); +} INT STDCALL Modified: trunk/reactos/include/reactos/win32k/ntgdibad.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/win32k/ntg…
============================================================================== --- trunk/reactos/include/reactos/win32k/ntgdibad.h (original) +++ trunk/reactos/include/reactos/win32k/ntgdibad.h Mon Nov 5 01:10:59 2007 @@ -152,9 +152,6 @@ HENHMETAFILE emf ); -/* Should be done in user-mode. */ -BOOL STDCALL NtGdiDeleteObject(HGDIOBJ hObject); - /* Meta are user-mode. */ BOOL STDCALL Modified: trunk/reactos/subsystems/win32/win32k/include/gdiobj.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/include/gdiobj.h (original) +++ trunk/reactos/subsystems/win32/win32k/include/gdiobj.h Mon Nov 5 01:10:59 2007 @@ -93,4 +93,6 @@ #define GDIOBJFLAG_IGNOREPID (0x1) #define GDIOBJFLAG_IGNORELOCK (0x2) +BOOL FASTCALL NtGdiDeleteObject(HGDIOBJ hObject); + #endif Modified: trunk/reactos/subsystems/win32/win32k/objects/dc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/dc.c (original) +++ trunk/reactos/subsystems/win32/win32k/objects/dc.c Mon Nov 5 01:10:59 2007 @@ -1023,10 +1023,14 @@ } -BOOL STDCALL +BOOL +STDCALL NtGdiDeleteObjectApp(HANDLE DCHandle) { PDC DCToDelete; + + if (GDI_HANDLE_GET_TYPE(DCHandle) != GDI_OBJECT_TYPE_DC) + return NtGdiDeleteObject((HGDIOBJ) DCHandle); if (!GDIOBJ_OwnedByCurrentProcess(GdiHandleTable, DCHandle)) { Modified: trunk/reactos/subsystems/win32/win32k/objects/gdiobj.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/gdiobj.c (original) +++ trunk/reactos/subsystems/win32/win32k/objects/gdiobj.c Mon Nov 5 01:10:59 2007 @@ -663,7 +663,8 @@ * \param hObject object handle * \return if the function fails the returned value is FALSE. */ -BOOL STDCALL +BOOL +FASTCALL NtGdiDeleteObject(HGDIOBJ hObject) { DPRINT("NtGdiDeleteObject handle 0x%08x\n", hObject); Modified: trunk/reactos/subsystems/win32/win32k/w32ksvc.db URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/w3…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/w32ksvc.db (original) +++ trunk/reactos/subsystems/win32/win32k/w32ksvc.db Mon Nov 5 01:10:59 2007 @@ -738,7 +738,6 @@ NtGdiCreateEnhMetaFile 4 NtGdiCreateScalableFontResource 4 NtGdiDeleteEnhMetaFile 1 -NtGdiDeleteObject 1 NtGdiEnumEnhMetaFile 5 NtGdiEnumFonts 4 NtGdiEnumICMProfiles 3
17 years, 1 month
1
0
0
0
[pschweitzer] 30132: Fixed last bugs (I hope !)
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Mon Nov 5 01:00:09 2007 New Revision: 30132 URL:
http://svn.reactos.org/svn/reactos?rev=30132&view=rev
Log: Fixed last bugs (I hope !) Modified: trunk/tools/RosBE-Windows/Tools/config/options.c trunk/tools/RosBE-Windows/Tools/config/options.h Modified: trunk/tools/RosBE-Windows/Tools/config/options.c URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE-Windows/Tools/config/o…
============================================================================== --- trunk/tools/RosBE-Windows/Tools/config/options.c (original) +++ trunk/tools/RosBE-Windows/Tools/config/options.c Mon Nov 5 01:00:09 2007 @@ -152,19 +152,19 @@ } else if (wcscmp(ptr, L"_ROSBE_LOGDIR") == 0) { - wcscpy(LoadedSettings->logdir, ptr2); + wcsncpy(LoadedSettings->logdir, ptr2, wcslen(ptr2)-1); } else if (wcscmp(ptr, L"_ROSBE_MINGWPATH") == 0) { - wcscpy(LoadedSettings->mingwpath, ptr2); + wcsncpy(LoadedSettings->mingwpath, ptr2, wcslen(ptr2)-1); } else if (wcscmp(ptr, L"_ROSBE_OBJPATH") == 0) { - wcscpy(LoadedSettings->objdir, ptr2); + wcsncpy(LoadedSettings->objdir, ptr2, wcslen(ptr2)-1); } else if (wcscmp(ptr, L"_ROSBE_OUTPATH") == 0) { - wcscpy(LoadedSettings->outdir, ptr2); + wcsncpy(LoadedSettings->outdir, ptr2, wcslen(ptr2)-1); } } free(TTempLine); @@ -199,12 +199,16 @@ SetDlgItemText(hwnd, ID_OBJDIR, LoadedSettings->objdir); if (wcslen(LoadedSettings->objdir) > 0) { + LoadedSettings->objstate = 1; + SendDlgItemMessage(hwnd, ID_OTHEROBJ, BM_SETCHECK, BST_CHECKED, 0); EnableWindow(GetDlgItem(hwnd, ID_BROWSEOBJ), TRUE); EnableWindow(GetDlgItem(hwnd, ID_OBJDIR), TRUE); } SetDlgItemText(hwnd, ID_OUTDIR, LoadedSettings->outdir); if (wcslen(LoadedSettings->outdir) > 0) { + LoadedSettings->outstate = 1; + SendDlgItemMessage(hwnd, ID_OTHEROUT, BM_SETCHECK, BST_CHECKED, 0); EnableWindow(GetDlgItem(hwnd, ID_BROWSEOUT), TRUE); EnableWindow(GetDlgItem(hwnd, ID_OUTDIR), TRUE); } @@ -213,7 +217,7 @@ VOID SetSaveState(HWND hwnd, PSETTINGS DefaultSettings) { INT foreground, background; - BOOL showtime, writelog, useccache, strip; + BOOL showtime, writelog, useccache, strip, objstate, outstate; WCHAR logdir[MAX_PATH], objdir[MAX_PATH], outdir[MAX_PATH], mingwpath[MAX_PATH]; BOOL StateObj = TRUE, StateOut = TRUE, StateLog = TRUE, State = TRUE; @@ -221,6 +225,8 @@ writelog = (SendDlgItemMessage(hwnd, ID_SAVELOGS, BM_GETCHECK, 0, 0) == BST_CHECKED); useccache = (SendDlgItemMessage(hwnd, ID_USECCACHE, BM_GETCHECK, 0, 0) == BST_CHECKED); strip = (SendDlgItemMessageW(hwnd, ID_STRIP, BM_GETCHECK, 0, 0) == BST_CHECKED); + objstate = (SendDlgItemMessageW(hwnd, ID_OTHEROBJ, BM_GETCHECK, 0, 0) == BST_CHECKED); + outstate = (SendDlgItemMessageW(hwnd, ID_OTHEROUT, BM_GETCHECK, 0, 0) == BST_CHECKED); foreground = SendDlgItemMessageW(hwnd, IDC_FONT, CB_GETCURSEL, 0, 0); background = SendDlgItemMessageW(hwnd, IDC_BACK, CB_GETCURSEL, 0, 0); GetDlgItemTextW(hwnd, ID_LOGDIR, logdir, MAX_PATH); @@ -228,25 +234,26 @@ GetDlgItemTextW(hwnd, ID_OBJDIR, objdir, MAX_PATH); GetDlgItemTextW(hwnd, ID_OUTDIR, outdir, MAX_PATH); - if (SendDlgItemMessageW(hwnd, ID_OTHEROBJ, BM_GETCHECK, 0, 0) == BST_CHECKED) - { - if ((wcscmp(objdir, DefaultSettings->objdir) != 0) && wcslen(objdir) > 0) + if (objstate) + { + if ((wcscmp(objdir, DefaultSettings->objdir) != 0) && (wcslen(objdir) > 0)) StateObj = FALSE; } - if (SendDlgItemMessageW(hwnd, ID_OTHEROUT, BM_GETCHECK, 0, 0) == BST_CHECKED) - { - if ((wcscmp(outdir, DefaultSettings->outdir) != 0) && wcslen(outdir) > 0) + if (outstate) + { + if ((wcscmp(outdir, DefaultSettings->outdir) != 0) && (wcslen(outdir) > 0)) StateOut = FALSE; } if (writelog) { - if ((wcscmp(logdir, DefaultSettings->logdir) != 0) && wcslen(logdir) > 0) + if ((wcscmp(logdir, DefaultSettings->logdir) != 0) && (wcslen(logdir) > 0)) StateLog = FALSE; } State ^= ((foreground == DefaultSettings->foreground) && (background == DefaultSettings->background) && (showtime == DefaultSettings->showtime) && (writelog == DefaultSettings->writelog) && (useccache == DefaultSettings->useccache) && (strip == DefaultSettings->strip) && + (objstate == DefaultSettings->objstate) && (outstate == DefaultSettings->outstate) && (StateLog) && (wcscmp(mingwpath, DefaultSettings->mingwpath) == 0) && (StateObj) && (StateOut)); Modified: trunk/tools/RosBE-Windows/Tools/config/options.h URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE-Windows/Tools/config/o…
============================================================================== --- trunk/tools/RosBE-Windows/Tools/config/options.h (original) +++ trunk/tools/RosBE-Windows/Tools/config/options.h Mon Nov 5 01:00:09 2007 @@ -30,5 +30,7 @@ BOOL useccache; BOOL strip; BOOL writelog; + BOOL objstate; + BOOL outstate; } SETTINGS, *PSETTINGS;
17 years, 1 month
1
0
0
0
[greatlrd] 30131: add allot more struct, enum, define, to many to write in the log
by greatlrd@svn.reactos.org
Author: greatlrd Date: Mon Nov 5 00:43:33 2007 New Revision: 30131 URL:
http://svn.reactos.org/svn/reactos?rev=30131&view=rev
Log: add allot more struct, enum, define, to many to write in the log Modified: branches/reactx/reactos/include/dxsdk/ks.h Modified: branches/reactx/reactos/include/dxsdk/ks.h URL:
http://svn.reactos.org/svn/reactos/branches/reactx/reactos/include/dxsdk/ks…
============================================================================== --- branches/reactx/reactos/include/dxsdk/ks.h (original) +++ branches/reactx/reactos/include/dxsdk/ks.h Mon Nov 5 00:43:33 2007 @@ -383,6 +383,21 @@ #define KSSTREAM_HEADER_OPTIONSF_LOOPEDDATA 0x80000000 #define KSMEDIUM_TYPE_ANYINSTANCE 0 +#define KSMEDIUM_STANDARD_DEVIO KSMEDIUM_TYPE_ANYINSTANCE +#define KSFILTER_NODE ((ULONG)-1) +#define KSALL_NODES ((ULONG)-1) +#define KSINSTANCE_INDETERMINATE ((ULONG)-1) +#define KSDATAFORMAT_BIT_TEMPORAL_COMPRESSION 0 +#define KSDATAFORMAT_TEMPORAL_COMPRESSION (1 << KSDATAFORMAT_BIT_TEMPORAL_COMPRESSION) +#define KSDATAFORMAT_BIT_ATTRIBUTES 1 +#define KSDATAFORMAT_ATTRIBUTES (1 << KSDATAFORMAT_BIT_ATTRIBUTES) +#define KSDATARANGE_BIT_ATTRIBUTES 1 +#define KSDATARANGE_ATTRIBUTES (1 << KSDATARANGE_BIT_ATTRIBUTES) +#define KSDATARANGE_BIT_REQUIRED_ATTRIBUTES 2 +#define KSDATARANGE_REQUIRED_ATTRIBUTES (1 << KSDATARANGE_BIT_REQUIRED_ATTRIBUTES) +#define KSATTRIBUTE_REQUIRED 0x00000001 + + #if defined(_NTDDK_) @@ -433,7 +448,123 @@ #define STATIC_REFERENCE_BUS_INTERFACE STATIC_KSMEDIUMSETID_Standard #define REFERENCE_BUS_INTERFACE KSMEDIUMSETID_Standard -#endif + typedef enum + { + KsInvokeOnSuccess = 1, + KsInvokeOnError = 2, + KsInvokeOnCancel = 4 + } KSCOMPLETION_INVOCATION; + + typedef enum + { + KsListEntryTail, + KsListEntryHead + } KSLIST_ENTRY_LOCATION; + + typedef enum + { + KsAcquireOnly, + KsAcquireAndRemove, + KsAcquireOnlySingleItem, + KsAcquireAndRemoveOnlySingleItem + } KSIRP_REMOVAL_OPERATION; + + typedef enum + { + KsStackCopyToNewLocation, + KsStackReuseCurrentLocation, + KsStackUseNewLocation + } KSSTACK_USE; + + typedef enum + { + KSTARGET_STATE_DISABLED, + KSTARGET_STATE_ENABLED + } KSTARGET_STATE; + + typedef enum + { + KSPROPERTY_GM_GRAPHMANAGER, + KSPROPERTY_GM_TIMESTAMP_CLOCK, + KSPROPERTY_GM_RATEMATCH, + KSPROPERTY_GM_RENDER_CLOCK, + } KSPROPERTY_GM; + + #if !defined(__wtypes_h__) + enum VARENUM + { + VT_EMPTY = 0, + VT_NULL = 1, + VT_I2 = 2, + VT_I4 = 3, + VT_R4 = 4, + VT_R8 = 5, + VT_CY = 6, + VT_DATE = 7, + VT_BSTR = 8, + VT_DISPATCH = 9, + VT_ERROR = 10, + VT_BOOL = 11, + VT_VARIANT = 12, + VT_UNKNOWN = 13, + VT_DECIMAL = 14, + VT_I1 = 16, + VT_UI1 = 17, + VT_UI2 = 18, + VT_UI4 = 19, + VT_I8 = 20, + VT_UI8 = 21, + VT_INT = 22, + VT_UINT = 23, + VT_VOID = 24, + VT_HRESULT = 25, + VT_PTR = 26, + VT_SAFEARRAY = 27, + VT_CARRAY = 28, + VT_USERDEFINED = 29, + VT_LPSTR = 30, + VT_LPWSTR = 31, + VT_FILETIME = 64, + VT_BLOB = 65, + VT_STREAM = 66, + VT_STORAGE = 67, + VT_STREAMED_OBJECT = 68, + VT_STORED_OBJECT = 69, + VT_BLOB_OBJECT = 70, + VT_CF = 71, + VT_CLSID = 72, + VT_VECTOR = 0x1000, + VT_ARRAY = 0x2000, + VT_BYREF = 0x4000, + VT_RESERVED = 0x8000, + VT_ILLEGAL = 0xffff, + VT_ILLEGALMASKED = 0xfff, + VT_TYPEMASK = 0xfff + }; + #endif + + typedef struct _KSDEVICE KSDEVICE, *PKSDEVICE; + typedef PVOID KSDEVICE_HEADER, KSOBJECT_HEADER; + typedef struct _KSDEVICE_DESCRIPTOR KSDEVICE_DESCRIPTOR, *PKSDEVICE_DESCRIPTOR; + typedef struct _KSDEVICE_DISPATCH KSDEVICE_DISPATCH, *PKSDEVICE_DISPATCH; + typedef struct _KSFILTERFACTORY KSFILTERFACTORY, *PKSFILTERFACTORY; + typedef struct _KSFILTER_DESCRIPTOR KSFILTER_DESCRIPTOR, *PKSFILTER_DESCRIPTOR; + typedef struct _KSFILTER_DISPATCH KSFILTER_DISPATCH, *PKSFILTER_DISPATCH; + typedef struct _KSFILTER KSFILTER, *PKSFILTER; + typedef struct _KSPIN_DESCRIPTOR_EX KSPIN_DESCRIPTOR_EX, *PKSPIN_DESCRIPTOR_EX; + typedef struct _KSPIN_DISPATCH KSPIN_DISPATCH, *PKSPIN_DISPATCH; + typedef struct _KSCLOCK_DISPATCH KSCLOCK_DISPATCH, *PKSCLOCK_DISPATCH; + typedef struct _KSALLOCATOR_DISPATCH KSALLOCATOR_DISPATCH, *PKSALLOCATOR_DISPATCH; + typedef struct _KSPIN KSPIN, *PKSPIN; + typedef struct _KSNODE_DESCRIPTOR KSNODE_DESCRIPTOR, *PKSNODE_DESCRIPTOR; + typedef struct _KSSTREAM_POINTER_OFFSET KSSTREAM_POINTER_OFFSET, *PKSSTREAM_POINTER_OFFSET; + typedef struct _KSSTREAM_POINTER KSSTREAM_POINTER, *PKSSTREAM_POINTER; + typedef struct _KSMAPPING KSMAPPING, *PKSMAPPING; + typedef struct _KSPROCESSPIN KSPROCESSPIN, *PKSPROCESSPIN; + typedef struct _KSPROCESSPIN_INDEXENTRY KSPROCESSPIN_INDEXENTRY, *PKSPROCESSPIN_INDEXENTRY; +#endif // DDK + +typedef PVOID PKSWORKER; typedef enum { @@ -449,64 +580,732 @@ KSSTATE_RUN } KSSTATE, *PKSSTATE; -#if defined(_NTDDK_) && !defined(__wtypes_h__) -enum VARENUM -{ - VT_EMPTY = 0, - VT_NULL = 1, - VT_I2 = 2, - VT_I4 = 3, - VT_R4 = 4, - VT_R8 = 5, - VT_CY = 6, - VT_DATE = 7, - VT_BSTR = 8, - VT_DISPATCH = 9, - VT_ERROR = 10, - VT_BOOL = 11, - VT_VARIANT = 12, - VT_UNKNOWN = 13, - VT_DECIMAL = 14, - VT_I1 = 16, - VT_UI1 = 17, - VT_UI2 = 18, - VT_UI4 = 19, - VT_I8 = 20, - VT_UI8 = 21, - VT_INT = 22, - VT_UINT = 23, - VT_VOID = 24, - VT_HRESULT = 25, - VT_PTR = 26, - VT_SAFEARRAY = 27, - VT_CARRAY = 28, - VT_USERDEFINED = 29, - VT_LPSTR = 30, - VT_LPWSTR = 31, - VT_FILETIME = 64, - VT_BLOB = 65, - VT_STREAM = 66, - VT_STORAGE = 67, - VT_STREAMED_OBJECT = 68, - VT_STORED_OBJECT = 69, - VT_BLOB_OBJECT = 70, - VT_CF = 71, - VT_CLSID = 72, - VT_VECTOR = 0x1000, - VT_ARRAY = 0x2000, - VT_BYREF = 0x4000, - VT_RESERVED = 0x8000, - VT_ILLEGAL = 0xffff, - VT_ILLEGALMASKED = 0xfff, - VT_TYPEMASK = 0xfff -}; -#endif typedef enum { KSPROPERTY_GENERAL_COMPONENTID } KSPROPERTY_GENERAL; +typedef enum +{ + KSDEGRADE_STANDARD_SAMPLE, + KSDEGRADE_STANDARD_QUALITY, + KSDEGRADE_STANDARD_COMPUTATION, + KSDEGRADE_STANDARD_SKIP +} KSDEGRADE_STANDARD; + + +typedef struct +{ + ULONG PriorityClass; + ULONG PrioritySubClass; +} KSPRIORITY, *PKSPRIORITY; + + +typedef enum +{ + KSEVENT_CLOCK_INTERVAL_MARK, + KSEVENT_CLOCK_POSITION_MARK +} KSEVENT_CLOCK_POSITION; + + +typedef enum +{ + KSEVENT_CONNECTION_POSITIONUPDATE, + KSEVENT_CONNECTION_DATADISCONTINUITY, + KSEVENT_CONNECTION_TIMEDISCONTINUITY, + KSEVENT_CONNECTION_PRIORITY, + KSEVENT_CONNECTION_ENDOFSTREAM +} KSEVENT_CONNECTION; + +typedef enum +{ + KSMETHOD_STREAMIO_READ, + KSMETHOD_STREAMIO_WRITE +} KSMETHOD_STREAMIO; + +typedef enum +{ + KSPROPERTY_MEDIASEEKING_CAPABILITIES, + KSPROPERTY_MEDIASEEKING_FORMATS, + KSPROPERTY_MEDIASEEKING_TIMEFORMAT, + KSPROPERTY_MEDIASEEKING_POSITION, + KSPROPERTY_MEDIASEEKING_STOPPOSITION, + KSPROPERTY_MEDIASEEKING_POSITIONS, + KSPROPERTY_MEDIASEEKING_DURATION, + KSPROPERTY_MEDIASEEKING_AVAILABLE, + KSPROPERTY_MEDIASEEKING_PREROLL, + KSPROPERTY_MEDIASEEKING_CONVERTTIMEFORMAT +} KSPROPERTY_MEDIASEEKING; + +typedef enum +{ + KS_SEEKING_NoPositioning, + KS_SEEKING_AbsolutePositioning, + KS_SEEKING_RelativePositioning, + KS_SEEKING_IncrementalPositioning, + KS_SEEKING_PositioningBitsMask = 0x3, + KS_SEEKING_SeekToKeyFrame, + KS_SEEKING_ReturnTime = 0x8 +} KS_SEEKING_FLAGS; + +typedef enum +{ + KS_SEEKING_CanSeekAbsolute = 0x1, + KS_SEEKING_CanSeekForwards = 0x2, + KS_SEEKING_CanSeekBackwards = 0x4, + KS_SEEKING_CanGetCurrentPos = 0x8, + KS_SEEKING_CanGetStopPos = 0x10, + KS_SEEKING_CanGetDuration = 0x20, + KS_SEEKING_CanPlayBackwards = 0x40 +} KS_SEEKING_CAPABILITIES; + +typedef enum +{ + KSPROPERTY_TOPOLOGY_CATEGORIES, + KSPROPERTY_TOPOLOGY_NODES, + KSPROPERTY_TOPOLOGY_CONNECTIONS, + KSPROPERTY_TOPOLOGY_NAME +} KSPROPERTY_TOPOLOGY; + + +typedef enum +{ + KSINTERFACE_STANDARD_STREAMING, + KSINTERFACE_STANDARD_LOOPED_STREAMING, + KSINTERFACE_STANDARD_CONTROL +} KSINTERFACE_STANDARD; + + + +typedef enum +{ + KSINTERFACE_FILEIO_STREAMING +} KSINTERFACE_FILEIO; + +typedef enum +{ + KSPROPERTY_PIN_CINSTANCES, + KSPROPERTY_PIN_CTYPES, + KSPROPERTY_PIN_DATAFLOW, + KSPROPERTY_PIN_DATARANGES, + KSPROPERTY_PIN_DATAINTERSECTION, + KSPROPERTY_PIN_INTERFACES, + KSPROPERTY_PIN_MEDIUMS, + KSPROPERTY_PIN_COMMUNICATION, + KSPROPERTY_PIN_GLOBALCINSTANCES, + KSPROPERTY_PIN_NECESSARYINSTANCES, + KSPROPERTY_PIN_PHYSICALCONNECTION, + KSPROPERTY_PIN_CATEGORY, + KSPROPERTY_PIN_NAME, + KSPROPERTY_PIN_CONSTRAINEDDATARANGES, + KSPROPERTY_PIN_PROPOSEDATAFORMAT +} KSPROPERTY_PIN; + +typedef enum +{ + KSPIN_DATAFLOW_IN = 1, + KSPIN_DATAFLOW_OUT +} KSPIN_DATAFLOW, *PKSPIN_DATAFLOW; + +typedef enum +{ + KSPIN_COMMUNICATION_NONE, + KSPIN_COMMUNICATION_SINK, + KSPIN_COMMUNICATION_SOURCE, + KSPIN_COMMUNICATION_BOTH, + KSPIN_COMMUNICATION_BRIDGE +} KSPIN_COMMUNICATION, *PKSPIN_COMMUNICATION; + +typedef enum +{ + KSPROPERTY_QUALITY_REPORT, + KSPROPERTY_QUALITY_ERROR +} KSPROPERTY_QUALITY; + + +typedef enum +{ + KSPROPERTY_CONNECTION_STATE, + KSPROPERTY_CONNECTION_PRIORITY, + KSPROPERTY_CONNECTION_DATAFORMAT, + KSPROPERTY_CONNECTION_ALLOCATORFRAMING, + KSPROPERTY_CONNECTION_PROPOSEDATAFORMAT, + KSPROPERTY_CONNECTION_ACQUIREORDERING, + KSPROPERTY_CONNECTION_ALLOCATORFRAMING_EX, + KSPROPERTY_CONNECTION_STARTAT +} KSPROPERTY_CONNECTION; + +typedef enum +{ + KSEVENT_STREAMALLOCATOR_INTERNAL_FREEFRAME, + KSEVENT_STREAMALLOCATOR_FREEFRAME +} KSEVENT_STREAMALLOCATOR; + + +typedef enum +{ + KSMETHOD_STREAMALLOCATOR_ALLOC, + KSMETHOD_STREAMALLOCATOR_FREE +} KSMETHOD_STREAMALLOCATOR; + + + +typedef struct +{ + union + { + #if defined( _KS_NO_ANONYMOUS_STRUCTURES_ ) + struct _IDENTIFIER + { + #else + struct + { + #endif + GUID Set; + ULONG Id; + ULONG Flags; + }; + LONGLONG Alignment; + }; +} KSIDENTIFIER, *PKSIDENTIFIER, KSPROPERTY, *PKSPROPERTY, KSPIN_INTERFACE, *PKSPIN_INTERFACE + KSMETHOD, *PKSMETHOD, KSEVENT, *PKSEVENT, KSDEGRADE, *PKSDEGRADE, + KSPIN_MEDIUM, *PKSPIN_MEDIUM; + +#define DEFINE_KSPIN_INTERFACE_TABLE(tablename) const KSPIN_INTERFACE tablename[] = + +typedef struct +{ + PVOID Context; + ULONG Proportion; + LONGLONG DeltaTime; +} KSQUALITY, *PKSQUALITY; + +typedef struct +{ + PVOID Context; + ULONG Status; +} KSERROR, *PKSERROR; + +typedef struct +{ + ULONG AccessFlags; + ULONG DescriptionSize; + KSIDENTIFIER PropTypeSet; + ULONG MembersListCount; + ULONG Reserved; +} KSPROPERTY_DESCRIPTION, *PKSPROPERTY_DESCRIPTION; + +typedef struct +{ + KSPROPERTY Property; + ULONG NodeId; + ULONG Reserved; +} KSP_NODE, *PKSP_NODE; + + +typedef struct +{ + ULONG Size; + ULONG Count; +} KSMULTIPLE_ITEM, *PKSMULTIPLE_ITEM; + +typedef struct +{ + KSEVENT Event; + ULONG NodeId; + ULONG Reserved; +} KSE_NODE, *PKSE_NODE; + +typedef struct +{ + KSMETHOD Method; + ULONG NodeId; + ULONG Reserved; +} KSM_NODE, *PKSM_NODE; + +typedef struct +{ + ULONG MembersFlags; + ULONG MembersSize; + ULONG MembersCount; + ULONG Flags; +} KSPROPERTY_MEMBERSHEADER, *PKSPROPERTY_MEMBERSHEADER; + + +#if defined( _KS_NO_ANONYMOUS_STRUCTURES_ ) +{ + typedef union + { + struct _SIGNED + { + LONG SignedMinimum; + LONG SignedMaximum; + }; + struct _UNSIGNED + { + ULONG UnsignedMinimum; + ULONG UnsignedMaximum; + }; + } KSPROPERTY_BOUNDS_LONG, *PKSPROPERTY_BOUNDS_LONG; + +typedef union +{ + struct _SIGNED64 + { + LONGLONG SignedMinimum; + LONGLONG SignedMaximum; + }; + struct _UNSIGNED64 + { + #if defined(_NTDDK_) + ULONGLONG UnsignedMinimum; + ULONGLONG UnsignedMaximum; + #else + DWORDLONG UnsignedMinimum; + DWORDLONG UnsignedMaximum; + #endif + }; +} KSPROPERTY_BOUNDS_LONGLONG, *PKSPROPERTY_BOUNDS_LONGLONG; + +#else + typedef union + { + struct + { + LONG SignedMinimum; + LONG SignedMaximum; + }; + struct + { + ULONG UnsignedMinimum; + ULONG UnsignedMaximum; + }; +} KSPROPERTY_BOUNDS_LONG, *PKSPROPERTY_BOUNDS_LONG; + +typedef union +{ + struct + { + LONGLONG SignedMinimum; + LONGLONG SignedMaximum; + }; + struct + { + #if defined(_NTDDK_) + ULONGLONG UnsignedMinimum; + ULONGLONG UnsignedMaximum; + #else + DWORDLONG UnsignedMinimum; + DWORDLONG UnsignedMaximum; + #endif + }; +} KSPROPERTY_BOUNDS_LONGLONG, *PKSPROPERTY_BOUNDS_LONGLONG; + +#endif + + +typedef struct +{ + ULONG SteppingDelta; + ULONG Reserved; + KSPROPERTY_BOUNDS_LONG Bounds; +} KSPROPERTY_STEPPING_LONG, *PKSPROPERTY_STEPPING_LONG; + +typedef struct +{ + #if defined(_NTDDK_) + ULONGLONG SteppingDelta; + #else + DWORDLONG SteppingDelta; + #endif + KSPROPERTY_BOUNDS_LONGLONG Bounds; +} KSPROPERTY_STEPPING_LONGLONG, *PKSPROPERTY_STEPPING_LONGLONG; + + +typedef struct +{ + ULONG NotificationType; + union + { + struct + { + HANDLE Event; + ULONG_PTR Reserved[2]; + } EventHandle; + struct + { + HANDLE Semaphore; + ULONG Reserved; + LONG Adjustment; + } SemaphoreHandle; +#if defined(_NTDDK_) + struct + { + PVOID Event; + KPRIORITY Increment; + ULONG_PTR Reserved; + } EventObject; + struct + { + PVOID Semaphore; + KPRIORITY Increment; + LONG Adjustment; + } SemaphoreObject; + struct + { + PKDPC Dpc; + ULONG ReferenceCount; + ULONG_PTR Reserved; + } Dpc; + struct + { + PWORK_QUEUE_ITEM WorkQueueItem; + WORK_QUEUE_TYPE WorkQueueType; + ULONG_PTR Reserved; + } WorkItem; + struct + { + PWORK_QUEUE_ITEM WorkQueueItem; + PKSWORKER KsWorkerObject; + ULONG_PTR Reserved; + } KsWorkItem; + struct + { + PKSFILTER Filter; + ULONG_PTR Reserved[2]; + } KsFilterProcessing; + struct + { + PKSPIN Pin; + ULONG_PTR Reserved[2]; + } KsPinProcessing; +#endif + struct + { + PVOID Unused; + LONG_PTR Alignment[2]; + } Alignment; + }; +} KSEVENTDATA, *PKSEVENTDATA; + +typedef struct +{ + LONGLONG TimeBase; + LONGLONG Interval; +} KSINTERVAL, *PKSINTERVAL; + +typedef struct +{ + KSEVENTDATA EventData; + LONGLONG MarkTime; +} KSEVENT_TIME_MARK, *PKSEVENT_TIME_MARK; + +typedef struct +{ + KSEVENTDATA EventData; + LONGLONG TimeBase; + LONGLONG Interval; +} KSEVENT_TIME_INTERVAL, *PKSEVENT_TIME_INTERVAL; + +typedef struct +{ + KSEVENT Event; + PKSEVENTDATA EventData; + PVOID Reserved; +} KSQUERYBUFFER, *PKSQUERYBUFFER; + +typedef struct +{ + ULONG Size; + ULONG Flags; + union + { + HANDLE ObjectHandle; + PVOID ObjectPointer; + }; + PVOID Reserved; + KSEVENT Event; + KSEVENTDATA EventData; +} KSRELATIVEEVENT; + +typedef struct +{ + GUID Manufacturer; + GUID Product; + GUID Component; + GUID Name; + ULONG Version; + ULONG Revision; +} KSCOMPONENTID, *PKSCOMPONENTID; + +typedef struct +{ + LONGLONG Current; + LONGLONG Stop; + KS_SEEKING_FLAGS CurrentFlags; + KS_SEEKING_FLAGS StopFlags; +} KSPROPERTY_POSITIONS, *PKSPROPERTY_POSITIONS; + +typedef struct +{ + LONGLONG Earliest; + LONGLONG Latest; +} KSPROPERTY_MEDIAAVAILABLE, *PKSPROPERTY_MEDIAAVAILABLE; + +typedef struct +{ + KSPROPERTY Property; + GUID SourceFormat; + GUID TargetFormat; + LONGLONG Time; +} KSP_TIMEFORMAT, *PKSP_TIMEFORMAT; + +typedef struct +{ + ULONG FromNode; + ULONG FromNodePin; + ULONG ToNode; + ULONG ToNodePin; +} KSTOPOLOGY_CONNECTION, *PKSTOPOLOGY_CONNECTION; + +typedef struct +{ + ULONG CategoriesCount; + const GUID* Categories; + ULONG TopologyNodesCount; + const GUID* TopologyNodes; + ULONG TopologyConnectionsCount; + const KSTOPOLOGY_CONNECTION* TopologyConnections; + const GUID* TopologyNodesNames; + ULONG Reserved; +} KSTOPOLOGY, *PKSTOPOLOGY; + +typedef struct +{ + ULONG CreateFlags; + ULONG Node; +} KSNODE_CREATE, *PKSNODE_CREATE; + +typedef struct +{ + KSPROPERTY Property; + ULONG PinId; + ULONG Reserved; +} KSP_PIN, *PKSP_PIN; + +typedef struct +{ + ULONG PossibleCount; + ULONG CurrentCount; +} KSPIN_CINSTANCES, *PKSPIN_CINSTANCES; + +typedef struct +{ + ULONG Size; + ULONG Flags; + GUID Attribute; +} KSATTRIBUTE, *PKSATTRIBUTE; + +typedef struct +{ + KSPIN_INTERFACE Interface; + KSPIN_MEDIUM Medium; + ULONG PinId; + HANDLE PinToHandle; + KSPRIORITY Priority; +} KSPIN_CONNECT, *PKSPIN_CONNECT; + +typedef struct { + ULONG Size; + ULONG Pin; + WCHAR SymbolicLinkName[1]; +} KSPIN_PHYSICALCONNECTION, *PKSPIN_PHYSICALCONNECTION; + +typedef struct +{ + ULONG FormatSize; + ULONG Flags; + ULONG SampleSize; + ULONG Reserved; + GUID MajorFormat; + GUID SubFormat; + GUID Specifier; +} KSDATAFORMAT, *PKSDATAFORMAT, KSDATARANGE, *PKSDATARANGE; + + +#define DEFINE_KSPROPERTY_ITEM_GENERAL_COMPONENTID(Handler)\ + DEFINE_KSPROPERTY_ITEM(KSPROPERTY_GENERAL_COMPONENTID, (Handler), sizeof(KSPROPERTY), sizeof(KSCOMPONENTID), NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSMETHOD_ITEM_STREAMIO_READ(Handler)\ + DEFINE_KSMETHOD_ITEM(KSMETHOD_STREAMIO_READ, KSMETHOD_TYPE_WRITE, (Handler), sizeof(KSMETHOD),\ 0,\ NULL) + +#define DEFINE_KSMETHOD_ITEM_STREAMIO_WRITE(Handler)\ + DEFINE_KSMETHOD_ITEM(KSMETHOD_STREAMIO_WRITE, KSMETHOD_TYPE_READ, (Handler), sizeof(KSMETHOD), 0, NULL) + +#define DEFINE_KSPROPERTY_ITEM_MEDIASEEKING_CAPABILITIES(Handler)\ + DEFINE_KSPROPERTY_ITEM(KSPROPERTY_MEDIASEEKING_CAPABILITIES, (Handler), sizeof(KSPROPERTY), sizeof(KS_SEEKING_CAPABILITIES), NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_MEDIASEEKING_FORMATS(Handler)\ + DEFINE_KSPROPERTY_ITEM(KSPROPERTY_MEDIASEEKING_FORMATS, (Handler), sizeof(KSPROPERTY), 0, NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_MEDIASEEKING_TIMEFORMAT(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(KSPROPERTY_MEDIASEEKING_TIMEFORMAT, (GetHandler), sizeof(KSPROPERTY), sizeof(GUID), (SetHandler), NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_MEDIASEEKING_POSITION(Handler)\ + DEFINE_KSPROPERTY_ITEM(KSPROPERTY_MEDIASEEKING_POSITION, (Handler), sizeof(KSPROPERTY), sizeof(LONGLONG), NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_MEDIASEEKING_STOPPOSITION(Handler)\ + DEFINE_KSPROPERTY_ITEM(KSPROPERTY_MEDIASEEKING_STOPPOSITION, (Handler), sizeof(KSPROPERTY), sizeof(LONGLONG), NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_MEDIASEEKING_POSITIONS(Handler)\ + DEFINE_KSPROPERTY_ITEM(KSPROPERTY_MEDIASEEKING_POSITIONS, NULL, sizeof(KSPROPERTY), sizeof(KSPROPERTY_POSITIONS), (Handler), NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_MEDIASEEKING_DURATION(Handler)\ + DEFINE_KSPROPERTY_ITEM(KSPROPERTY_MEDIASEEKING_DURATION, (Handler), sizeof(KSPROPERTY), sizeof(LONGLONG), NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_MEDIASEEKING_AVAILABLE(Handler)\ + DEFINE_KSPROPERTY_ITEM(KSPROPERTY_MEDIASEEKING_AVAILABLE, (Handler), sizeof(KSPROPERTY), sizeof(KSPROPERTY_MEDIAAVAILABLE), NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_MEDIASEEKING_PREROLL(Handler)\ + DEFINE_KSPROPERTY_ITEM(KSPROPERTY_MEDIASEEKING_PREROLL, (Handler), sizeof(KSPROPERTY), sizeof(LONGLONG), NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_MEDIASEEKING_CONVERTTIMEFORMAT(Handler)\ + DEFINE_KSPROPERTY_ITEM(KSPROPERTY_MEDIASEEKING_CONVERTTIMEFORMAT, (Handler), sizeof(KSP_TIMEFORMAT), sizeof(LONGLONG), NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_TOPOLOGY_CATEGORIES(Handler)\ + DEFINE_KSPROPERTY_ITEM(KSPROPERTY_TOPOLOGY_CATEGORIES, (Handler), sizeof(KSPROPERTY), 0, NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_TOPOLOGY_NODES(Handler)\ + DEFINE_KSPROPERTY_ITEM(KSPROPERTY_TOPOLOGY_NODES, (Handler), sizeof(KSPROPERTY), 0, NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_TOPOLOGY_CONNECTIONS(Handler)\ + DEFINE_KSPROPERTY_ITEM(KSPROPERTY_TOPOLOGY_CONNECTIONS, (Handler), sizeof(KSPROPERTY), 0, NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_TOPOLOGY_NAME(Handler)\ + DEFINE_KSPROPERTY_ITEM(KSPROPERTY_TOPOLOGY_NAME, (Handler), sizeof(KSP_NODE), 0, NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_TOPOLOGYSET(TopologySet, Handler)\ +DEFINE_KSPROPERTY_TABLE(TopologySet) {\ + DEFINE_KSPROPERTY_ITEM_TOPOLOGY_CATEGORIES(Handler),\ + DEFINE_KSPROPERTY_ITEM_TOPOLOGY_NODES(Handler),\ + DEFINE_KSPROPERTY_ITEM_TOPOLOGY_CONNECTIONS(Handler),\ + DEFINE_KSPROPERTY_ITEM_TOPOLOGY_NAME(Handler) +} + + +#define DEFINE_KSPIN_INTERFACE_ITEM(guid, interface) { STATICGUIDOF(guid), (interface), 0 } + +#define DEFINE_KSPIN_MEDIUM_TABLE( tablename ) const KSPIN_MEDIUM tablename[] = + +#define DEFINE_KSPIN_MEDIUM_ITEM(guid, medium) DEFINE_KSPIN_INTERFACE_ITEM(guid, medium) + +#define DEFINE_KSPROPERTY_ITEM_PIN_CINSTANCES(Handler)\ + DEFINE_KSPROPERTY_ITEM(KSPROPERTY_PIN_CINSTANCES, (Handler), sizeof(KSP_PIN), sizeof(KSPIN_CINSTANCES), NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_PIN_CTYPES(Handler)\ + DEFINE_KSPROPERTY_ITEM( KSPROPERTY_PIN_CTYPES, (Handler), sizeof(KSPROPERTY), sizeof(ULONG), NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_PIN_DATAFLOW(Handler)\ + DEFINE_KSPROPERTY_ITEM(KSPROPERTY_PIN_DATAFLOW, (Handler), sizeof(KSP_PIN), sizeof(KSPIN_DATAFLOW), NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_PIN_DATARANGES(Handler)\ + DEFINE_KSPROPERTY_ITEM(KSPROPERTY_PIN_DATARANGES, (Handler), sizeof(KSP_PIN), 0, NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_PIN_DATAINTERSECTION(Handler)\ + DEFINE_KSPROPERTY_ITEM(KSPROPERTY_PIN_DATAINTERSECTION, (Handler), sizeof(KSP_PIN) + sizeof(KSMULTIPLE_ITEM), 0, NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_PIN_INTERFACES(Handler)\ + DEFINE_KSPROPERTY_ITEM(KSPROPERTY_PIN_INTERFACES, (Handler), sizeof(KSP_PIN), 0, NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_PIN_MEDIUMS(Handler)\ + DEFINE_KSPROPERTY_ITEM(KSPROPERTY_PIN_MEDIUMS, (Handler), sizeof(KSP_PIN), 0, NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_PIN_COMMUNICATION(Handler)\ + DEFINE_KSPROPERTY_ITEM(KSPROPERTY_PIN_COMMUNICATION, (Handler), sizeof(KSP_PIN), sizeof(KSPIN_COMMUNICATION), NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_PIN_GLOBALCINSTANCES(Handler)\ + DEFINE_KSPROPERTY_ITEM(KSPROPERTY_PIN_GLOBALCINSTANCES, (Handler), sizeof(KSP_PIN), sizeof(KSPIN_CINSTANCES), NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_PIN_NECESSARYINSTANCES(Handler)\ + DEFINE_KSPROPERTY_ITEM(KSPROPERTY_PIN_NECESSARYINSTANCES, (Handler), sizeof(KSP_PIN), sizeof(ULONG), NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_PIN_PHYSICALCONNECTION(Handler)\ + DEFINE_KSPROPERTY_ITEM(KSPROPERTY_PIN_PHYSICALCONNECTION,(Handler),sizeof(KSP_PIN),0,NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_PIN_CATEGORY(Handler)\ + DEFINE_KSPROPERTY_ITEM(KSPROPERTY_PIN_CATEGORY,(Handler),sizeof(KSP_PIN),sizeof(GUID),NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_PIN_NAME(Handler)\ + DEFINE_KSPROPERTY_ITEM(KSPROPERTY_PIN_NAME,(Handler),sizeof(KSP_PIN),0, NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_PIN_CONSTRAINEDDATARANGES(Handler)\ + DEFINE_KSPROPERTY_ITEM(KSPROPERTY_PIN_CONSTRAINEDDATARANGES, (Handler), sizeof(KSP_PIN), 0, NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_PIN_PROPOSEDATAFORMAT(Handler)\ + DEFINE_KSPROPERTY_ITEM(KSPROPERTY_PIN_PROPOSEDATAFORMAT, NULL, sizeof(KSP_PIN), sizeof(KSDATAFORMAT), (Handler), NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_PINSET(PinSet,\ + PropGeneral, PropInstances, PropIntersection)\ +DEFINE_KSPROPERTY_TABLE(PinSet) {\ + DEFINE_KSPROPERTY_ITEM_PIN_CINSTANCES(PropInstances),\ + DEFINE_KSPROPERTY_ITEM_PIN_CTYPES(PropGeneral),\ + DEFINE_KSPROPERTY_ITEM_PIN_DATAFLOW(PropGeneral),\ + DEFINE_KSPROPERTY_ITEM_PIN_DATARANGES(PropGeneral),\ + DEFINE_KSPROPERTY_ITEM_PIN_DATAINTERSECTION(PropIntersection),\ + DEFINE_KSPROPERTY_ITEM_PIN_INTERFACES(PropGeneral),\ + DEFINE_KSPROPERTY_ITEM_PIN_MEDIUMS(PropGeneral),\ + DEFINE_KSPROPERTY_ITEM_PIN_COMMUNICATION(PropGeneral),\ + DEFINE_KSPROPERTY_ITEM_PIN_CATEGORY(PropGeneral),\ + DEFINE_KSPROPERTY_ITEM_PIN_NAME(PropGeneral)\ + } + +#define DEFINE_KSPROPERTY_PINSETCONSTRAINED(PinSet,\ + PropGeneral, PropInstances, PropIntersection)\ + DEFINE_KSPROPERTY_TABLE(PinSet) {\ + DEFINE_KSPROPERTY_ITEM_PIN_CINSTANCES(PropInstances),\ + DEFINE_KSPROPERTY_ITEM_PIN_CTYPES(PropGeneral),\ + DEFINE_KSPROPERTY_ITEM_PIN_DATAFLOW(PropGeneral),\ + DEFINE_KSPROPERTY_ITEM_PIN_DATARANGES(PropGeneral),\ + DEFINE_KSPROPERTY_ITEM_PIN_DATAINTERSECTION(PropIntersection),\ + DEFINE_KSPROPERTY_ITEM_PIN_INTERFACES(PropGeneral),\ + DEFINE_KSPROPERTY_ITEM_PIN_MEDIUMS(PropGeneral),\ + DEFINE_KSPROPERTY_ITEM_PIN_COMMUNICATION(PropGeneral),\ + DEFINE_KSPROPERTY_ITEM_PIN_CATEGORY(PropGeneral),\ + DEFINE_KSPROPERTY_ITEM_PIN_NAME(PropGeneral),\ + DEFINE_KSPROPERTY_ITEM_PIN_CONSTRAINEDDATARANGES(PropGeneral)\ + } + +#define DEFINE_KSPROPERTY_ITEM_QUALITY_REPORT(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(KSPROPERTY_QUALITY_REPORT, (GetHandler), sizeof(KSPROPERTY), sizeof(KSQUALITY), (SetHandler), NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_QUALITY_ERROR(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(KSPROPERTY_QUALITY_ERROR, (GetHandler), sizeof(KSPROPERTY), sizeof(KSERROR), (SetHandler), NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_CONNECTION_STATE(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(KSPROPERTY_CONNECTION_STATE, (GetHandler), sizeof(KSPROPERTY), sizeof(KSSTATE), (SetHandler), NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_CONNECTION_PRIORITY(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(KSPROPERTY_CONNECTION_PRIORITY, (GetHandler), sizeof(KSPROPERTY), sizeof(KSPRIORITY), (SetHandler), NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_CONNECTION_DATAFORMAT(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(KSPROPERTY_CONNECTION_DATAFORMAT, (GetHandler), sizeof(KSPROPERTY), 0, (SetHandler), NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_CONNECTION_ALLOCATORFRAMING(Handler)\ + DEFINE_KSPROPERTY_ITEM(KSPROPERTY_CONNECTION_ALLOCATORFRAMING, (Handler), sizeof(KSPROPERTY), sizeof(KSALLOCATOR_FRAMING), NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_CONNECTION_ALLOCATORFRAMING_EX(Handler)\ + DEFINE_KSPROPERTY_ITEM(KSPROPERTY_CONNECTION_ALLOCATORFRAMING_EX, (Handler), sizeof(KSPROPERTY), 0, NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_CONNECTION_PROPOSEDATAFORMAT(Handler)\ + DEFINE_KSPROPERTY_ITEM(KSPROPERTY_CONNECTION_PROPOSEDATAFORMAT, NULL, sizeof(KSPROPERTY), sizeof(KSDATAFORMAT), (Handler), NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_CONNECTION_ACQUIREORDERING(Handler)\ + DEFINE_KSPROPERTY_ITEM(KSPROPERTY_CONNECTION_ACQUIREORDERING, (Handler), sizeof(KSPROPERTY), sizeof(int), NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_CONNECTION_STARTAT(Handler)\ + DEFINE_KSPROPERTY_ITEM(KSPROPERTY_CONNECTION_STARTAT, NULL, sizeof(KSPROPERTY), sizeof(KSRELATIVEEVENT), (Handler), NULL, 0, NULL, NULL, 0) + #endif // _KS_
17 years, 1 month
1
0
0
0
[pschweitzer] 30130: - Silent some warnings - Fixed bugs with control state when loading settings - Free memory
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Mon Nov 5 00:14:12 2007 New Revision: 30130 URL:
http://svn.reactos.org/svn/reactos?rev=30130&view=rev
Log: - Silent some warnings - Fixed bugs with control state when loading settings - Free memory Modified: trunk/tools/RosBE-Windows/Tools/config/options.c Modified: trunk/tools/RosBE-Windows/Tools/config/options.c URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE-Windows/Tools/config/o…
============================================================================== --- trunk/tools/RosBE-Windows/Tools/config/options.c (original) +++ trunk/tools/RosBE-Windows/Tools/config/options.c Mon Nov 5 00:14:12 2007 @@ -121,7 +121,7 @@ res = (PVOID)fgets((char *)TTempLine, 24+MAX_PATH, pFile); while (res) { - MultiByteToWideChar(CP_ACP, 0, TTempLine, -1, WTempLine, (25+MAX_PATH)*sizeof(WCHAR)); + MultiByteToWideChar(CP_ACP, 0, (char *)TTempLine, -1, WTempLine, sizeof(WTempLine)/sizeof(WTempLine[0])); ptr = wcstok(WTempLine, L" "); if (wcscmp(ptr, L"color") == 0) { @@ -136,19 +136,19 @@ ptr2 = wcstok(NULL, L"="); if (wcscmp(ptr, L"_ROSBE_SHOWTIME") == 0) { - LoadedSettings->showtime = strtoul(ptr2, NULL, 2); + LoadedSettings->showtime = wcstoul(ptr2, NULL, 2); } else if (wcscmp(ptr, L"_ROSBE_USECCACHE") == 0) { - LoadedSettings->useccache = strtoul(ptr2, NULL, 2); + LoadedSettings->useccache = wcstoul(ptr2, NULL, 2); } else if (wcscmp(ptr, L"_ROSBE_STRIP") == 0) { - LoadedSettings->strip = strtoul(ptr2, NULL, 2); + LoadedSettings->strip = wcstoul(ptr2, NULL, 2); } else if (wcscmp(ptr, L"_ROSBE_WRITELOG") == 0) { - LoadedSettings->writelog = strtoul(ptr2, NULL, 2); + LoadedSettings->writelog = wcstoul(ptr2, NULL, 2); } else if (wcscmp(ptr, L"_ROSBE_LOGDIR") == 0) { @@ -167,11 +167,13 @@ wcscpy(LoadedSettings->outdir, ptr2); } } + free(TTempLine); + free(WTempLine); res = (PVOID)fgets((char *)TTempLine, 24+MAX_PATH, pFile); NbLines++; } fclose(pFile); - free(pFile); + free(TTempLine); } else { @@ -185,12 +187,27 @@ SendDlgItemMessageW(hwnd, IDC_BACK, CB_SETCURSEL, LoadedSettings->background, 0); SendDlgItemMessage(hwnd, ID_SHOWBUILDTIME, BM_SETCHECK, LoadedSettings->showtime, 0); SendDlgItemMessage(hwnd, ID_SAVELOGS, BM_SETCHECK, LoadedSettings->writelog, 0); + if (LoadedSettings->writelog) + { + EnableWindow(GetDlgItem(hwnd, ID_BROWSE), TRUE); + EnableWindow(GetDlgItem(hwnd, ID_LOGDIR), TRUE); + } SendDlgItemMessage(hwnd, ID_USECCACHE, BM_SETCHECK, LoadedSettings->useccache, 0); SendDlgItemMessageW(hwnd, ID_STRIP, BM_SETCHECK, LoadedSettings->strip, 0); SetDlgItemText(hwnd, ID_MGWDIR, LoadedSettings->mingwpath); SetDlgItemText(hwnd, ID_LOGDIR, LoadedSettings->logdir); SetDlgItemText(hwnd, ID_OBJDIR, LoadedSettings->objdir); + if (wcslen(LoadedSettings->objdir) > 0) + { + EnableWindow(GetDlgItem(hwnd, ID_BROWSEOBJ), TRUE); + EnableWindow(GetDlgItem(hwnd, ID_OBJDIR), TRUE); + } SetDlgItemText(hwnd, ID_OUTDIR, LoadedSettings->outdir); + if (wcslen(LoadedSettings->outdir) > 0) + { + EnableWindow(GetDlgItem(hwnd, ID_BROWSEOUT), TRUE); + EnableWindow(GetDlgItem(hwnd, ID_OUTDIR), TRUE); + } } VOID SetSaveState(HWND hwnd, PSETTINGS DefaultSettings)
17 years, 1 month
1
0
0
0
← Newer
1
...
76
77
78
79
80
81
82
...
89
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
Results per page:
10
25
50
100
200