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
February 2011
----- 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
18 participants
352 discussions
Start a n
N
ew thread
[fireball] 50889: - The very first victim of DPH monitoring: Fix user-provided glyph buffer overread. - P.S. Arwinss just happen to be my experimental set up right now, so DPH is first tested there...
by fireball@svn.reactos.org
Author: fireball Date: Thu Feb 24 11:12:18 2011 New Revision: 50889 URL:
http://svn.reactos.org/svn/reactos?rev=50889&view=rev
Log: - The very first victim of DPH monitoring: Fix user-provided glyph buffer overread. - P.S. Arwinss just happen to be my experimental set up right now, so DPH is first tested there and once it works it's gonna be applied to trunk. Modified: branches/arwinss/reactos/subsystems/win32/win32k/gre/font.c Modified: branches/arwinss/reactos/subsystems/win32/win32k/gre/font.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win3…
============================================================================== --- branches/arwinss/reactos/subsystems/win32/win32k/gre/font.c [iso-8859-1] (original) +++ branches/arwinss/reactos/subsystems/win32/win32k/gre/font.c [iso-8859-1] Thu Feb 24 11:12:18 2011 @@ -270,10 +270,11 @@ { src = srcLine; srcLine += stride; - bits = *src++; for (w=0;w<width;w++) { + bits = *src++; + if (bits == 0xff) { DibPutPixel(&pCharSurf->SurfObj, w, h, xlBrushColor); @@ -286,8 +287,6 @@ bVal = ((UCHAR)~bits * (USHORT)GetBValue(srcColor) + bits * (USHORT)GetBValue(xlBrushColor)) >> 8; DibPutPixel(&pCharSurf->SurfObj, w, h, RGB(rVal, gVal, bVal)); } - - bits = *src++; } }
13 years, 10 months
1
0
0
0
[fireball] 50888: [RTL/DPH] - Implement user flags/values and HeapSize APIs in debug page heap (nearly the same code in all three functions). With these done, DPH core features are complete. Some d...
by fireball@svn.reactos.org
Author: fireball Date: Thu Feb 24 09:40:07 2011 New Revision: 50888 URL:
http://svn.reactos.org/svn/reactos?rev=50888&view=rev
Log: [RTL/DPH] - Implement user flags/values and HeapSize APIs in debug page heap (nearly the same code in all three functions). With these done, DPH core features are complete. Some debugging is still needed. Modified: trunk/reactos/lib/rtl/heappage.c Modified: trunk/reactos/lib/rtl/heappage.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/heappage.c?rev=508…
============================================================================== --- trunk/reactos/lib/rtl/heappage.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/heappage.c [iso-8859-1] Thu Feb 24 09:40:07 2011 @@ -2066,8 +2066,39 @@ PVOID *UserValue, PULONG UserFlags) { - UNIMPLEMENTED; - return FALSE; + PDPH_HEAP_ROOT DphRoot; + PDPH_HEAP_BLOCK Node; + + /* Get a pointer to the heap root */ + DphRoot = RtlpDphPointerFromHandle(HeapHandle); + if (!DphRoot) return FALSE; + + /* Add heap flags */ + Flags |= DphRoot->HeapFlags; + + /* Acquire the heap lock */ + RtlpDphPreProcessing(DphRoot, Flags); + + /* Find busy memory */ + Node = RtlpDphFindBusyMemory(DphRoot, BaseAddress); + + if (!Node) + { + /* This block was not found in page heap, try a normal heap instead */ + //RtlpDphNormalHeapGetUserInfo(); + ASSERT(FALSE); + return FALSE; + } + + /* Get user values and flags and store them in user provided pointers */ + if (UserValue) *UserValue = Node->UserValue; + if (UserFlags) *UserFlags = Node->UserFlags; + + /* Leave the heap lock */ + RtlpDphPostProcessing(DphRoot); + + /* Return success */ + return TRUE; } BOOLEAN NTAPI @@ -2076,8 +2107,38 @@ PVOID BaseAddress, PVOID UserValue) { - UNIMPLEMENTED; - return FALSE; + PDPH_HEAP_ROOT DphRoot; + PDPH_HEAP_BLOCK Node; + + /* Get a pointer to the heap root */ + DphRoot = RtlpDphPointerFromHandle(HeapHandle); + if (!DphRoot) return FALSE; + + /* Add heap flags */ + Flags |= DphRoot->HeapFlags; + + /* Acquire the heap lock */ + RtlpDphPreProcessing(DphRoot, Flags); + + /* Find busy memory */ + Node = RtlpDphFindBusyMemory(DphRoot, BaseAddress); + + if (!Node) + { + /* This block was not found in page heap, try a normal heap instead */ + //RtlpDphNormalHeapSetUserValue(); + ASSERT(FALSE); + return FALSE; + } + + /* Get user values and flags and store them in user provided pointers */ + Node->UserValue = UserValue; + + /* Leave the heap lock */ + RtlpDphPostProcessing(DphRoot); + + /* Return success */ + return TRUE; } BOOLEAN @@ -2088,17 +2149,79 @@ ULONG UserFlagsReset, ULONG UserFlagsSet) { - UNIMPLEMENTED; - return FALSE; + PDPH_HEAP_ROOT DphRoot; + PDPH_HEAP_BLOCK Node; + + /* Get a pointer to the heap root */ + DphRoot = RtlpDphPointerFromHandle(HeapHandle); + if (!DphRoot) return FALSE; + + /* Add heap flags */ + Flags |= DphRoot->HeapFlags; + + /* Acquire the heap lock */ + RtlpDphPreProcessing(DphRoot, Flags); + + /* Find busy memory */ + Node = RtlpDphFindBusyMemory(DphRoot, BaseAddress); + + if (!Node) + { + /* This block was not found in page heap, try a normal heap instead */ + //RtlpDphNormalHeapSetUserFlags(); + ASSERT(FALSE); + return FALSE; + } + + /* Get user values and flags and store them in user provided pointers */ + Node->UserFlags &= ~(UserFlagsReset); + Node->UserFlags |= UserFlagsSet; + + /* Leave the heap lock */ + RtlpDphPostProcessing(DphRoot); + + /* Return success */ + return TRUE; } SIZE_T NTAPI -RtlpPageHeapSize(HANDLE HeapPtr, +RtlpPageHeapSize(HANDLE HeapHandle, ULONG Flags, - PVOID Ptr) -{ - UNIMPLEMENTED; - return 0; + PVOID BaseAddress) +{ + PDPH_HEAP_ROOT DphRoot; + PDPH_HEAP_BLOCK Node; + SIZE_T Size; + + /* Get a pointer to the heap root */ + DphRoot = RtlpDphPointerFromHandle(HeapHandle); + if (!DphRoot) return -1; + + /* Add heap flags */ + Flags |= DphRoot->HeapFlags; + + /* Acquire the heap lock */ + RtlpDphPreProcessing(DphRoot, Flags); + + /* Find busy memory */ + Node = RtlpDphFindBusyMemory(DphRoot, BaseAddress); + + if (!Node) + { + /* This block was not found in page heap, try a normal heap instead */ + //RtlpDphNormalHeapSize(); + ASSERT(FALSE); + return -1; + } + + /* Get heap block size */ + Size = Node->nUserRequestedSize; + + /* Leave the heap lock */ + RtlpDphPostProcessing(DphRoot); + + /* Return user requested size */ + return Size; } /* EOF */
13 years, 10 months
1
0
0
0
[akhaldi] 50887: [COMCTL32] - Sync with wine 1.3.14
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Feb 24 01:27:57 2011 New Revision: 50887 URL:
http://svn.reactos.org/svn/reactos?rev=50887&view=rev
Log: [COMCTL32] - Sync with wine 1.3.14 Added: trunk/reactos/dll/win32/comctl32/comctl_Eo.rc (with props) trunk/reactos/dll/win32/comctl32/comctl_He.rc (with props) Modified: trunk/reactos/dll/win32/comctl32/comboex.c trunk/reactos/dll/win32/comctl32/comctl32.h trunk/reactos/dll/win32/comctl32/comctl32.spec trunk/reactos/dll/win32/comctl32/comctl_Bg.rc trunk/reactos/dll/win32/comctl32/comctl_Cs.rc trunk/reactos/dll/win32/comctl32/comctl_Da.rc trunk/reactos/dll/win32/comctl32/comctl_De.rc trunk/reactos/dll/win32/comctl32/comctl_El.rc trunk/reactos/dll/win32/comctl32/comctl_En.rc trunk/reactos/dll/win32/comctl32/comctl_Es.rc trunk/reactos/dll/win32/comctl32/comctl_Fr.rc trunk/reactos/dll/win32/comctl32/comctl_Hu.rc trunk/reactos/dll/win32/comctl32/comctl_It.rc trunk/reactos/dll/win32/comctl32/comctl_Ja.rc trunk/reactos/dll/win32/comctl32/comctl_Ko.rc trunk/reactos/dll/win32/comctl32/comctl_Lt.rc trunk/reactos/dll/win32/comctl32/comctl_Nl.rc trunk/reactos/dll/win32/comctl32/comctl_No.rc trunk/reactos/dll/win32/comctl32/comctl_Pl.rc trunk/reactos/dll/win32/comctl32/comctl_Pt.rc trunk/reactos/dll/win32/comctl32/comctl_Ro.rc trunk/reactos/dll/win32/comctl32/comctl_Ru.rc trunk/reactos/dll/win32/comctl32/comctl_Si.rc trunk/reactos/dll/win32/comctl32/comctl_Sk.rc trunk/reactos/dll/win32/comctl32/comctl_Sr.rc trunk/reactos/dll/win32/comctl32/comctl_Sv.rc trunk/reactos/dll/win32/comctl32/comctl_Th.rc trunk/reactos/dll/win32/comctl32/comctl_Tr.rc trunk/reactos/dll/win32/comctl32/comctl_Uk.rc trunk/reactos/dll/win32/comctl32/comctl_Zh.rc trunk/reactos/dll/win32/comctl32/commctrl.c trunk/reactos/dll/win32/comctl32/datetime.c trunk/reactos/dll/win32/comctl32/header.c trunk/reactos/dll/win32/comctl32/imagelist.c trunk/reactos/dll/win32/comctl32/ipaddress.c trunk/reactos/dll/win32/comctl32/listview.c trunk/reactos/dll/win32/comctl32/monthcal.c trunk/reactos/dll/win32/comctl32/pager.c trunk/reactos/dll/win32/comctl32/progress.c trunk/reactos/dll/win32/comctl32/propsheet.c trunk/reactos/dll/win32/comctl32/rebar.c trunk/reactos/dll/win32/comctl32/rsrc.rc trunk/reactos/dll/win32/comctl32/status.c trunk/reactos/dll/win32/comctl32/tab.c trunk/reactos/dll/win32/comctl32/toolbar.c trunk/reactos/dll/win32/comctl32/tooltips.c trunk/reactos/dll/win32/comctl32/treeview.c trunk/reactos/media/doc/README.WINE [This mail would be too long, it was shortened to contain the URLs only.] Modified: trunk/reactos/dll/win32/comctl32/comboex.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/comboex…
Modified: trunk/reactos/dll/win32/comctl32/comctl32.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/comctl3…
Modified: trunk/reactos/dll/win32/comctl32/comctl32.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/comctl3…
Modified: trunk/reactos/dll/win32/comctl32/comctl_Bg.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/comctl_…
Modified: trunk/reactos/dll/win32/comctl32/comctl_Cs.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/comctl_…
Modified: trunk/reactos/dll/win32/comctl32/comctl_Da.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/comctl_…
Modified: trunk/reactos/dll/win32/comctl32/comctl_De.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/comctl_…
Modified: trunk/reactos/dll/win32/comctl32/comctl_El.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/comctl_…
Modified: trunk/reactos/dll/win32/comctl32/comctl_En.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/comctl_…
Added: trunk/reactos/dll/win32/comctl32/comctl_Eo.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/comctl_…
Modified: trunk/reactos/dll/win32/comctl32/comctl_Es.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/comctl_…
Modified: trunk/reactos/dll/win32/comctl32/comctl_Fr.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/comctl_…
Added: trunk/reactos/dll/win32/comctl32/comctl_He.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/comctl_…
Modified: trunk/reactos/dll/win32/comctl32/comctl_Hu.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/comctl_…
Modified: trunk/reactos/dll/win32/comctl32/comctl_It.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/comctl_…
Modified: trunk/reactos/dll/win32/comctl32/comctl_Ja.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/comctl_…
Modified: trunk/reactos/dll/win32/comctl32/comctl_Ko.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/comctl_…
Modified: trunk/reactos/dll/win32/comctl32/comctl_Lt.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/comctl_…
Modified: trunk/reactos/dll/win32/comctl32/comctl_Nl.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/comctl_…
Modified: trunk/reactos/dll/win32/comctl32/comctl_No.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/comctl_…
Modified: trunk/reactos/dll/win32/comctl32/comctl_Pl.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/comctl_…
Modified: trunk/reactos/dll/win32/comctl32/comctl_Pt.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/comctl_…
Modified: trunk/reactos/dll/win32/comctl32/comctl_Ro.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/comctl_…
Modified: trunk/reactos/dll/win32/comctl32/comctl_Ru.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/comctl_…
Modified: trunk/reactos/dll/win32/comctl32/comctl_Si.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/comctl_…
Modified: trunk/reactos/dll/win32/comctl32/comctl_Sk.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/comctl_…
Modified: trunk/reactos/dll/win32/comctl32/comctl_Sr.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/comctl_…
Modified: trunk/reactos/dll/win32/comctl32/comctl_Sv.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/comctl_…
Modified: trunk/reactos/dll/win32/comctl32/comctl_Th.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/comctl_…
Modified: trunk/reactos/dll/win32/comctl32/comctl_Tr.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/comctl_…
Modified: trunk/reactos/dll/win32/comctl32/comctl_Uk.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/comctl_…
Modified: trunk/reactos/dll/win32/comctl32/comctl_Zh.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/comctl_…
Modified: trunk/reactos/dll/win32/comctl32/commctrl.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/commctr…
Modified: trunk/reactos/dll/win32/comctl32/datetime.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/datetim…
Modified: trunk/reactos/dll/win32/comctl32/header.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/header.…
Modified: trunk/reactos/dll/win32/comctl32/imagelist.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/imageli…
Modified: trunk/reactos/dll/win32/comctl32/ipaddress.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/ipaddre…
Modified: trunk/reactos/dll/win32/comctl32/listview.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/listvie…
Modified: trunk/reactos/dll/win32/comctl32/monthcal.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/monthca…
Modified: trunk/reactos/dll/win32/comctl32/pager.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/pager.c…
Modified: trunk/reactos/dll/win32/comctl32/progress.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/progres…
Modified: trunk/reactos/dll/win32/comctl32/propsheet.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/propshe…
Modified: trunk/reactos/dll/win32/comctl32/rebar.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/rebar.c…
Modified: trunk/reactos/dll/win32/comctl32/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/rsrc.rc…
Modified: trunk/reactos/dll/win32/comctl32/status.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/status.…
Modified: trunk/reactos/dll/win32/comctl32/tab.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/tab.c?r…
Modified: trunk/reactos/dll/win32/comctl32/toolbar.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/toolbar…
Modified: trunk/reactos/dll/win32/comctl32/tooltips.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/tooltip…
Modified: trunk/reactos/dll/win32/comctl32/treeview.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/treevie…
Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
13 years, 10 months
1
0
0
0
[akhaldi] 50886: [PSDK] - Improve some definitions.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Feb 24 01:26:34 2011 New Revision: 50886 URL:
http://svn.reactos.org/svn/reactos?rev=50886&view=rev
Log: [PSDK] - Improve some definitions. Modified: trunk/reactos/include/psdk/commctrl.h trunk/reactos/include/psdk/winuser.h Modified: trunk/reactos/include/psdk/commctrl.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/commctrl.h?re…
============================================================================== --- trunk/reactos/include/psdk/commctrl.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/commctrl.h [iso-8859-1] Thu Feb 24 01:26:34 2011 @@ -3024,8 +3024,8 @@ #endif #if(_WIN32_IE >= 0x0600) #define TVIF_STATEEX 0x100 +#endif #define TVIF_EXPANDEDIMAGE 0x200 -#endif #define TVIS_SELECTED 0x2 #define TVIS_CUT 0x4 #define TVIS_DROPHILITED 0x8 @@ -3084,7 +3084,10 @@ int cChildren; LPARAM lParam; int iIntegral; - } TVITEMEXA,*LPTVITEMEXA; + UINT uStateEx; /* _WIN32_IE >= 0x600 */ + HWND hwnd; /* _WIN32_IE >= 0x600 */ + int iExpandedImage; /* _WIN32_IE >= 0x600 */ + } TVITEMEXA, *LPTVITEMEXA; typedef struct tagTVITEMEXW { UINT mask; @@ -3098,14 +3101,9 @@ int cChildren; LPARAM lParam; int iIntegral; -#if(_WIN32_IE >= 0x0600) - UINT uStateEx; - HWND hwnd; - int iExpandedImage; -#endif -#if(NTDDI_VERSION >= NTDDI_WIN7) - int iReserved; -#endif + UINT uStateEx; /* _WIN32_IE >= 0x600 */ + HWND hwnd; /* _WIN32_IE >= 0x600 */ + int iExpandedImage; /* _WIN32_IE >= 0x600 */ } TVITEMEXW, *LPTVITEMEXW; __MINGW_TYPEDEF_AW(TVITEMEX) @@ -4018,6 +4016,8 @@ #define MonthCal_SetUnicodeFormat(hwnd,fUnicode) (WINBOOL)SNDMSG((hwnd),MCM_SETUNICODEFORMAT,(WPARAM)(fUnicode),0) #define MCM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT #define MonthCal_GetUnicodeFormat(hwnd) (WINBOOL)SNDMSG((hwnd),MCM_GETUNICODEFORMAT,0,0) +#define MCM_SETCALENDARBORDER (MCM_FIRST + 30) +#define MCM_GETCALENDARBORDER (MCM_FIRST + 31) typedef struct tagNMSELCHANGE { NMHDR nmhdr; Modified: trunk/reactos/include/psdk/winuser.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/winuser.h?rev…
============================================================================== --- trunk/reactos/include/psdk/winuser.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/winuser.h [iso-8859-1] Thu Feb 24 01:26:34 2011 @@ -1735,6 +1735,9 @@ #define WM_XBUTTONUP 524 #define WM_XBUTTONDBLCLK 525 #endif +#if (_WIN32_WINNT >= 0x0600) +#define WM_MOUSEHWHEEL 526 +#endif #if (_WIN32_WINNT >= 0x0500) #define WM_MOUSELAST 525 #elif (_WIN32_WINNT >= 0x0400) || (_WIN32_WINDOWS > 0x0400)
13 years, 10 months
1
0
0
0
[fireball] 50884: [NTDLL/LDR] - DPH could be selectively enabled for a specific application by means of Image File Execution options. Commit a rewrite of LdrQueryImageFileExecution* APIs based on a...
by fireball@svn.reactos.org
Author: fireball Date: Wed Feb 23 22:38:55 2011 New Revision: 50884 URL:
http://svn.reactos.org/svn/reactos?rev=50884&view=rev
Log: [NTDLL/LDR] - DPH could be selectively enabled for a specific application by means of Image File Execution options. Commit a rewrite of LdrQueryImageFileExecution* APIs based on a quite old patch by Alex Ionescu along with my fixes. - This is a forced measure to commit first step of an ntdll/ldr rewrite. This particular commit should not introduce any regressions, because previously that code part just barely worked. Added: trunk/reactos/dll/ntdll/ldr/ldrinit.c (with props) Modified: trunk/reactos/dll/ntdll/ldr/utils.c trunk/reactos/dll/ntdll/ntdll.rbuild Added: trunk/reactos/dll/ntdll/ldr/ldrinit.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/ntdll/ldr/ldrinit.c?re…
============================================================================== --- trunk/reactos/dll/ntdll/ldr/ldrinit.c (added) +++ trunk/reactos/dll/ntdll/ldr/ldrinit.c [iso-8859-1] Wed Feb 23 22:38:55 2011 @@ -1,0 +1,320 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS NT User-Mode Library + * FILE: dll/ntdll/ldr/ldrinit.c + * PURPOSE: User-Mode Process/Thread Startup + * PROGRAMMERS: Alex Ionescu (alex(a)relsoft.net) + * Aleksey Bragin (aleksey(a)reactos.org) + */ + +/* INCLUDES *****************************************************************/ + +#include <ntdll.h> +#define NDEBUG +#include <debug.h> + +/* GLOBALS *******************************************************************/ + +HKEY ImageExecOptionsKey; +HKEY Wow64ExecOptionsKey; +UNICODE_STRING ImageExecOptionsString = RTL_CONSTANT_STRING(L"\\Registry\\Machine\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Image File Execution Options"); +UNICODE_STRING Wow64OptionsString = RTL_CONSTANT_STRING(L""); + +/* FUNCTIONS *****************************************************************/ + +/* + * @implemented + */ +NTSTATUS +NTAPI +LdrOpenImageFileOptionsKey(IN PUNICODE_STRING SubKey, + IN BOOLEAN Wow64, + OUT PHKEY NewKeyHandle) +{ + PHKEY RootKeyLocation; + HANDLE RootKey; + UNICODE_STRING SubKeyString; + OBJECT_ATTRIBUTES ObjectAttributes; + NTSTATUS Status; + PWCHAR p1; + + /* Check which root key to open */ + if (Wow64) + RootKeyLocation = &Wow64ExecOptionsKey; + else + RootKeyLocation = &ImageExecOptionsKey; + + /* Get the current key */ + RootKey = *RootKeyLocation; + + /* Setup the object attributes */ + InitializeObjectAttributes(&ObjectAttributes, + Wow64 ? + &Wow64OptionsString : &ImageExecOptionsString, + OBJ_CASE_INSENSITIVE, + NULL, + NULL); + + /* Open the root key */ + Status = ZwOpenKey(&RootKey, KEY_ENUMERATE_SUB_KEYS, &ObjectAttributes); + if (NT_SUCCESS(Status)) + { + /* Write the key handle */ + if (_InterlockedCompareExchange((LONG*)RootKeyLocation, (LONG)RootKey, 0) != 0) + { + /* Someone already opened it, use it instead */ + NtClose(RootKey); + RootKey = *RootKeyLocation; + } + + /* Extract the name */ + SubKeyString = *SubKey; + p1 = (PWCHAR)((ULONG_PTR)SubKeyString.Buffer + SubKeyString.Length); + while (SubKey->Length) + { + if (p1[-1] == L'\\') break; + p1--; + SubKeyString.Length -= sizeof(*p1); + } + SubKeyString.Buffer = p1; + SubKeyString.Length = SubKeyString.MaximumLength - SubKeyString.Length - sizeof(WCHAR); + + /* Setup the object attributes */ + InitializeObjectAttributes(&ObjectAttributes, + &SubKeyString, + OBJ_CASE_INSENSITIVE, + RootKey, + NULL); + + /* Open the setting key */ + Status = ZwOpenKey((PHANDLE)NewKeyHandle, GENERIC_READ, &ObjectAttributes); + } + + /* Return to caller */ + return Status; +} + +/* + * @implemented + */ +NTSTATUS +NTAPI +LdrQueryImageFileKeyOption(IN HKEY KeyHandle, + IN PCWSTR ValueName, + IN ULONG Type, + OUT PVOID Buffer, + IN ULONG BufferSize, + OUT PULONG ReturnedLength OPTIONAL) +{ + ULONG KeyInfo[256]; + UNICODE_STRING ValueNameString, IntegerString; + ULONG KeyInfoSize, ResultSize; + PKEY_VALUE_PARTIAL_INFORMATION KeyValueInformation = (PKEY_VALUE_PARTIAL_INFORMATION)&KeyInfo; + BOOLEAN FreeHeap = FALSE; + NTSTATUS Status; + + /* Build a string for the value name */ + Status = RtlInitUnicodeStringEx(&ValueNameString, ValueName); + if (!NT_SUCCESS(Status)) return Status; + + /* Query the value */ + Status = NtQueryValueKey(KeyHandle, + &ValueNameString, + KeyValuePartialInformation, + KeyValueInformation, + sizeof(KeyInfo), + &ResultSize); + if (Status == STATUS_BUFFER_OVERFLOW) + { + /* Our local buffer wasn't enough, allocate one */ + KeyInfoSize = sizeof(KEY_VALUE_PARTIAL_INFORMATION) + + KeyValueInformation->DataLength; + KeyValueInformation = RtlAllocateHeap(RtlGetProcessHeap(), + 0, + KeyInfoSize); + if (KeyInfo == NULL) + { + /* Give up this time */ + Status = STATUS_NO_MEMORY; + } + + /* Try again */ + Status = NtQueryValueKey(KeyHandle, + &ValueNameString, + KeyValuePartialInformation, + KeyValueInformation, + KeyInfoSize, + &ResultSize); + FreeHeap = TRUE; + } + + /* Check for success */ + if (NT_SUCCESS(Status)) + { + /* Handle binary data */ + if (KeyValueInformation->Type == REG_BINARY) + { + /* Check validity */ + if ((Buffer) && (KeyValueInformation->DataLength <= BufferSize)) + { + /* Copy into buffer */ + RtlMoveMemory(Buffer, + &KeyValueInformation->Data, + KeyValueInformation->DataLength); + } + else + { + Status = STATUS_BUFFER_OVERFLOW; + } + + /* Copy the result length */ + if (ReturnedLength) *ReturnedLength = KeyValueInformation->DataLength; + } + else if (KeyValueInformation->Type == REG_DWORD) + { + /* Check for valid type */ + if (KeyValueInformation->Type != Type) + { + /* Error */ + Status = STATUS_OBJECT_TYPE_MISMATCH; + } + else + { + /* Check validity */ + if ((Buffer) && + (BufferSize == sizeof(ULONG)) && + (KeyValueInformation->DataLength <= BufferSize)) + { + /* Copy into buffer */ + RtlMoveMemory(Buffer, + &KeyValueInformation->Data, + KeyValueInformation->DataLength); + } + else + { + Status = STATUS_BUFFER_OVERFLOW; + } + + /* Copy the result length */ + if (ReturnedLength) *ReturnedLength = KeyValueInformation->DataLength; + } + } + else if (KeyValueInformation->Type != REG_SZ) + { + /* We got something weird */ + Status = STATUS_OBJECT_TYPE_MISMATCH; + } + else + { + /* String, check what you requested */ + if (Type == REG_DWORD) + { + /* Validate */ + if (BufferSize != sizeof(ULONG)) + { + /* Invalid size */ + BufferSize = 0; + Status = STATUS_INFO_LENGTH_MISMATCH; + } + else + { + /* OK, we know what you want... */ + IntegerString.Buffer = (PWSTR)KeyValueInformation->Data; + IntegerString.Length = KeyValueInformation->DataLength - + sizeof(WCHAR); + IntegerString.MaximumLength = KeyValueInformation->DataLength; + Status = RtlUnicodeStringToInteger(&IntegerString, 0, (PULONG)Buffer); + } + } + else + { + /* Validate */ + if (KeyValueInformation->DataLength > BufferSize) + { + /* Invalid */ + Status = STATUS_BUFFER_OVERFLOW; + } + else + { + /* Set the size */ + BufferSize = KeyValueInformation->DataLength; + } + + /* Copy the string */ + RtlMoveMemory(Buffer, &KeyValueInformation->Data, BufferSize); + } + + /* Copy the result length */ + if (ReturnedLength) *ReturnedLength = KeyValueInformation->DataLength; + } + } + + /* Check if buffer was in heap */ + if (FreeHeap) RtlFreeHeap(RtlGetProcessHeap(), 0, KeyValueInformation); + + /* Close key and return */ + NtClose(KeyHandle); + return Status; +} + +/* + * @implemented + */ +NTSTATUS +NTAPI +LdrQueryImageFileExecutionOptionsEx(IN PUNICODE_STRING SubKey, + IN PCWSTR ValueName, + IN ULONG Type, + OUT PVOID Buffer, + IN ULONG BufferSize, + OUT PULONG ReturnedLength OPTIONAL, + IN BOOLEAN Wow64) +{ + NTSTATUS Status; + HKEY KeyHandle; + + /* Open a handle to the key */ + Status = LdrOpenImageFileOptionsKey(SubKey, Wow64, &KeyHandle); + + /* Check for success */ + if (NT_SUCCESS(Status)) + { + /* Query the data */ + Status = LdrQueryImageFileKeyOption(KeyHandle, + ValueName, + Type, + Buffer, + BufferSize, + ReturnedLength); + + /* Close the key */ + NtClose(KeyHandle); + } + + /* Return to caller */ + return Status; +} + +/* + * @implemented + */ +NTSTATUS +NTAPI +LdrQueryImageFileExecutionOptions(IN PUNICODE_STRING SubKey, + IN PCWSTR ValueName, + IN ULONG Type, + OUT PVOID Buffer, + IN ULONG BufferSize, + OUT PULONG ReturnedLength OPTIONAL) +{ + /* Call the newer function */ + return LdrQueryImageFileExecutionOptionsEx(SubKey, + ValueName, + Type, + Buffer, + BufferSize, + ReturnedLength, + FALSE); +} + +/* EOF */ Propchange: trunk/reactos/dll/ntdll/ldr/ldrinit.c ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/dll/ntdll/ldr/utils.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/ntdll/ldr/utils.c?rev=…
============================================================================== --- trunk/reactos/dll/ntdll/ldr/utils.c [iso-8859-1] (original) +++ trunk/reactos/dll/ntdll/ldr/utils.c [iso-8859-1] Wed Feb 23 22:38:55 2011 @@ -3289,162 +3289,6 @@ return Status; } - -/*************************************************************************** - * NAME EXPORTED - * LdrQueryImageFileExecutionOptions - * - * DESCRIPTION - * - * ARGUMENTS - * - * RETURN VALUE - * - * REVISIONS - * - * NOTE - * - * @implemented - */ -NTSTATUS NTAPI -LdrQueryImageFileExecutionOptions(IN PUNICODE_STRING SubKey, - IN PCWSTR ValueName, - IN ULONG Type, - OUT PVOID Buffer, - IN ULONG BufferSize, - OUT PULONG ReturnedLength OPTIONAL) -{ - PKEY_VALUE_PARTIAL_INFORMATION KeyInfo; - CHAR KeyInfoBuffer[sizeof(KEY_VALUE_PARTIAL_INFORMATION) + 32]; - OBJECT_ATTRIBUTES ObjectAttributes; - UNICODE_STRING ValueNameString; - UNICODE_STRING KeyName; - WCHAR NameBuffer[256]; - HANDLE KeyHandle; - ULONG KeyInfoSize; - ULONG ResultSize; - PWCHAR Ptr; - NTSTATUS Status; - - wcscpy (NameBuffer, - L"\\Registry\\Machine\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Image File Execution Options\\"); - Ptr = wcsrchr (SubKey->Buffer, L'\\'); - if (Ptr == NULL) - { - Ptr = SubKey->Buffer; - } - else - { - Ptr++; - } - wcscat (NameBuffer, Ptr); - RtlInitUnicodeString (&KeyName, - NameBuffer); - - InitializeObjectAttributes(&ObjectAttributes, - &KeyName, - OBJ_CASE_INSENSITIVE, - NULL, - NULL); - - Status = NtOpenKey(&KeyHandle, - KEY_READ, - &ObjectAttributes); - if (!NT_SUCCESS(Status)) - { - DPRINT ("NtOpenKey() failed (Status %lx)\n", Status); - return Status; - } - - KeyInfoSize = sizeof(KeyInfoBuffer); - KeyInfo = (PKEY_VALUE_PARTIAL_INFORMATION)KeyInfoBuffer; - - RtlInitUnicodeString(&ValueNameString, - (PWSTR)ValueName); - Status = NtQueryValueKey(KeyHandle, - &ValueNameString, - KeyValuePartialInformation, - KeyInfo, - KeyInfoSize, - &ResultSize); - if (Status == STATUS_BUFFER_OVERFLOW) - { - /* We can allocate only if there is a process heap already */ - if (!RtlGetProcessHeap()) - { - NtClose (KeyHandle); - return STATUS_NO_MEMORY; - } - KeyInfoSize = sizeof(KEY_VALUE_PARTIAL_INFORMATION) + KeyInfo->DataLength; - KeyInfo = RtlAllocateHeap (RtlGetProcessHeap(), - HEAP_ZERO_MEMORY, - KeyInfoSize); - if (KeyInfo == NULL) - { - NtClose (KeyHandle); - return STATUS_INSUFFICIENT_RESOURCES; - } - - Status = NtQueryValueKey (KeyHandle, - &ValueNameString, - KeyValuePartialInformation, - KeyInfo, - KeyInfoSize, - &ResultSize); - } - NtClose (KeyHandle); - - if (!NT_SUCCESS(Status)) - { - if ((PCHAR)KeyInfo != KeyInfoBuffer) - { - RtlFreeHeap (RtlGetProcessHeap(), - 0, - KeyInfo); - } - return Status; - } - - if (KeyInfo->Type != Type) - { - if ((PCHAR)KeyInfo != KeyInfoBuffer) - { - RtlFreeHeap (RtlGetProcessHeap(), - 0, - KeyInfo); - } - return STATUS_OBJECT_TYPE_MISMATCH; - } - - ResultSize = BufferSize; - if (ResultSize < KeyInfo->DataLength) - { - Status = STATUS_BUFFER_OVERFLOW; - } - else - { - ResultSize = KeyInfo->DataLength; - } - RtlCopyMemory (Buffer, - &KeyInfo->Data, - ResultSize); - - if ((PCHAR)KeyInfo != KeyInfoBuffer) - { - RtlFreeHeap (RtlGetProcessHeap(), - 0, - KeyInfo); - } - - if (ReturnedLength != NULL) - { - *ReturnedLength = ResultSize; - } - - return Status; -} - - PIMAGE_BASE_RELOCATION NTAPI LdrProcessRelocationBlock( Modified: trunk/reactos/dll/ntdll/ntdll.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/ntdll/ntdll.rbuild?rev…
============================================================================== --- trunk/reactos/dll/ntdll/ntdll.rbuild [iso-8859-1] (original) +++ trunk/reactos/dll/ntdll/ntdll.rbuild [iso-8859-1] Wed Feb 23 22:38:55 2011 @@ -47,6 +47,7 @@ <pch>ntdll.h</pch> </directory> <directory name="ldr"> + <file>ldrinit.c</file> <file>startup.c</file> <file>utils.c</file> <file>actctx.c</file>
13 years, 10 months
1
0
0
0
[akhaldi] 50883: [PSDK] - Improve commctrl.h [CRT] - Update _mingw_mac.h from mingw-w64 and add _mingw_unicode.h
by akhaldi@svn.reactos.org
Author: akhaldi Date: Wed Feb 23 21:26:18 2011 New Revision: 50883 URL:
http://svn.reactos.org/svn/reactos?rev=50883&view=rev
Log: [PSDK] - Improve commctrl.h [CRT] - Update _mingw_mac.h from mingw-w64 and add _mingw_unicode.h Added: trunk/reactos/include/crt/_mingw_unicode.h (with props) Modified: trunk/reactos/include/crt/_mingw_mac.h trunk/reactos/include/psdk/commctrl.h Modified: trunk/reactos/include/crt/_mingw_mac.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/_mingw_mac.h?r…
============================================================================== --- trunk/reactos/include/crt/_mingw_mac.h [iso-8859-1] (original) +++ trunk/reactos/include/crt/_mingw_mac.h [iso-8859-1] Wed Feb 23 21:26:18 2011 @@ -116,19 +116,31 @@ #define __WINT_TYPE__ unsigned short #endif +#undef __MINGW_EXTENSION #if defined(__GNUC__) || defined(__GNUG__) #define __MINGW_EXTENSION __extension__ #else #define __MINGW_EXTENSION #endif -#ifdef UNICODE -# define __MINGW_NAME_AW(func) func##W -#else -# define __MINGW_NAME_AW(func) func##A +/* Special case nameless struct/union. */ +#ifndef __C89_NAMELESS +#define __C89_NAMELESS __MINGW_EXTENSION + +#define __C89_NAMELESSSTRUCTNAME +#define __C89_NAMELESSUNIONNAME #endif -#define __MINGW_TYPEDEF_AW(type) \ - typedef __MINGW_NAME_AW(type) type; + +#ifndef __GNU_EXTENSION +#define __GNU_EXTENSION __MINGW_EXTENSION +#endif + +/* MinGW-w64 has some additional C99 printf/scanf feature support. + So we add some helper macros to ease recognition of them. */ +#define __MINGW_HAVE_ANSI_C99_PRINTF 1 +#define __MINGW_HAVE_WIDE_C99_PRINTF 1 +#define __MINGW_HAVE_ANSI_C99_SCANF 1 +#define __MINGW_HAVE_WIDE_C99_SCANF 1 #endif /* _INC_CRTDEFS_MACRO */ Added: trunk/reactos/include/crt/_mingw_unicode.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/_mingw_unicode…
============================================================================== --- trunk/reactos/include/crt/_mingw_unicode.h (added) +++ trunk/reactos/include/crt/_mingw_unicode.h [iso-8859-1] Wed Feb 23 21:26:18 2011 @@ -1,0 +1,33 @@ +/** + * This file has no copyright assigned and is placed in the Public Domain. + * This file is part of the w64 mingw-runtime package. + * No warranty is given; refer to the file DISCLAIMER.PD within this package. + */ + +#if !defined(_INC_CRT_UNICODE_MACROS) +/* _INC_CRT_UNICODE_MACROS defined based on UNICODE flag */ + +#if defined(UNICODE) +# define _INC_CRT_UNICODE_MACROS 1 +# define __MINGW_NAME_AW(func) func##W +# define __MINGW_NAME_AW_EXT(func,ext) func##W##ext +# define __MINGW_NAME_UAW(func) func##_W +# define __MINGW_NAME_UAW_EXT(func,ext) func##_W_##ext +# define __MINGW_STRING_AW(str) L##str /* same as TEXT() from winnt.h */ +# define __MINGW_PROCNAMEEXT_AW "W" +#else +# define _INC_CRT_UNICODE_MACROS 2 +# define __MINGW_NAME_AW(func) func##A +# define __MINGW_NAME_AW_EXT(func,ext) func##A##ext +# define __MINGW_NAME_UAW(func) func##_A +# define __MINGW_NAME_UAW_EXT(func,ext) func##_A_##ext +# define __MINGW_STRING_AW(str) str /* same as TEXT() from winnt.h */ +# define __MINGW_PROCNAMEEXT_AW "A" +#endif + +#define __MINGW_TYPEDEF_AW(type) \ + typedef __MINGW_NAME_AW(type) type; +#define __MINGW_TYPEDEF_UAW(type) \ + typedef __MINGW_NAME_UAW(type) type; + +#endif /* !defined(_INC_CRT_UNICODE_MACROS) */ Propchange: trunk/reactos/include/crt/_mingw_unicode.h ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/include/psdk/commctrl.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/commctrl.h?re…
============================================================================== --- trunk/reactos/include/psdk/commctrl.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/commctrl.h [iso-8859-1] Wed Feb 23 21:26:18 2011 @@ -5,6 +5,8 @@ */ #ifndef _INC_COMMCTRL #define _INC_COMMCTRL + +#include <_mingw_unicode.h> #ifndef _WINRESRC_ #ifndef _WIN32_IE @@ -336,6 +338,7 @@ WINCOMMCTRLAPI COLORREF WINAPI ImageList_SetBkColor(HIMAGELIST himl,COLORREF clrBk); WINCOMMCTRLAPI COLORREF WINAPI ImageList_GetBkColor(HIMAGELIST himl); WINCOMMCTRLAPI WINBOOL WINAPI ImageList_SetOverlayImage(HIMAGELIST himl,int iImage,int iOverlay); + WINCOMMCTRLAPI HRESULT WINAPI HIMAGELIST_QueryInterface(HIMAGELIST,REFIID,void **); #define ImageList_AddIcon(himl,hicon) ImageList_ReplaceIcon(himl,-1,hicon) #define ILD_NORMAL 0x0 @@ -372,11 +375,7 @@ WINCOMMCTRLAPI HIMAGELIST WINAPI ImageList_LoadImageA(HINSTANCE hi,LPCSTR lpbmp,int cx,int cGrow,COLORREF crMask,UINT uType,UINT uFlags); WINCOMMCTRLAPI HIMAGELIST WINAPI ImageList_LoadImageW(HINSTANCE hi,LPCWSTR lpbmp,int cx,int cGrow,COLORREF crMask,UINT uType,UINT uFlags); -#ifdef UNICODE -#define ImageList_LoadImage ImageList_LoadImageW -#else -#define ImageList_LoadImage ImageList_LoadImageA -#endif +#define ImageList_LoadImage __MINGW_NAME_AW(ImageList_LoadImage) #define ILCF_MOVE 0x0 #define ILCF_SWAP 0x1 @@ -417,8 +416,6 @@ WINCOMMCTRLAPI WINBOOL WINAPI ImageList_GetImageInfo(HIMAGELIST himl,int i,IMAGEINFO *pImageInfo); WINCOMMCTRLAPI HIMAGELIST WINAPI ImageList_Merge(HIMAGELIST himl1,int i1,HIMAGELIST himl2,int i2,int dx,int dy); WINCOMMCTRLAPI HIMAGELIST WINAPI ImageList_Duplicate(HIMAGELIST himl); - WINCOMMCTRLAPI HRESULT WINAPI HIMAGELIST_QueryInterface(HIMAGELIST himl, REFIID riid, void **ppv); - #endif #ifndef NOHEADER @@ -426,11 +423,7 @@ #define WC_HEADERA "SysHeader32" #define WC_HEADERW L"SysHeader32" -#ifdef UNICODE -#define WC_HEADER WC_HEADERW -#else -#define WC_HEADER WC_HEADERA -#endif +#define WC_HEADER __MINGW_NAME_AW(WC_HEADER) #define HDS_HORZ 0x0 #define HDS_BUTTONS 0x2 @@ -451,17 +444,10 @@ #define HDFT_HASNOVALUE 0x8000 -#ifdef UNICODE -#define HD_TEXTFILTER HD_TEXTFILTERW -#define HDTEXTFILTER HD_TEXTFILTERW -#define LPHD_TEXTFILTER LPHD_TEXTFILTERW -#define LPHDTEXTFILTER LPHD_TEXTFILTERW -#else -#define HD_TEXTFILTER HD_TEXTFILTERA -#define HDTEXTFILTER HD_TEXTFILTERA -#define LPHD_TEXTFILTER LPHD_TEXTFILTERA -#define LPHDTEXTFILTER LPHD_TEXTFILTERA -#endif +#define HD_TEXTFILTER __MINGW_NAME_AW(HD_TEXTFILTER) +#define HDTEXTFILTER __MINGW_NAME_AW(HD_TEXTFILTER) +#define LPHD_TEXTFILTER __MINGW_NAME_AW(LPHD_TEXTFILTER) +#define LPHDTEXTFILTER __MINGW_NAME_AW(LPHD_TEXTFILTER) typedef struct _HD_TEXTFILTERA { LPSTR pszText; @@ -508,15 +494,10 @@ void *pvFilter; } HDITEMW,*LPHDITEMW; -#ifdef UNICODE -#define HDITEM HDITEMW -#define LPHDITEM LPHDITEMW -#define HDITEM_V1_SIZE HDITEMW_V1_SIZE -#else -#define HDITEM HDITEMA -#define LPHDITEM LPHDITEMA -#define HDITEM_V1_SIZE HDITEMA_V1_SIZE -#endif +#define HDITEM __MINGW_NAME_AW(HDITEM) +#define LPHDITEM __MINGW_NAME_AW(LPHDITEM) + +#define HDITEM_V1_SIZE __MINGW_NAME_AW_EXT(HDITEM,_V1_SIZE) #define HDI_WIDTH 0x1 #define HDI_HEIGHT HDI_WIDTH @@ -555,11 +536,7 @@ #define HDM_INSERTITEMA (HDM_FIRST+1) #define HDM_INSERTITEMW (HDM_FIRST+10) -#ifdef UNICODE -#define HDM_INSERTITEM HDM_INSERTITEMW -#else -#define HDM_INSERTITEM HDM_INSERTITEMA -#endif +#define HDM_INSERTITEM __MINGW_NAME_AW(HDM_INSERTITEM) #define Header_InsertItem(hwndHD,i,phdi) (int)SNDMSG((hwndHD),HDM_INSERTITEM,(WPARAM)(int)(i),(LPARAM)(const HD_ITEM *)(phdi)) @@ -569,22 +546,14 @@ #define HDM_GETITEMA (HDM_FIRST+3) #define HDM_GETITEMW (HDM_FIRST+11) -#ifdef UNICODE -#define HDM_GETITEM HDM_GETITEMW -#else -#define HDM_GETITEM HDM_GETITEMA -#endif +#define HDM_GETITEM __MINGW_NAME_AW(HDM_GETITEM) #define Header_GetItem(hwndHD,i,phdi) (WINBOOL)SNDMSG((hwndHD),HDM_GETITEM,(WPARAM)(int)(i),(LPARAM)(HD_ITEM *)(phdi)) #define HDM_SETITEMA (HDM_FIRST+4) #define HDM_SETITEMW (HDM_FIRST+12) -#ifdef UNICODE -#define HDM_SETITEM HDM_SETITEMW -#else -#define HDM_SETITEM HDM_SETITEMA -#endif +#define HDM_SETITEM __MINGW_NAME_AW(HDM_SETITEM) #define Header_SetItem(hwndHD,i,phdi) (WINBOOL)SNDMSG((hwndHD),HDM_SETITEM,(WPARAM)(int)(i),(LPARAM)(const HD_ITEM *)(phdi)) @@ -688,27 +657,15 @@ #define HDN_FILTERCHANGE (HDN_FIRST-12) #define HDN_FILTERBTNCLICK (HDN_FIRST-13) -#ifdef UNICODE -#define HDN_ITEMCHANGING HDN_ITEMCHANGINGW -#define HDN_ITEMCHANGED HDN_ITEMCHANGEDW -#define HDN_ITEMCLICK HDN_ITEMCLICKW -#define HDN_ITEMDBLCLICK HDN_ITEMDBLCLICKW -#define HDN_DIVIDERDBLCLICK HDN_DIVIDERDBLCLICKW -#define HDN_BEGINTRACK HDN_BEGINTRACKW -#define HDN_ENDTRACK HDN_ENDTRACKW -#define HDN_TRACK HDN_TRACKW -#define HDN_GETDISPINFO HDN_GETDISPINFOW -#else -#define HDN_ITEMCHANGING HDN_ITEMCHANGINGA -#define HDN_ITEMCHANGED HDN_ITEMCHANGEDA -#define HDN_ITEMCLICK HDN_ITEMCLICKA -#define HDN_ITEMDBLCLICK HDN_ITEMDBLCLICKA -#define HDN_DIVIDERDBLCLICK HDN_DIVIDERDBLCLICKA -#define HDN_BEGINTRACK HDN_BEGINTRACKA -#define HDN_ENDTRACK HDN_ENDTRACKA -#define HDN_TRACK HDN_TRACKA -#define HDN_GETDISPINFO HDN_GETDISPINFOA -#endif +#define HDN_ITEMCHANGING __MINGW_NAME_AW(HDN_ITEMCHANGING) +#define HDN_ITEMCHANGED __MINGW_NAME_AW(HDN_ITEMCHANGED) +#define HDN_ITEMCLICK __MINGW_NAME_AW(HDN_ITEMCLICK) +#define HDN_ITEMDBLCLICK __MINGW_NAME_AW(HDN_ITEMDBLCLICK) +#define HDN_DIVIDERDBLCLICK __MINGW_NAME_AW(HDN_DIVIDERDBLCLICK) +#define HDN_BEGINTRACK __MINGW_NAME_AW(HDN_BEGINTRACK) +#define HDN_ENDTRACK __MINGW_NAME_AW(HDN_ENDTRACK) +#define HDN_TRACK __MINGW_NAME_AW(HDN_TRACK) +#define HDN_GETDISPINFO __MINGW_NAME_AW(HDN_GETDISPINFO) #define HD_NOTIFYA NMHEADERA #define HD_NOTIFYW NMHEADERW @@ -728,13 +685,8 @@ HDITEMW *pitem; } NMHEADERW,*LPNMHEADERW; -#ifdef UNICODE -#define NMHEADER NMHEADERW -#define LPNMHEADER LPNMHEADERW -#else -#define NMHEADER NMHEADERA -#define LPNMHEADER LPNMHEADERA -#endif +#define NMHEADER __MINGW_NAME_AW(NMHEADER) +#define LPNMHEADER __MINGW_NAME_AW(LPNMHEADER) typedef struct tagNMHDDISPINFOW { NMHDR hdr; @@ -756,13 +708,8 @@ LPARAM lParam; } NMHDDISPINFOA,*LPNMHDDISPINFOA; -#ifdef UNICODE -#define NMHDDISPINFO NMHDDISPINFOW -#define LPNMHDDISPINFO LPNMHDDISPINFOW -#else -#define NMHDDISPINFO NMHDDISPINFOA -#define LPNMHDDISPINFO LPNMHDDISPINFOA -#endif +#define NMHDDISPINFO __MINGW_NAME_AW(NMHDDISPINFO) +#define LPNMHDDISPINFO __MINGW_NAME_AW(LPNMHDDISPINFO) typedef struct tagNMHDFILTERBTNCLICK { NMHDR hdr; @@ -776,11 +723,7 @@ #define TOOLBARCLASSNAMEW L"ToolbarWindow32" #define TOOLBARCLASSNAMEA "ToolbarWindow32" -#ifdef UNICODE -#define TOOLBARCLASSNAME TOOLBARCLASSNAMEW -#else -#define TOOLBARCLASSNAME TOOLBARCLASSNAMEA -#endif +#define TOOLBARCLASSNAME __MINGW_NAME_AW(TOOLBARCLASSNAME) typedef struct _TBBUTTON { int iBitmap; @@ -957,13 +900,8 @@ LPCWSTR pszValueName; } TBSAVEPARAMSW,*LPTBSAVEPARAMW; -#ifdef UNICODE -#define TBSAVEPARAMS TBSAVEPARAMSW -#define LPTBSAVEPARAMS LPTBSAVEPARAMSW -#else -#define TBSAVEPARAMS TBSAVEPARAMSA -#define LPTBSAVEPARAMS LPTBSAVEPARAMSA -#endif +#define TBSAVEPARAMS __MINGW_NAME_AW(TBSAVEPARAMS) +#define LPTBSAVEPARAMS __MINGW_NAME_AW(LPTBSAVEPARAMS) #define TB_SAVERESTOREA (WM_USER+26) #define TB_SAVERESTOREW (WM_USER+76) @@ -1002,15 +940,10 @@ #define TB_SETMAXTEXTROWS (WM_USER+60) #define TB_GETTEXTROWS (WM_USER+61) -#ifdef UNICODE -#define TB_GETBUTTONTEXT TB_GETBUTTONTEXTW -#define TB_SAVERESTORE TB_SAVERESTOREW -#define TB_ADDSTRING TB_ADDSTRINGW -#else -#define TB_GETBUTTONTEXT TB_GETBUTTONTEXTA -#define TB_SAVERESTORE TB_SAVERESTOREA -#define TB_ADDSTRING TB_ADDSTRINGA -#endif +#define TB_GETBUTTONTEXT __MINGW_NAME_AW(TB_GETBUTTONTEXT) +#define TB_SAVERESTORE __MINGW_NAME_AW(TB_SAVERESTORE) +#define TB_ADDSTRING __MINGW_NAME_AW(TB_ADDSTRING) + #define TB_GETOBJECT (WM_USER+62) #define TB_GETHOTITEM (WM_USER+71) #define TB_SETHOTITEM (WM_USER+72) @@ -1044,11 +977,8 @@ #define TB_GETUNICODEFORMAT CCM_GETUNICODEFORMAT #define TB_MAPACCELERATORW (WM_USER+90) -#ifdef UNICODE -#define TB_MAPACCELERATOR TB_MAPACCELERATORW -#else -#define TB_MAPACCELERATOR TB_MAPACCELERATORA -#endif + +#define TB_MAPACCELERATOR __MINGW_NAME_AW(TB_MAPACCELERATOR) typedef struct { HINSTANCE hInstOld; @@ -1097,48 +1027,31 @@ int cchText; } TBBUTTONINFOW,*LPTBBUTTONINFOW; -#ifdef UNICODE -#define TBBUTTONINFO TBBUTTONINFOW -#define LPTBBUTTONINFO LPTBBUTTONINFOW -#else -#define TBBUTTONINFO TBBUTTONINFOA -#define LPTBBUTTONINFO LPTBBUTTONINFOA -#endif +#define TBBUTTONINFO __MINGW_NAME_AW(TBBUTTONINFO) +#define LPTBBUTTONINFO __MINGW_NAME_AW(LPTBBUTTONINFO) #define TB_GETBUTTONINFOW (WM_USER+63) #define TB_SETBUTTONINFOW (WM_USER+64) #define TB_GETBUTTONINFOA (WM_USER+65) #define TB_SETBUTTONINFOA (WM_USER+66) -#ifdef UNICODE -#define TB_GETBUTTONINFO TB_GETBUTTONINFOW -#define TB_SETBUTTONINFO TB_SETBUTTONINFOW -#else -#define TB_GETBUTTONINFO TB_GETBUTTONINFOA -#define TB_SETBUTTONINFO TB_SETBUTTONINFOA -#endif + +#define TB_GETBUTTONINFO __MINGW_NAME_AW(TB_GETBUTTONINFO) +#define TB_SETBUTTONINFO __MINGW_NAME_AW(TB_SETBUTTONINFO) #define TB_INSERTBUTTONW (WM_USER+67) #define TB_ADDBUTTONSW (WM_USER+68) #define TB_HITTEST (WM_USER+69) -#ifdef UNICODE -#define TB_INSERTBUTTON TB_INSERTBUTTONW -#define TB_ADDBUTTONS TB_ADDBUTTONSW -#else -#define TB_INSERTBUTTON TB_INSERTBUTTONA -#define TB_ADDBUTTONS TB_ADDBUTTONSA -#endif +#define TB_INSERTBUTTON __MINGW_NAME_AW(TB_INSERTBUTTON) +#define TB_ADDBUTTONS __MINGW_NAME_AW(TB_ADDBUTTONS) #define TB_SETDRAWTEXTFLAGS (WM_USER+70) #define TB_GETSTRINGW (WM_USER+91) #define TB_GETSTRINGA (WM_USER+92) -#ifdef UNICODE -#define TB_GETSTRING TB_GETSTRINGW -#else -#define TB_GETSTRING TB_GETSTRINGA -#endif + +#define TB_GETSTRING __MINGW_NAME_AW(TB_GETSTRING) #define TB_SETHOTITEM2 (WM_USER+94) #define TB_SETLISTGAP (WM_USER+96) @@ -1251,15 +1164,9 @@ LPARAM lParam; } NMTBGETINFOTIPW,*LPNMTBGETINFOTIPW; -#ifdef UNICODE -#define TBN_GETINFOTIP TBN_GETINFOTIPW -#define NMTBGETINFOTIP NMTBGETINFOTIPW -#define LPNMTBGETINFOTIP LPNMTBGETINFOTIPW -#else -#define TBN_GETINFOTIP TBN_GETINFOTIPA -#define NMTBGETINFOTIP NMTBGETINFOTIPA -#define LPNMTBGETINFOTIP LPNMTBGETINFOTIPA -#endif +#define TBN_GETINFOTIP __MINGW_NAME_AW(TBN_GETINFOTIP) +#define NMTBGETINFOTIP __MINGW_NAME_AW(NMTBGETINFOTIP) +#define LPNMTBGETINFOTIP __MINGW_NAME_AW(LPNMTBGETINFOTIP) #define TBNF_IMAGE 0x1 #define TBNF_TEXT 0x2 @@ -1285,25 +1192,15 @@ int cchText; } NMTBDISPINFOW,*LPNMTBDISPINFOW; -#ifdef UNICODE -#define TBN_GETDISPINFO TBN_GETDISPINFOW -#define NMTBDISPINFO NMTBDISPINFOW -#define LPNMTBDISPINFO LPNMTBDISPINFOW -#else -#define TBN_GETDISPINFO TBN_GETDISPINFOA -#define NMTBDISPINFO NMTBDISPINFOA -#define LPNMTBDISPINFO LPNMTBDISPINFOA -#endif +#define TBN_GETDISPINFO __MINGW_NAME_AW(TBN_GETDISPINFO) +#define NMTBDISPINFO __MINGW_NAME_AW(NMTBDISPINFO) +#define LPNMTBDISPINFO __MINGW_NAME_AW(LPNMTBDISPINFO) #define TBDDRET_DEFAULT 0 #define TBDDRET_NODEFAULT 1 #define TBDDRET_TREATPRESSED 2 -#ifdef UNICODE -#define TBN_GETBUTTONINFO TBN_GETBUTTONINFOW -#else -#define TBN_GETBUTTONINFO TBN_GETBUTTONINFOA -#endif +#define TBN_GETBUTTONINFO __MINGW_NAME_AW(TBN_GETBUTTONINFO) #define TBNOTIFYA NMTOOLBARA #define TBNOTIFYW NMTOOLBARW @@ -1331,13 +1228,9 @@ RECT rcButton; } NMTOOLBARW,*LPNMTOOLBARW; -#ifdef UNICODE -#define NMTOOLBAR NMTOOLBARW -#define LPNMTOOLBAR LPNMTOOLBARW -#else -#define NMTOOLBAR NMTOOLBARA -#define LPNMTOOLBAR LPNMTOOLBARA -#endif +#define NMTOOLBAR __MINGW_NAME_AW(NMTOOLBAR) +#define LPNMTOOLBAR __MINGW_NAME_AW(LPNMTOOLBAR) + #endif #ifndef NOREBAR @@ -1345,11 +1238,7 @@ #define REBARCLASSNAMEW L"ReBarWindow32" #define REBARCLASSNAMEA "ReBarWindow32" -#ifdef UNICODE -#define REBARCLASSNAME REBARCLASSNAMEW -#else -#define REBARCLASSNAME REBARCLASSNAMEA -#endif +#define REBARCLASSNAME __MINGW_NAME_AW(REBARCLASSNAME) #define RBIM_IMAGELIST 0x1 @@ -1449,19 +1338,14 @@ LPARAM lParam; UINT cxHeader; } REBARBANDINFOW,*LPREBARBANDINFOW; + typedef REBARBANDINFOW CONST *LPCREBARBANDINFOW; -#ifdef UNICODE -#define REBARBANDINFO REBARBANDINFOW -#define LPREBARBANDINFO LPREBARBANDINFOW -#define LPCREBARBANDINFO LPCREBARBANDINFOW -#define REBARBANDINFO_V3_SIZE REBARBANDINFOW_V3_SIZE -#else -#define REBARBANDINFO REBARBANDINFOA -#define LPREBARBANDINFO LPREBARBANDINFOA -#define LPCREBARBANDINFO LPCREBARBANDINFOA -#define REBARBANDINFO_V3_SIZE REBARBANDINFOA_V3_SIZE -#endif +#define REBARBANDINFO __MINGW_NAME_AW(REBARBANDINFO) +#define LPREBARBANDINFO __MINGW_NAME_AW(LPREBARBANDINFO) +#define LPCREBARBANDINFO __MINGW_NAME_AW(LPCREBARBANDINFO) + +#define REBARBANDINFO_V3_SIZE __MINGW_NAME_AW_EXT(REBARBANDINFO,_V3_SIZE) #define RB_INSERTBANDA (WM_USER+1) #define RB_DELETEBAND (WM_USER+2) @@ -1490,13 +1374,8 @@ #define RB_SETCOLORSCHEME CCM_SETCOLORSCHEME #define RB_GETCOLORSCHEME CCM_GETCOLORSCHEME -#ifdef UNICODE -#define RB_INSERTBAND RB_INSERTBANDW -#define RB_SETBANDINFO RB_SETBANDINFOW -#else -#define RB_INSERTBAND RB_INSERTBANDA -#define RB_SETBANDINFO RB_SETBANDINFOA -#endif +#define RB_INSERTBAND __MINGW_NAME_AW(RB_INSERTBAND) +#define RB_SETBANDINFO __MINGW_NAME_AW(RB_SETBANDINFO) #define RB_BEGINDRAG (WM_USER+24) #define RB_ENDDRAG (WM_USER+25) @@ -1505,11 +1384,7 @@ #define RB_GETBANDINFOW (WM_USER+28) #define RB_GETBANDINFOA (WM_USER+29) -#ifdef UNICODE -#define RB_GETBANDINFO RB_GETBANDINFOW -#else -#define RB_GETBANDINFO RB_GETBANDINFOA -#endif +#define RB_GETBANDINFO __MINGW_NAME_AW(RB_GETBANDINFO) #define RB_MINIMIZEBAND (WM_USER+30) #define RB_MAXIMIZEBAND (WM_USER+31) @@ -1605,11 +1480,8 @@ #define TOOLTIPS_CLASSW L"tooltips_class32" #define TOOLTIPS_CLASSA "tooltips_class32" -#ifdef UNICODE -#define TOOLTIPS_CLASS TOOLTIPS_CLASSW -#else -#define TOOLTIPS_CLASS TOOLTIPS_CLASSA -#endif + +#define TOOLTIPS_CLASS __MINGW_NAME_AW(TOOLTIPS_CLASS) #define LPTOOLINFOA LPTTTOOLINFOA #define LPTOOLINFOW LPTTTOOLINFOW @@ -1650,17 +1522,11 @@ void *lpReserved; } TTTOOLINFOW,NEAR *PTOOLINFOW,*LPTTTOOLINFOW; -#ifdef UNICODE -#define TTTOOLINFO TTTOOLINFOW -#define PTOOLINFO PTOOLINFOW -#define LPTTTOOLINFO LPTTTOOLINFOW -#define TTTOOLINFO_V1_SIZE TTTOOLINFOW_V1_SIZE -#else -#define PTOOLINFO PTOOLINFOA -#define TTTOOLINFO TTTOOLINFOA -#define LPTTTOOLINFO LPTTTOOLINFOA -#define TTTOOLINFO_V1_SIZE TTTOOLINFOA_V1_SIZE -#endif +#define TTTOOLINFO __MINGW_NAME_AW(TTTOOLINFO) +#define PTOOLINFO __MINGW_NAME_AW(PTOOLINFO) +#define LPTTTOOLINFO __MINGW_NAME_AW(LPTTTOOLINFO) + +#define TTTOOLINFO_V1_SIZE __MINGW_NAME_AW_EXT(TTTOOLINFO,_V1_SIZE) #define TTS_ALWAYSTIP 0x1 #define TTS_NOPREFIX 0x2 @@ -1744,31 +1610,18 @@ WCHAR *pszTitle; } TTGETTITLE,*PTTGETTITLE; -#ifdef UNICODE -#define TTM_ADDTOOL TTM_ADDTOOLW -#define TTM_DELTOOL TTM_DELTOOLW -#define TTM_NEWTOOLRECT TTM_NEWTOOLRECTW -#define TTM_GETTOOLINFO TTM_GETTOOLINFOW -#define TTM_SETTOOLINFO TTM_SETTOOLINFOW -#define TTM_HITTEST TTM_HITTESTW -#define TTM_GETTEXT TTM_GETTEXTW -#define TTM_UPDATETIPTEXT TTM_UPDATETIPTEXTW -#define TTM_ENUMTOOLS TTM_ENUMTOOLSW -#define TTM_GETCURRENTTOOL TTM_GETCURRENTTOOLW -#define TTM_SETTITLE TTM_SETTITLEW -#else -#define TTM_ADDTOOL TTM_ADDTOOLA -#define TTM_DELTOOL TTM_DELTOOLA -#define TTM_NEWTOOLRECT TTM_NEWTOOLRECTA -#define TTM_GETTOOLINFO TTM_GETTOOLINFOA -#define TTM_SETTOOLINFO TTM_SETTOOLINFOA -#define TTM_HITTEST TTM_HITTESTA -#define TTM_GETTEXT TTM_GETTEXTA -#define TTM_UPDATETIPTEXT TTM_UPDATETIPTEXTA -#define TTM_ENUMTOOLS TTM_ENUMTOOLSA -#define TTM_GETCURRENTTOOL TTM_GETCURRENTTOOLA -#define TTM_SETTITLE TTM_SETTITLEA -#endif +#define TTM_ADDTOOL __MINGW_NAME_AW(TTM_ADDTOOL) +#define TTM_DELTOOL __MINGW_NAME_AW(TTM_DELTOOL) +#define TTM_NEWTOOLRECT __MINGW_NAME_AW(TTM_NEWTOOLRECT) +#define TTM_GETTOOLINFO __MINGW_NAME_AW(TTM_GETTOOLINFO) +#define TTM_SETTOOLINFO __MINGW_NAME_AW(TTM_SETTOOLINFO) +#define TTM_HITTEST __MINGW_NAME_AW(TTM_HITTEST) +#define TTM_GETTEXT __MINGW_NAME_AW(TTM_GETTEXT) +#define TTM_UPDATETIPTEXT __MINGW_NAME_AW(TTM_UPDATETIPTEXT) +#define TTM_ENUMTOOLS __MINGW_NAME_AW(TTM_ENUMTOOLS) +#define TTM_GETCURRENTTOOL __MINGW_NAME_AW(TTM_GETCURRENTTOOL) +#define TTM_SETTITLE __MINGW_NAME_AW(TTM_SETTITLE) + #define TTM_SETWINDOWTHEME CCM_SETWINDOWTHEME #define LPHITTESTINFOW LPTTHITTESTINFOW @@ -1787,13 +1640,8 @@ TTTOOLINFOW ti; } TTHITTESTINFOW,*LPTTHITTESTINFOW; -#ifdef UNICODE -#define TTHITTESTINFO TTHITTESTINFOW -#define LPTTHITTESTINFO LPTTHITTESTINFOW -#else -#define TTHITTESTINFO TTHITTESTINFOA -#define LPTTHITTESTINFO LPTTHITTESTINFOA -#endif +#define TTHITTESTINFO __MINGW_NAME_AW(TTHITTESTINFO) +#define LPTTHITTESTINFO __MINGW_NAME_AW(LPTTHITTESTINFO) #define TTN_GETDISPINFOA (TTN_FIRST - 0) #define TTN_GETDISPINFOW (TTN_FIRST - 10) @@ -1801,11 +1649,7 @@ #define TTN_POP (TTN_FIRST - 2) #define TTN_LINKCLICK (TTN_FIRST - 3) -#ifdef UNICODE -#define TTN_GETDISPINFO TTN_GETDISPINFOW -#else -#define TTN_GETDISPINFO TTN_GETDISPINFOA -#endif +#define TTN_GETDISPINFO __MINGW_NAME_AW(TTN_GETDISPINFO) #define TTN_NEEDTEXT TTN_GETDISPINFO #define TTN_NEEDTEXTA TTN_GETDISPINFOA @@ -1840,15 +1684,11 @@ LPARAM lParam; } NMTTDISPINFOW,*LPNMTTDISPINFOW; -#ifdef UNICODE -#define NMTTDISPINFO NMTTDISPINFOW -#define LPNMTTDISPINFO LPNMTTDISPINFOW -#define NMTTDISPINFO_V1_SIZE NMTTDISPINFOW_V1_SIZE -#else -#define NMTTDISPINFO NMTTDISPINFOA -#define LPNMTTDISPINFO LPNMTTDISPINFOA -#define NMTTDISPINFO_V1_SIZE NMTTDISPINFOA_V1_SIZE -#endif + +#define NMTTDISPINFO __MINGW_NAME_AW(NMTTDISPINFO) +#define LPNMTTDISPINFO __MINGW_NAME_AW(LPNMTTDISPINFO) + +#define NMTTDISPINFO_V1_SIZE __MINGW_NAME_AW_EXT(NMTTDISPINFO,_V1_SIZE) #endif #ifndef NOSTATUSBAR @@ -1863,21 +1703,13 @@ WINCOMMCTRLAPI HWND WINAPI CreateStatusWindowA(LONG style,LPCSTR lpszText,HWND hwndParent,UINT wID); WINCOMMCTRLAPI HWND WINAPI CreateStatusWindowW(LONG style,LPCWSTR lpszText,HWND hwndParent,UINT wID); -#ifdef UNICODE -#define CreateStatusWindow CreateStatusWindowW -#define DrawStatusText DrawStatusTextW -#else -#define CreateStatusWindow CreateStatusWindowA -#define DrawStatusText DrawStatusTextA -#endif +#define CreateStatusWindow __MINGW_NAME_AW(CreateStatusWindow) +#define DrawStatusText __MINGW_NAME_AW(DrawStatusText) #define STATUSCLASSNAMEW L"msctls_statusbar32" #define STATUSCLASSNAMEA "msctls_statusbar32" -#ifdef UNICODE -#define STATUSCLASSNAME STATUSCLASSNAMEW -#else -#define STATUSCLASSNAME STATUSCLASSNAMEA -#endif + +#define STATUSCLASSNAME __MINGW_NAME_AW(STATUSCLASSNAME) #define SB_SETTEXTA (WM_USER+1) #define SB_SETTEXTW (WM_USER+11) @@ -1886,19 +1718,11 @@ #define SB_GETTEXTLENGTHA (WM_USER+3) #define SB_GETTEXTLENGTHW (WM_USER+12) -#ifdef UNICODE -#define SB_GETTEXT SB_GETTEXTW -#define SB_SETTEXT SB_SETTEXTW -#define SB_GETTEXTLENGTH SB_GETTEXTLENGTHW -#define SB_SETTIPTEXT SB_SETTIPTEXTW -#define SB_GETTIPTEXT SB_GETTIPTEXTW -#else -#define SB_GETTEXT SB_GETTEXTA -#define SB_SETTEXT SB_SETTEXTA -#define SB_GETTEXTLENGTH SB_GETTEXTLENGTHA -#define SB_SETTIPTEXT SB_SETTIPTEXTA -#define SB_GETTIPTEXT SB_GETTIPTEXTA -#endif +#define SB_GETTEXT __MINGW_NAME_AW(SB_GETTEXT) +#define SB_SETTEXT __MINGW_NAME_AW(SB_SETTEXT) +#define SB_GETTEXTLENGTH __MINGW_NAME_AW(SB_GETTEXTLENGTH) +#define SB_SETTIPTEXT __MINGW_NAME_AW(SB_SETTIPTEXT) +#define SB_GETTIPTEXT __MINGW_NAME_AW(SB_GETTIPTEXT) #define SB_SETPARTS (WM_USER+4) #define SB_GETPARTS (WM_USER+6) @@ -1942,11 +1766,8 @@ #define TRACKBAR_CLASSA "msctls_trackbar32" #define TRACKBAR_CLASSW L"msctls_trackbar32" -#ifdef UNICODE -#define TRACKBAR_CLASS TRACKBAR_CLASSW -#else -#define TRACKBAR_CLASS TRACKBAR_CLASSA -#endif + +#define TRACKBAR_CLASS __MINGW_NAME_AW(TRACKBAR_CLASS) #define TBS_AUTOTICKS 0x1 #define TBS_VERT 0x2 @@ -2051,11 +1872,8 @@ #define UPDOWN_CLASSA "msctls_updown32" #define UPDOWN_CLASSW L"msctls_updown32" -#ifdef UNICODE -#define UPDOWN_CLASS UPDOWN_CLASSW -#else -#define UPDOWN_CLASS UPDOWN_CLASSA -#endif + +#define UPDOWN_CLASS __MINGW_NAME_AW(UPDOWN_CLASS) typedef struct _UDACCEL { UINT nSec; @@ -2110,11 +1928,8 @@ #define PROGRESS_CLASSA "msctls_progress32" #define PROGRESS_CLASSW L"msctls_progress32" -#ifdef UNICODE -#define PROGRESS_CLASS PROGRESS_CLASSW -#else -#define PROGRESS_CLASS PROGRESS_CLASSA -#endif + +#define PROGRESS_CLASS __MINGW_NAME_AW(PROGRESS_CLASS) #define PBS_SMOOTH 0x1 #define PBS_VERTICAL 0x4 @@ -2173,11 +1988,8 @@ #define HOTKEY_CLASSA "msctls_hotkey32" #define HOTKEY_CLASSW L"msctls_hotkey32" -#ifdef UNICODE -#define HOTKEY_CLASS HOTKEY_CLASSW -#else -#define HOTKEY_CLASS HOTKEY_CLASSA -#endif + +#define HOTKEY_CLASS __MINGW_NAME_AW(HOTKEY_CLASS) #endif #define CCS_TOP 0x1L @@ -2196,11 +2008,8 @@ #define WC_LISTVIEWA "SysListView32" #define WC_LISTVIEWW L"SysListView32" -#ifdef UNICODE -#define WC_LISTVIEW WC_LISTVIEWW -#else -#define WC_LISTVIEW WC_LISTVIEWA -#endif + +#define WC_LISTVIEW __MINGW_NAME_AW(WC_LISTVIEW) #define LVS_ICON 0x0 #define LVS_REPORT 0x1 @@ -2239,9 +2048,9 @@ #define LVM_GETIMAGELIST (LVM_FIRST+2) #define ListView_GetImageList(hwnd,iImageList) (HIMAGELIST)SNDMSG((hwnd),LVM_GETIMAGELIST,(WPARAM)(INT)(iImageList),0L) -#define LVSIL_NORMAL 0 -#define LVSIL_SMALL 1 -#define LVSIL_STATE 2 +#define LVSIL_NORMAL 0 +#define LVSIL_SMALL 1 +#define LVSIL_STATE 2 #define LVSIL_GROUPHEADER 3 #define LVM_SETIMAGELIST (LVM_FIRST+3) @@ -2316,23 +2125,15 @@ PUINT puColumns; } LVITEMW,*LPLVITEMW; -#ifdef UNICODE -#define LVITEM LVITEMW -#define LPLVITEM LPLVITEMW -#define LVITEM_V1_SIZE LVITEMW_V1_SIZE -#else -#define LVITEM LVITEMA -#define LPLVITEM LPLVITEMA -#define LVITEM_V1_SIZE LVITEMA_V1_SIZE -#endif +#define LVITEM __MINGW_NAME_AW(LVITEM) +#define LPLVITEM __MINGW_NAME_AW(LPLVITEM) + +#define LVITEM_V1_SIZE __MINGW_NAME_AW_EXT(LVITEM,_V1_SIZE) #define LPSTR_TEXTCALLBACKW ((LPWSTR)-1L) #define LPSTR_TEXTCALLBACKA ((LPSTR)-1L) -#ifdef UNICODE -#define LPSTR_TEXTCALLBACK LPSTR_TEXTCALLBACKW -#else -#define LPSTR_TEXTCALLBACK LPSTR_TEXTCALLBACKA -#endif + +#define LPSTR_TEXTCALLBACK __MINGW_NAME_AW(LPSTR_TEXTCALLBACK) #define I_IMAGECALLBACK (-1) #define I_IMAGENONE (-2) @@ -2340,31 +2141,23 @@ #define LVM_GETITEMA (LVM_FIRST+5) #define LVM_GETITEMW (LVM_FIRST+75) -#ifdef UNICODE -#define LVM_GETITEM LVM_GETITEMW -#else -#define LVM_GETITEM LVM_GETITEMA -#endif + +#define LVM_GETITEM __MINGW_NAME_AW(LVM_GETITEM) #define ListView_GetItem(hwnd,pitem) (WINBOOL)SNDMSG((hwnd),LVM_GETITEM,0,(LPARAM)(LV_ITEM *)(pitem)) #define LVM_SETITEMA (LVM_FIRST+6) #define LVM_SETITEMW (LVM_FIRST+76) -#ifdef UNICODE -#define LVM_SETITEM LVM_SETITEMW -#else -#define LVM_SETITEM LVM_SETITEMA -#endif + +#define LVM_SETITEM __MINGW_NAME_AW(LVM_SETITEM) #define ListView_SetItem(hwnd,pitem) (WINBOOL)SNDMSG((hwnd),LVM_SETITEM,0,(LPARAM)(const LV_ITEM *)(pitem)) #define LVM_INSERTITEMA (LVM_FIRST+7) #define LVM_INSERTITEMW (LVM_FIRST+77) -#ifdef UNICODE -#define LVM_INSERTITEM LVM_INSERTITEMW -#else -#define LVM_INSERTITEM LVM_INSERTITEMA -#endif + +#define LVM_INSERTITEM __MINGW_NAME_AW(LVM_INSERTITEM) + #define ListView_InsertItem(hwnd,pitem) (int)SNDMSG((hwnd),LVM_INSERTITEM,0,(LPARAM)(const LV_ITEM *)(pitem)) #define LVM_DELETEITEM (LVM_FIRST+8) @@ -2393,12 +2186,12 @@ #define LVM_GETNEXTITEM (LVM_FIRST+12) #define ListView_GetNextItem(hwnd,i,flags) (int)SNDMSG((hwnd),LVM_GETNEXTITEM,(WPARAM)(int)(i),MAKELPARAM((flags),0)) -#define LVFI_PARAM 0x1 -#define LVFI_STRING 0x2 -#define LVFI_SUBSTRING 0x4 -#define LVFI_PARTIAL 0x8 -#define LVFI_WRAP 0x20 -#define LVFI_NEARESTXY 0x40 +#define LVFI_PARAM 0x0001 +#define LVFI_STRING 0x0002 +#define LVFI_SUBSTRING 0x0004 +#define LVFI_PARTIAL 0x0008 +#define LVFI_WRAP 0x0020 +#define LVFI_NEARESTXY 0x0040 #define LV_FINDINFOA LVFINDINFOA #define LV_FINDINFOW LVFINDINFOW @@ -2420,19 +2213,12 @@ UINT vkDirection; } LVFINDINFOW,*LPFINDINFOW; -#ifdef UNICODE -#define LVFINDINFO LVFINDINFOW -#else -#define LVFINDINFO LVFINDINFOA -#endif +#define LVFINDINFO __MINGW_NAME_AW(LVFINDINFO) #define LVM_FINDITEMA (LVM_FIRST+13) #define LVM_FINDITEMW (LVM_FIRST+83) -#ifdef UNICODE -#define LVM_FINDITEM LVM_FINDITEMW -#else -#define LVM_FINDITEM LVM_FINDITEMA -#endif + +#define LVM_FINDITEM __MINGW_NAME_AW(LVM_FINDITEM) #define ListView_FindItem(hwnd,iStart,plvfi) (int)SNDMSG((hwnd),LVM_FINDITEM,(WPARAM)(int)(iStart),(LPARAM)(const LV_FINDINFO *)(plvfi)) @@ -2452,11 +2238,8 @@ #define LVM_GETSTRINGWIDTHA (LVM_FIRST+17) #define LVM_GETSTRINGWIDTHW (LVM_FIRST+87) -#ifdef UNICODE -#define LVM_GETSTRINGWIDTH LVM_GETSTRINGWIDTHW -#else -#define LVM_GETSTRINGWIDTH LVM_GETSTRINGWIDTHA -#endif + +#define LVM_GETSTRINGWIDTH __MINGW_NAME_AW(LVM_GETSTRINGWIDTH) #define ListView_GetStringWidth(hwndLV,psz) (int)SNDMSG((hwndLV),LVM_GETSTRINGWIDTH,0,(LPARAM)(LPCTSTR)(psz)) @@ -2504,11 +2287,8 @@ #define LVM_EDITLABELA (LVM_FIRST+23) #define LVM_EDITLABELW (LVM_FIRST+118) -#ifdef UNICODE -#define LVM_EDITLABEL LVM_EDITLABELW -#else -#define LVM_EDITLABEL LVM_EDITLABELA -#endif + +#define LVM_EDITLABEL __MINGW_NAME_AW(LVM_EDITLABEL) #define ListView_EditLabel(hwndLV,i) (HWND)SNDMSG((hwndLV),LVM_EDITLABEL,(WPARAM)(int)(i),0L) @@ -2533,33 +2313,28 @@ int iOrder; } LVCOLUMNA,*LPLVCOLUMNA; - typedef struct tagLVCOLUMNW { - UINT mask; - int fmt; - int cx; - LPWSTR pszText; - int cchTextMax; - int iSubItem; - #if (_WIN32_IE >= 0x0300) - int iImage; - int iOrder; - #endif - #if (_WIN32_WINNT >= 0x0600) - int cxMin; - int cxDefault; - int cxIdeal; - #endif + typedef struct tagLVCOLUMNW { + UINT mask; + int fmt; + int cx; + LPWSTR pszText; + int cchTextMax; + int iSubItem; +# if (_WIN32_IE >= 0x0300) + int iImage; + int iOrder; +# endif +# if (_WIN32_WINNT >= 0x0600) + int cxMin; + int cxDefault; + int cxIdeal; +# endif } LVCOLUMNW,*LPLVCOLUMNW; -#ifdef UNICODE -#define LVCOLUMN LVCOLUMNW -#define LPLVCOLUMN LPLVCOLUMNW -#define LVCOLUMN_V1_SIZE LVCOLUMNW_V1_SIZE -#else -#define LVCOLUMN LVCOLUMNA -#define LPLVCOLUMN LPLVCOLUMNA -#define LVCOLUMN_V1_SIZE LVCOLUMNA_V1_SIZE -#endif +#define LVCOLUMN __MINGW_NAME_AW(LVCOLUMN) +#define LPLVCOLUMN __MINGW_NAME_AW(LPLVCOLUMN) + +#define LVCOLUMN_V1_SIZE __MINGW_NAME_AW_EXT(LVCOLUMN,_V1_SIZE) #define LVCF_FMT 0x1 #define LVCF_WIDTH 0x2 @@ -2594,31 +2369,22 @@ #define LVM_GETCOLUMNA (LVM_FIRST+25) #define LVM_GETCOLUMNW (LVM_FIRST+95) -#ifdef UNICODE -#define LVM_GETCOLUMN LVM_GETCOLUMNW -#else -#define LVM_GETCOLUMN LVM_GETCOLUMNA -#endif + +#define LVM_GETCOLUMN __MINGW_NAME_AW(LVM_GETCOLUMN) #define ListView_GetColumn(hwnd,iCol,pcol) (WINBOOL)SNDMSG((hwnd),LVM_GETCOLUMN,(WPARAM)(int)(iCol),(LPARAM)(LV_COLUMN *)(pcol)) #define LVM_SETCOLUMNA (LVM_FIRST+26) #define LVM_SETCOLUMNW (LVM_FIRST+96) -#ifdef UNICODE -#define LVM_SETCOLUMN LVM_SETCOLUMNW -#else -#define LVM_SETCOLUMN LVM_SETCOLUMNA -#endif + +#define LVM_SETCOLUMN __MINGW_NAME_AW(LVM_SETCOLUMN) #define ListView_SetColumn(hwnd,iCol,pcol) (WINBOOL)SNDMSG((hwnd),LVM_SETCOLUMN,(WPARAM)(int)(iCol),(LPARAM)(const LV_COLUMN *)(pcol)) #define LVM_INSERTCOLUMNA (LVM_FIRST+27) #define LVM_INSERTCOLUMNW (LVM_FIRST+97) -#ifdef UNICODE -#define LVM_INSERTCOLUMN LVM_INSERTCOLUMNW -#else -#define LVM_INSERTCOLUMN LVM_INSERTCOLUMNA -#endif + +#define LVM_INSERTCOLUMN __MINGW_NAME_AW(LVM_INSERTCOLUMN) #define ListView_InsertColumn(hwnd,iCol,pcol) (int)SNDMSG((hwnd),LVM_INSERTCOLUMN,(WPARAM)(int)(iCol),(LPARAM)(const LV_COLUMN *)(pcol)) @@ -2666,22 +2432,14 @@ #define LVM_GETITEMTEXTA (LVM_FIRST+45) #define LVM_GETITEMTEXTW (LVM_FIRST+115) -#ifdef UNICODE -#define LVM_GETITEMTEXT LVM_GETITEMTEXTW -#else -#define LVM_GETITEMTEXT LVM_GETITEMTEXTA -#endif +#define LVM_GETITEMTEXT __MINGW_NAME_AW(LVM_GETITEMTEXT) #define ListView_GetItemText(hwndLV,i,iSubItem_,pszText_,cchTextMax_) { LV_ITEM _ms_lvi; _ms_lvi.iSubItem = iSubItem_; _ms_lvi.cchTextMax = cchTextMax_; _ms_lvi.pszText = pszText_; SNDMSG((hwndLV),LVM_GETITEMTEXT,(WPARAM)(i),(LPARAM)(LV_ITEM *)&_ms_lvi);} #define LVM_SETITEMTEXTA (LVM_FIRST+46) #define LVM_SETITEMTEXTW (LVM_FIRST+116) -#ifdef UNICODE -#define LVM_SETITEMTEXT LVM_SETITEMTEXTW -#else -#define LVM_SETITEMTEXT LVM_SETITEMTEXTA -#endif +#define LVM_SETITEMTEXT __MINGW_NAME_AW(LVM_SETITEMTEXT) #define ListView_SetItemText(hwndLV,i,iSubItem_,pszText_) { LV_ITEM _ms_lvi; _ms_lvi.iSubItem = iSubItem_; _ms_lvi.pszText = pszText_; SNDMSG((hwndLV),LVM_SETITEMTEXT,(WPARAM)(i),(LPARAM)(LV_ITEM *)&_ms_lvi);} @@ -2709,11 +2467,7 @@ #define LVM_GETISEARCHSTRINGA (LVM_FIRST+52) #define LVM_GETISEARCHSTRINGW (LVM_FIRST+117) -#ifdef UNICODE -#define LVM_GETISEARCHSTRING LVM_GETISEARCHSTRINGW -#else -#define LVM_GETISEARCHSTRING LVM_GETISEARCHSTRINGA -#endif +#define LVM_GETISEARCHSTRING __MINGW_NAME_AW(LVM_GETISEARCHSTRING) #define ListView_GetISearchString(hwndLV,lpsz) (WINBOOL)SNDMSG((hwndLV),LVM_GETISEARCHSTRING,0,(LPARAM)(LPTSTR)(lpsz)) @@ -3017,17 +2771,10 @@ #define LVM_ISITEMVISIBLE (LVM_FIRST+182) #define ListView_IsItemVisible(hwnd,index) (UINT)SNDMSG((hwnd),LVM_ISITEMVISIBLE,(WPARAM)(index),(LPARAM)0) -#ifdef UNICODE -#define LVBKIMAGE LVBKIMAGEW -#define LPLVBKIMAGE LPLVBKIMAGEW -#define LVM_SETBKIMAGE LVM_SETBKIMAGEW -#define LVM_GETBKIMAGE LVM_GETBKIMAGEW -#else -#define LVBKIMAGE LVBKIMAGEA -#define LPLVBKIMAGE LPLVBKIMAGEA -#define LVM_SETBKIMAGE LVM_SETBKIMAGEA -#define LVM_GETBKIMAGE LVM_GETBKIMAGEA -#endif +#define LVBKIMAGE __MINGW_NAME_AW(LVBKIMAGE) +#define LPLVBKIMAGE __MINGW_NAME_AW(LPLVBKIMAGE) +#define LVM_SETBKIMAGE __MINGW_NAME_AW(LVM_SETBKIMAGE) +#define LVM_GETBKIMAGE __MINGW_NAME_AW(LVM_GETBKIMAGE) #define ListView_SetBkImage(hwnd,plvbki) (WINBOOL)SNDMSG((hwnd),LVM_SETBKIMAGE,0,(LPARAM)(plvbki)) #define ListView_GetBkImage(hwnd,plvbki) (WINBOOL)SNDMSG((hwnd),LVM_GETBKIMAGE,0,(LPARAM)(plvbki)) @@ -3115,19 +2862,11 @@ #define LPNM_FINDITEMW LPNMLVFINDITEMW #define NM_FINDITEMW NMLVFINDITEMW -#ifdef UNICODE -#define PNM_FINDITEM PNM_FINDITEMW -#define LPNM_FINDITEM LPNM_FINDITEMW -#define NM_FINDITEM NM_FINDITEMW -#define NMLVFINDITEM NMLVFINDITEMW -#define LPNMLVFINDITEM LPNMLVFINDITEMW -#else -#define PNM_FINDITEM PNM_FINDITEMA -#define LPNM_FINDITEM LPNM_FINDITEMA -#define NM_FINDITEM NM_FINDITEMA -#define NMLVFINDITEM NMLVFINDITEMA -#define LPNMLVFINDITEM LPNMLVFINDITEMA -#endif +#define PNM_FINDITEM __MINGW_NAME_AW(PNM_FINDITEM) +#define LPNM_FINDITEM __MINGW_NAME_AW(LPNM_FINDITEM) +#define NM_FINDITEM __MINGW_NAME_AW(NM_FINDITEM) +#define NMLVFINDITEM __MINGW_NAME_AW(NMLVFINDITEM) +#define LPNMLVFINDITEM __MINGW_NAME_AW(LPNMLVFINDITEM) typedef struct tagNMLVODSTATECHANGE { NMHDR hdr; @@ -3161,11 +2900,7 @@ #define LVN_ITEMACTIVATE (LVN_FIRST-14) #define LVN_ODSTATECHANGED (LVN_FIRST-15) -#ifdef UNICODE -#define LVN_ODFINDITEM LVN_ODFINDITEMW -#else -#define LVN_ODFINDITEM LVN_ODFINDITEMA -#endif +#define LVN_ODFINDITEM __MINGW_NAME_AW(LVN_ODFINDITEM) #define LVN_HOTTRACK (LVN_FIRST-21) #define LVN_GETDISPINFOA (LVN_FIRST-50) @@ -3173,17 +2908,10 @@ #define LVN_SETDISPINFOA (LVN_FIRST-51) #define LVN_SETDISPINFOW (LVN_FIRST-78) -#ifdef UNICODE -#define LVN_BEGINLABELEDIT LVN_BEGINLABELEDITW -#define LVN_ENDLABELEDIT LVN_ENDLABELEDITW -#define LVN_GETDISPINFO LVN_GETDISPINFOW -#define LVN_SETDISPINFO LVN_SETDISPINFOW -#else -#define LVN_BEGINLABELEDIT LVN_BEGINLABELEDITA -#define LVN_ENDLABELEDIT LVN_ENDLABELEDITA -#define LVN_GETDISPINFO LVN_GETDISPINFOA -#define LVN_SETDISPINFO LVN_SETDISPINFOA -#endif +#define LVN_BEGINLABELEDIT __MINGW_NAME_AW(LVN_BEGINLABELEDIT) +#define LVN_ENDLABELEDIT __MINGW_NAME_AW(LVN_ENDLABELEDIT) +#define LVN_GETDISPINFO __MINGW_NAME_AW(LVN_GETDISPINFO) +#define LVN_SETDISPINFO __MINGW_NAME_AW(LVN_SETDISPINFO) #define LVIF_DI_SETITEM 0x1000 @@ -3201,11 +2929,7 @@ LVITEMW item; } NMLVDISPINFOW,*LPNMLVDISPINFOW; -#ifdef UNICODE -#define NMLVDISPINFO NMLVDISPINFOW -#else -#define NMLVDISPINFO NMLVDISPINFOA -#endif +#define NMLVDISPINFO __MINGW_NAME_AW(NMLVDISPINFO) #define LVN_KEYDOWN (LVN_FIRST-55) @@ -3248,15 +2972,9 @@ #define LVN_GETINFOTIPA (LVN_FIRST-57) #define LVN_GETINFOTIPW (LVN_FIRST-58) -#ifdef UNICODE -#define LVN_GETINFOTIP LVN_GETINFOTIPW -#define NMLVGETINFOTIP NMLVGETINFOTIPW -#define LPNMLVGETINFOTIP LPNMLVGETINFOTIPW -#else -#define LVN_GETINFOTIP LVN_GETINFOTIPA -#define NMLVGETINFOTIP NMLVGETINFOTIPA -#define LPNMLVGETINFOTIP LPNMLVGETINFOTIPA -#endif +#define LVN_GETINFOTIP __MINGW_NAME_AW(LVN_GETINFOTIP) +#define NMLVGETINFOTIP __MINGW_NAME_AW(NMLVGETINFOTIP) +#define LPNMLVGETINFOTIP __MINGW_NAME_AW(LPNMLVGETINFOTIP) typedef struct tagNMLVSCROLL { NMHDR hdr; @@ -3272,11 +2990,8 @@ #define WC_TREEVIEWA "SysTreeView32" #define WC_TREEVIEWW L"SysTreeView32" -#ifdef UNICODE -#define WC_TREEVIEW WC_TREEVIEWW -#else -#define WC_TREEVIEW WC_TREEVIEWA -#endif + +#define WC_TREEVIEW __MINGW_NAME_AW(WC_TREEVIEW) #define TVS_HASBUTTONS 0x1 #define TVS_HASLINES 0x2 @@ -3304,10 +3019,13 @@ #define TVIF_HANDLE 0x10 #define TVIF_SELECTEDIMAGE 0x20 #define TVIF_CHILDREN 0x40 +#if(_WIN32_IE >= 0x0400) #define TVIF_INTEGRAL 0x80 -#define TVIF_STATEEX 0x100 +#endif +#if(_WIN32_IE >= 0x0600) +#define TVIF_STATEEX 0x100 #define TVIF_EXPANDEDIMAGE 0x200 -#define TVIF_DI_SETITEM 0x1000 +#endif #define TVIS_SELECTED 0x2 #define TVIS_CUT 0x4 #define TVIS_DROPHILITED 0x8 @@ -3368,37 +3086,33 @@ int iIntegral; } TVITEMEXA,*LPTVITEMEXA; -typedef struct tagTVITEMEXW { - UINT mask; - HTREEITEM hItem; - UINT state; - UINT stateMask; - LPWSTR pszText; - INT cchTextMax; - INT iImage; - INT iSelectedImage; - INT cChildren; - LPARAM lParam; - INT iIntegral; - UINT uStateEx; /* _WIN32_IE >= 0x600 */ - HWND hwnd; /* _WIN32_IE >= 0x600 */ - INT iExpandedImage; /* _WIN32_IE >= 0x600 */ -} TVITEMEXW, *LPTVITEMEXW; -#ifdef UNICODE - typedef TVITEMEXW TVITEMEX; - typedef LPTVITEMEXW LPTVITEMEX; -#else - typedef TVITEMEXA TVITEMEX; - typedef LPTVITEMEXA LPTVITEMEX; -#endif - -#ifdef UNICODE -#define TVITEM TVITEMW -#define LPTVITEM LPTVITEMW -#else -#define TVITEM TVITEMA -#define LPTVITEM LPTVITEMA -#endif + typedef struct tagTVITEMEXW { + UINT mask; + HTREEITEM hItem; + UINT state; + UINT stateMask; + LPWSTR pszText; + int cchTextMax; + int iImage; + int iSelectedImage; + int cChildren; + LPARAM lParam; + int iIntegral; +#if(_WIN32_IE >= 0x0600) + UINT uStateEx; + HWND hwnd; + int iExpandedImage; +#endif +#if(NTDDI_VERSION >= NTDDI_WIN7) + int iReserved; +#endif + } TVITEMEXW, *LPTVITEMEXW; + + __MINGW_TYPEDEF_AW(TVITEMEX) + __MINGW_TYPEDEF_AW(LPTVITEMEX) + +#define TVITEM __MINGW_NAME_AW(TVITEM) +#define LPTVITEM __MINGW_NAME_AW(LPTVITEM) #define TVI_ROOT ((HTREEITEM)(ULONG_PTR)-0x10000) #define TVI_FIRST ((HTREEITEM)(ULONG_PTR)-0xffff) @@ -3418,7 +3132,7 @@ typedef struct tagTVINSERTSTRUCTA { HTREEITEM hParent; HTREEITEM hInsertAfter; - __MINGW_EXTENSION union { + __C89_NAMELESS union { TVITEMEXA itemex; TV_ITEMA item; } DUMMYUNIONNAME; @@ -3427,29 +3141,22 @@ typedef struct tagTVINSERTSTRUCTW { HTREEITEM hParent; HTREEITEM hInsertAfter; - __MINGW_EXTENSION union { + __C89_NAMELESS union { TVITEMEXW itemex; TV_ITEMW item; } DUMMYUNIONNAME; } TVINSERTSTRUCTW,*LPTVINSERTSTRUCTW; -#ifdef UNICODE -#define TVINSERTSTRUCT TVINSERTSTRUCTW -#define LPTVINSERTSTRUCT LPTVINSERTSTRUCTW -#define TVINSERTSTRUCT_V1_SIZE TVINSERTSTRUCTW_V1_SIZE -#else -#define TVINSERTSTRUCT TVINSERTSTRUCTA -#define LPTVINSERTSTRUCT LPTVINSERTSTRUCTA -#define TVINSERTSTRUCT_V1_SIZE TVINSERTSTRUCTA_V1_SIZE -#endif + +#define TVINSERTSTRUCT __MINGW_NAME_AW(TVINSERTSTRUCT) +#define LPTVINSERTSTRUCT __MINGW_NAME_AW(LPTVINSERTSTRUCT) + +#define TVINSERTSTRUCT_V1_SIZE __MINGW_NAME_AW_EXT(TVINSERTSTRUCT,_V1_SIZE) #define TVM_INSERTITEMA (TV_FIRST+0) #define TVM_INSERTITEMW (TV_FIRST+50) -#ifdef UNICODE -#define TVM_INSERTITEM TVM_INSERTITEMW -#else -#define TVM_INSERTITEM TVM_INSERTITEMA -#endif + +#define TVM_INSERTITEM __MINGW_NAME_AW(TVM_INSERTITEM) #define TreeView_InsertItem(hwnd,lpis) (HTREEITEM)SNDMSG((hwnd),TVM_INSERTITEM,0,(LPARAM)(LPTV_INSERTSTRUCT)(lpis)) @@ -3527,32 +3234,21 @@ #define TVM_GETITEMA (TV_FIRST+12) #define TVM_GETITEMW (TV_FIRST+62) -#ifdef UNICODE -#define TVM_GETITEM TVM_GETITEMW -#else -#define TVM_GETITEM TVM_GETITEMA -#endif +#define TVM_GETITEM __MINGW_NAME_AW(TVM_GETITEM) #define TreeView_GetItem(hwnd,pitem) (WINBOOL)SNDMSG((hwnd),TVM_GETITEM,0,(LPARAM)(TV_ITEM *)(pitem)) #define TVM_SETITEMA (TV_FIRST+13) #define TVM_SETITEMW (TV_FIRST+63) -#ifdef UNICODE -#define TVM_SETITEM TVM_SETITEMW -#else -#define TVM_SETITEM TVM_SETITEMA -#endif +#define TVM_SETITEM __MINGW_NAME_AW(TVM_SETITEM) #define TreeView_SetItem(hwnd,pitem) (WINBOOL)SNDMSG((hwnd),TVM_SETITEM,0,(LPARAM)(const TV_ITEM *)(pitem)) #define TVM_EDITLABELA (TV_FIRST+14) #define TVM_EDITLABELW (TV_FIRST+65) -#ifdef UNICODE -#define TVM_EDITLABEL TVM_EDITLABELW -#else -#define TVM_EDITLABEL TVM_EDITLABELA -#endif + +#define TVM_EDITLABEL __MINGW_NAME_AW(TVM_EDITLABEL) #define TreeView_EditLabel(hwnd,hitem) (HWND)SNDMSG((hwnd),TVM_EDITLABEL,0,(LPARAM)(HTREEITEM)(hitem)) @@ -3606,11 +3302,7 @@ #define TVM_GETISEARCHSTRINGA (TV_FIRST+23) #define TVM_GETISEARCHSTRINGW (TV_FIRST+64) -#ifdef UNICODE -#define TVM_GETISEARCHSTRING TVM_GETISEARCHSTRINGW -#else -#define TVM_GETISEARCHSTRING TVM_GETISEARCHSTRINGA -#endif +#define TVM_GETISEARCHSTRING __MINGW_NAME_AW(TVM_GETISEARCHSTRING) #define TVM_SETTOOLTIPS (TV_FIRST+24) #define TreeView_SetToolTips(hwnd,hwndTT) (HWND)SNDMSG((hwnd),TVM_SETTOOLTIPS,(WPARAM)(hwndTT),0) @@ -3696,13 +3388,8 @@ POINT ptDrag; } NMTREEVIEWW,*LPNMTREEVIEWW; -#ifdef UNICODE -#define NMTREEVIEW NMTREEVIEWW -#define LPNMTREEVIEW LPNMTREEVIEWW -#else -#define NMTREEVIEW NMTREEVIEWA -#define LPNMTREEVIEW LPNMTREEVIEWA -#endif +#define NMTREEVIEW __MINGW_NAME_AW(NMTREEVIEW) +#define LPNMTREEVIEW __MINGW_NAME_AW(LPNMTREEVIEW) #define TVN_SELCHANGINGA (TVN_FIRST-1) #define TVN_SELCHANGINGW (TVN_FIRST-50) @@ -3734,13 +3421,8 @@ TVITEMW item; } NMTVDISPINFOW,*LPNMTVDISPINFOW; -#ifdef UNICODE -#define NMTVDISPINFO NMTVDISPINFOW -#define LPNMTVDISPINFO LPNMTVDISPINFOW -#else -#define NMTVDISPINFO NMTVDISPINFOA -#define LPNMTVDISPINFO LPNMTVDISPINFOA -#endif +#define NMTVDISPINFO __MINGW_NAME_AW(NMTVDISPINFO) +#define LPNMTVDISPINFO __MINGW_NAME_AW(LPNMTVDISPINFO) #if (_WIN32_IE >= 0x0600) @@ -3754,13 +3436,8 @@ TVITEMEXW item; } NMTVDISPINFOEXW, *LPNMTVDISPINFOEXW; -#ifdef UNICODE -#define NMTVDISPINFOEX NMTVDISPINFOEXW -#define LPNMTVDISPINFOEX LPNMTVDISPINFOEXW -#else -#define NMTVDISPINFOEX NMTVDISPINFOEXA -#define LPNMTVDISPINFOEX LPNMTVDISPINFOEXA -#endif /* UNICODE */ +#define NMTVDISPINFOEX __MINGW_NAME_AW(NMTVDISPINFOEX) +#define LPNMTVDISPINFOEX __MINGW_NAME_AW(LPNMTVDISPINFOEX) #define TV_DISPINFOEXA NMTVDISPINFOEXA #define TV_DISPINFOEXW NMTVDISPINFOEXW @@ -3803,31 +3480,17 @@ #include <poppack.h> -#ifdef UNICODE -#define TVN_SELCHANGING TVN_SELCHANGINGW -#define TVN_SELCHANGED TVN_SELCHANGEDW -#define TVN_GETDISPINFO TVN_GETDISPINFOW -#define TVN_SETDISPINFO TVN_SETDISPINFOW -#define TVN_ITEMEXPANDING TVN_ITEMEXPANDINGW -#define TVN_ITEMEXPANDED TVN_ITEMEXPANDEDW -#define TVN_BEGINDRAG TVN_BEGINDRAGW -#define TVN_BEGINRDRAG TVN_BEGINRDRAGW -#define TVN_DELETEITEM TVN_DELETEITEMW -#define TVN_BEGINLABELEDIT TVN_BEGINLABELEDITW -#define TVN_ENDLABELEDIT TVN_ENDLABELEDITW -#else -#define TVN_SELCHANGING TVN_SELCHANGINGA -#define TVN_SELCHANGED TVN_SELCHANGEDA -#define TVN_GETDISPINFO TVN_GETDISPINFOA -#define TVN_SETDISPINFO TVN_SETDISPINFOA -#define TVN_ITEMEXPANDING TVN_ITEMEXPANDINGA -#define TVN_ITEMEXPANDED TVN_ITEMEXPANDEDA -#define TVN_BEGINDRAG TVN_BEGINDRAGA -#define TVN_BEGINRDRAG TVN_BEGINRDRAGA -#define TVN_DELETEITEM TVN_DELETEITEMA -#define TVN_BEGINLABELEDIT TVN_BEGINLABELEDITA -#define TVN_ENDLABELEDIT TVN_ENDLABELEDITA -#endif +#define TVN_SELCHANGING __MINGW_NAME_AW(TVN_SELCHANGING) +#define TVN_SELCHANGED __MINGW_NAME_AW(TVN_SELCHANGED) +#define TVN_GETDISPINFO __MINGW_NAME_AW(TVN_GETDISPINFO) +#define TVN_SETDISPINFO __MINGW_NAME_AW(TVN_SETDISPINFO) +#define TVN_ITEMEXPANDING __MINGW_NAME_AW(TVN_ITEMEXPANDING) +#define TVN_ITEMEXPANDED __MINGW_NAME_AW(TVN_ITEMEXPANDED) +#define TVN_BEGINDRAG __MINGW_NAME_AW(TVN_BEGINDRAG) +#define TVN_BEGINRDRAG __MINGW_NAME_AW(TVN_BEGINRDRAG) +#define TVN_DELETEITEM __MINGW_NAME_AW(TVN_DELETEITEM) +#define TVN_BEGINLABELEDIT __MINGW_NAME_AW(TVN_BEGINLABELEDIT) +#define TVN_ENDLABELEDIT __MINGW_NAME_AW(TVN_ENDLABELEDIT) #define NMTVCUSTOMDRAW_V3_SIZE CCSIZEOF_STRUCT(NMTVCUSTOMDRAW,clrTextBk) @@ -3854,15 +3517,9 @@ LPARAM lParam; } NMTVGETINFOTIPW,*LPNMTVGETINFOTIPW; -#ifdef UNICODE -#define TVN_GETINFOTIP TVN_GETINFOTIPW -#define NMTVGETINFOTIP NMTVGETINFOTIPW -#define LPNMTVGETINFOTIP LPNMTVGETINFOTIPW -#else -#define TVN_GETINFOTIP TVN_GETINFOTIPA -#define NMTVGETINFOTIP NMTVGETINFOTIPA -#define LPNMTVGETINFOTIP LPNMTVGETINFOTIPA -#endif +#define TVN_GETINFOTIP __MINGW_NAME_AW(TVN_GETINFOTIP) +#define NMTVGETINFOTIP __MINGW_NAME_AW(NMTVGETINFOTIP) +#define LPNMTVGETINFOTIP __MINGW_NAME_AW(LPNMTVGETINFOTIP) #define TVCDRF_NOIMAGES 0x10000 #endif @@ -3872,11 +3529,7 @@ #define WC_COMBOBOXEXW L"ComboBoxEx32" #define WC_COMBOBOXEXA "ComboBoxEx32" -#ifdef UNICODE -#define WC_COMBOBOXEX WC_COMBOBOXEXW -#else -#define WC_COMBOBOXEX WC_COMBOBOXEXA -#endif +#define WC_COMBOBOXEX __MINGW_NAME_AW(WC_COMBOBOXEX) #define CBEIF_TEXT 0x1 #define CBEIF_IMAGE 0x2 @@ -3914,15 +3567,9 @@ } COMBOBOXEXITEMW,*PCOMBOBOXEXITEMW; typedef COMBOBOXEXITEMW CONST *PCCOMBOEXITEMW; -#ifdef UNICODE -#define COMBOBOXEXITEM COMBOBOXEXITEMW -#define PCOMBOBOXEXITEM PCOMBOBOXEXITEMW -#define PCCOMBOBOXEXITEM PCCOMBOBOXEXITEMW -#else -#define COMBOBOXEXITEM COMBOBOXEXITEMA -#define PCOMBOBOXEXITEM PCOMBOBOXEXITEMA -#define PCCOMBOBOXEXITEM PCCOMBOBOXEXITEMA -#endif +#define COMBOBOXEXITEM __MINGW_NAME_AW(COMBOBOXEXITEM) +#define PCOMBOBOXEXITEM __MINGW_NAME_AW(PCOMBOBOXEXITEM) +#define PCCOMBOBOXEXITEM __MINGW_NAME_AW(PCCOMBOBOXEXITEM) #define CBEM_INSERTITEMA (WM_USER+1) #define CBEM_SETIMAGELIST (WM_USER+2) @@ -3943,15 +3590,9 @@ #define CBEM_SETITEMW (WM_USER+12) #define CBEM_GETITEMW (WM_USER+13) -#ifdef UNICODE -#define CBEM_INSERTITEM CBEM_INSERTITEMW -#define CBEM_SETITEM CBEM_SETITEMW -#define CBEM_GETITEM CBEM_GETITEMW -#else -#define CBEM_INSERTITEM CBEM_INSERTITEMA -#define CBEM_SETITEM CBEM_SETITEMA -#define CBEM_GETITEM CBEM_GETITEMA -#endif +#define CBEM_INSERTITEM __MINGW_NAME_AW(CBEM_INSERTITEM) +#define CBEM_SETITEM __MINGW_NAME_AW(CBEM_SETITEM) +#define CBEM_GETITEM __MINGW_NAME_AW(CBEM_GETITEM) #define CBEM_SETWINDOWTHEME CCM_SETWINDOWTHEME @@ -3971,15 +3612,9 @@ COMBOBOXEXITEMW ceItem; } NMCOMBOBOXEXW,*PNMCOMBOBOXEXW; -#ifdef UNICODE -#define NMCOMBOBOXEX NMCOMBOBOXEXW -#define PNMCOMBOBOXEX PNMCOMBOBOXEXW -#define CBEN_GETDISPINFO CBEN_GETDISPINFOW -#else -#define NMCOMBOBOXEX NMCOMBOBOXEXA -#define PNMCOMBOBOXEX PNMCOMBOBOXEXA -#define CBEN_GETDISPINFO CBEN_GETDISPINFOA -#endif +#define NMCOMBOBOXEX __MINGW_NAME_AW(NMCOMBOBOXEX) +#define PNMCOMBOBOXEX __MINGW_NAME_AW(PNMCOMBOBOXEX) +#define CBEN_GETDISPINFO __MINGW_NAME_AW(CBEN_GETDISPINFO) #define CBEN_GETDISPINFOA (CBEN_FIRST - 0) #define CBEN_INSERTITEM (CBEN_FIRST - 1) @@ -3993,17 +3628,9 @@ #define CBEN_DRAGBEGINA (CBEN_FIRST - 8) #define CBEN_DRAGBEGINW (CBEN_FIRST - 9) -#ifdef UNICODE -#define CBEN_DRAGBEGIN CBEN_DRAGBEGINW -#else -#define CBEN_DRAGBEGIN CBEN_DRAGBEGINA -#endif - -#ifdef UNICODE -#define CBEN_ENDEDIT CBEN_ENDEDITW -#else -#define CBEN_ENDEDIT CBEN_ENDEDITA -#endif +#define CBEN_DRAGBEGIN __MINGW_NAME_AW(CBEN_DRAGBEGIN) + +#define CBEN_ENDEDIT __MINGW_NAME_AW(CBEN_ENDEDIT) #define CBENF_KILLFOCUS 1 #define CBENF_RETURN 2 @@ -4024,15 +3651,9 @@ char szText[CBEMAXSTRLEN]; }NMCBEDRAGBEGINA,*LPNMCBEDRAGBEGINA,*PNMCBEDRAGBEGINA; -#ifdef UNICODE -#define NMCBEDRAGBEGIN NMCBEDRAGBEGINW -#define LPNMCBEDRAGBEGIN LPNMCBEDRAGBEGINW -#define PNMCBEDRAGBEGIN PNMCBEDRAGBEGINW -#else -#define NMCBEDRAGBEGIN NMCBEDRAGBEGINA -#define LPNMCBEDRAGBEGIN LPNMCBEDRAGBEGINA -#define PNMCBEDRAGBEGIN PNMCBEDRAGBEGINA -#endif +#define NMCBEDRAGBEGIN __MINGW_NAME_AW(NMCBEDRAGBEGIN) +#define LPNMCBEDRAGBEGIN __MINGW_NAME_AW(LPNMCBEDRAGBEGIN) +#define PNMCBEDRAGBEGIN __MINGW_NAME_AW(PNMCBEDRAGBEGIN) typedef struct { NMHDR hdr; @@ -4050,26 +3671,17 @@ int iWhy; } NMCBEENDEDITA,*LPNMCBEENDEDITA,*PNMCBEENDEDITA; -#ifdef UNICODE -#define NMCBEENDEDIT NMCBEENDEDITW -#define LPNMCBEENDEDIT LPNMCBEENDEDITW -#define PNMCBEENDEDIT PNMCBEENDEDITW -#else -#define NMCBEENDEDIT NMCBEENDEDITA -#define LPNMCBEENDEDIT LPNMCBEENDEDITA -#define PNMCBEENDEDIT PNMCBEENDEDITA -#endif +#define NMCBEENDEDIT __MINGW_NAME_AW(NMCBEENDEDIT) +#define LPNMCBEENDEDIT __MINGW_NAME_AW(LPNMCBEENDEDIT) +#define PNMCBEENDEDIT __MINGW_NAME_AW(PNMCBEENDEDIT) + #endif #ifndef NOTABCONTROL #define WC_TABCONTROLA "SysTabControl32" #define WC_TABCONTROLW L"SysTabControl32" -#ifdef UNICODE -#define WC_TABCONTROL WC_TABCONTROLW -#else -#define WC_TABCONTROL WC_TABCONTROLA -#endif +#define WC_TABCONTROL __MINGW_NAME_AW(WC_TABCONTROL) #define TCS_SCROLLOPPOSITE 0x1 #define TCS_BOTTOM 0x2 @@ -4135,13 +3747,8 @@ int iImage; } TCITEMHEADERW,*LPTCITEMHEADERW; -#ifdef UNICODE -#define TCITEMHEADER TCITEMHEADERW -#define LPTCITEMHEADER LPTCITEMHEADERW -#else -#define TCITEMHEADER TCITEMHEADERA -#define LPTCITEMHEADER LPTCITEMHEADERA -#endif +#define TCITEMHEADER __MINGW_NAME_AW(TCITEMHEADER) +#define LPTCITEMHEADER __MINGW_NAME_AW(LPTCITEMHEADER) #define TC_ITEMA TCITEMA #define TC_ITEMW TCITEMW @@ -4167,44 +3774,27 @@ LPARAM lParam; } TCITEMW,*LPTCITEMW; -#ifdef UNICODE -#define TCITEM TCITEMW -#define LPTCITEM LPTCITEMW -#else -#define TCITEM TCITEMA -#define LPTCITEM LPTCITEMA -#endif +#define TCITEM __MINGW_NAME_AW(TCITEM) +#define LPTCITEM __MINGW_NAME_AW(LPTCITEM) #define TCM_GETITEMA (TCM_FIRST+5) #define TCM_GETITEMW (TCM_FIRST+60) -#ifdef UNICODE -#define TCM_GETITEM TCM_GETITEMW -#else -#define TCM_GETITEM TCM_GETITEMA -#endif +#define TCM_GETITEM __MINGW_NAME_AW(TCM_GETITEM) #define TabCtrl_GetItem(hwnd,iItem,pitem) (WINBOOL)SNDMSG((hwnd),TCM_GETITEM,(WPARAM)(int)(iItem),(LPARAM)(TC_ITEM *)(pitem)) #define TCM_SETITEMA (TCM_FIRST+6) #define TCM_SETITEMW (TCM_FIRST+61) -#ifdef UNICODE -#define TCM_SETITEM TCM_SETITEMW -#else -#define TCM_SETITEM TCM_SETITEMA -#endif +#define TCM_SETITEM __MINGW_NAME_AW(TCM_SETITEM) #define TabCtrl_SetItem(hwnd,iItem,pitem) (WINBOOL)SNDMSG((hwnd),TCM_SETITEM,(WPARAM)(int)(iItem),(LPARAM)(TC_ITEM *)(pitem)) #define TCM_INSERTITEMA (TCM_FIRST+7) #define TCM_INSERTITEMW (TCM_FIRST+62) -#ifdef UNICODE -#define TCM_INSERTITEM TCM_INSERTITEMW -#else -#define TCM_INSERTITEM TCM_INSERTITEMA -#endif +#define TCM_INSERTITEM __MINGW_NAME_AW(TCM_INSERTITEM) #define TabCtrl_InsertItem(hwnd,iItem,pitem) (int)SNDMSG((hwnd),TCM_INSERTITEM,(WPARAM)(int)(iItem),(LPARAM)(const TC_ITEM *)(pitem)) @@ -4297,11 +3887,8 @@ #define ANIMATE_CLASSW L"SysAnimate32" #define ANIMATE_CLASSA "SysAnimate32" -#ifdef UNICODE -#define ANIMATE_CLASS ANIMATE_CLASSW -#else -#define ANIMATE_CLASS ANIMATE_CLASSA -#endif + +#define ANIMATE_CLASS __MINGW_NAME_AW(ANIMATE_CLASS) #define ACS_CENTER 0x1 #define ACS_TRANSPARENT 0x2 @@ -4310,11 +3897,8 @@ #define ACM_OPENA (WM_USER+100) #define ACM_OPENW (WM_USER+103) -#ifdef UNICODE -#define ACM_OPEN ACM_OPENW -#else -#define ACM_OPEN ACM_OPENA -#endif + +#define ACM_OPEN __MINGW_NAME_AW(ACM_OPEN) #define ACM_PLAY (WM_USER+101) #define ACM_STOP (WM_USER+102) @@ -4335,11 +3919,8 @@ #ifndef NOMONTHCAL #define MONTHCAL_CLASSW L"SysMonthCal32" #define MONTHCAL_CLASSA "SysMonthCal32" -#ifdef UNICODE -#define MONTHCAL_CLASS MONTHCAL_CLASSW -#else -#define MONTHCAL_CLASS MONTHCAL_CLASSA -#endif + +#define MONTHCAL_CLASS __MINGW_NAME_AW(MONTHCAL_CLASS) typedef DWORD MONTHDAYSTATE,*LPMONTHDAYSTATE; @@ -4382,13 +3963,18 @@ #define MCM_HITTEST (MCM_FIRST+14) #define MonthCal_HitTest(hmc,pinfo) SNDMSG(hmc,MCM_HITTEST,0,(LPARAM)(PMCHITTESTINFO)(pinfo)) - typedef struct { - UINT cbSize; - POINT pt; - - UINT uHit; - SYSTEMTIME st; - } MCHITTESTINFO,*PMCHITTESTINFO; +typedef struct { + UINT cbSize; + POINT pt; + UINT uHit; + SYSTEMTIME st; +#if(NTDDI_VERSION >= NTDDI_VISTA) + RECT rc; + int iOffset; + int iRow; + int iCol; +#endif +} MCHITTESTINFO, *PMCHITTESTINFO; #define MCHITTESTINFO_V1_SIZE CCSIZEOF_STRUCT(MCHITTESTINFO, st) @@ -4455,16 +4041,12 @@ #define MCN_SELECT (MCN_FIRST+4) -#define MCS_DAYSTATE 0x0001 -#define MCS_MULTISELECT 0x0002 -#define MCS_WEEKNUMBERS 0x0004 -#define MCS_NOTODAYCIRCLE 0x0008 -#define MCS_NOTODAY 0x0010 -#if (NTDDI_VERSION >= NTDDI_VISTA) -#define MCS_NOTRAILINGDATES 0x0040 -#define MCS_SHORTDAYSOFWEEK 0x0080 -#define MCS_NOSELCHANGEONNAV 0x0100 -#endif +#define MCS_DAYSTATE 0x0001 +#define MCS_MULTISELECT 0x0002 +#define MCS_WEEKNUMBERS 0x0004 +#define MCS_NOTODAYCIRCLE 0x0008 +#define MCS_NOTODAY 0x0010 +#define MCS_NOTRAILINGDATES 0x0040 #define GMR_VISIBLE 0 #define GMR_DAYSTATE 1 @@ -4473,11 +4055,9 @@ #ifndef NODATETIMEPICK #define DATETIMEPICK_CLASSW L"SysDateTimePick32" #define DATETIMEPICK_CLASSA "SysDateTimePick32" -#ifdef UNICODE -#define DATETIMEPICK_CLASS DATETIMEPICK_CLASSW -#else -#define DATETIMEPICK_CLASS DATETIMEPICK_CLASSA -#endif + +#define DATETIMEPICK_CLASS __MINGW_NAME_AW(DATETIMEPICK_CLASS) + #define DTM_FIRST 0x1000 #define DTM_GETSYSTEMTIME (DTM_FIRST+1) @@ -4491,11 +4071,7 @@ #define DTM_SETFORMATA (DTM_FIRST+5) #define DTM_SETFORMATW (DTM_FIRST+50) -#ifdef UNICODE -#define DTM_SETFORMAT DTM_SETFORMATW -#else -#define DTM_SETFORMAT DTM_SETFORMATA -#endif +#define DTM_SETFORMAT __MINGW_NAME_AW(DTM_SETFORMAT) #define DateTime_SetFormat(hdp,sz) (WINBOOL)SNDMSG(hdp,DTM_SETFORMAT,0,(LPARAM)(sz)) @@ -4542,15 +4118,9 @@ DWORD dwFlags; } NMDATETIMESTRINGW,*LPNMDATETIMESTRINGW; -#ifdef UNICODE -#define DTN_USERSTRING DTN_USERSTRINGW -#define NMDATETIMESTRING NMDATETIMESTRINGW -#define LPNMDATETIMESTRING LPNMDATETIMESTRINGW -#else -#define DTN_USERSTRING DTN_USERSTRINGA -#define NMDATETIMESTRING NMDATETIMESTRINGA -#define LPNMDATETIMESTRING LPNMDATETIMESTRINGA -#endif +#define DTN_USERSTRING __MINGW_NAME_AW(DTN_USERSTRING) +#define NMDATETIMESTRING __MINGW_NAME_AW(NMDATETIMESTRING) +#define LPNMDATETIMESTRING __MINGW_NAME_AW(LPNMDATETIMESTRING) #define DTN_WMKEYDOWNA (DTN_FIRST+3) #define DTN_WMKEYDOWNW (DTN_FIRST+16) @@ -4568,15 +4138,9 @@ SYSTEMTIME st; } NMDATETIMEWMKEYDOWNW,*LPNMDATETIMEWMKEYDOWNW; -#ifdef UNICODE -#define DTN_WMKEYDOWN DTN_WMKEYDOWNW -#define NMDATETIMEWMKEYDOWN NMDATETIMEWMKEYDOWNW -#define LPNMDATETIMEWMKEYDOWN LPNMDATETIMEWMKEYDOWNW -#else -#define DTN_WMKEYDOWN DTN_WMKEYDOWNA -#define NMDATETIMEWMKEYDOWN NMDATETIMEWMKEYDOWNA -#define LPNMDATETIMEWMKEYDOWN LPNMDATETIMEWMKEYDOWNA -#endif +#define DTN_WMKEYDOWN __MINGW_NAME_AW(DTN_WMKEYDOWN) +#define NMDATETIMEWMKEYDOWN __MINGW_NAME_AW(NMDATETIMEWMKEYDOWN) +#define LPNMDATETIMEWMKEYDOWN __MINGW_NAME_AW(LPNMDATETIMEWMKEYDOWN) #define DTN_FORMATA (DTN_FIRST+4) #define DTN_FORMATW (DTN_FIRST+17) @@ -4596,15 +4160,9 @@ WCHAR szDisplay[64]; } NMDATETIMEFORMATW,*LPNMDATETIMEFORMATW; -#ifdef UNICODE -#define DTN_FORMAT DTN_FORMATW -#define NMDATETIMEFORMAT NMDATETIMEFORMATW -#define LPNMDATETIMEFORMAT LPNMDATETIMEFORMATW -#else -#define DTN_FORMAT DTN_FORMATA -#define NMDATETIMEFORMAT NMDATETIMEFORMATA -#define LPNMDATETIMEFORMAT LPNMDATETIMEFORMATA -#endif +#define DTN_FORMAT __MINGW_NAME_AW(DTN_FORMAT) +#define NMDATETIMEFORMAT __MINGW_NAME_AW(NMDATETIMEFORMAT) +#define LPNMDATETIMEFORMAT __MINGW_NAME_AW(LPNMDATETIMEFORMAT) #define DTN_FORMATQUERYA (DTN_FIRST+5) #define DTN_FORMATQUERYW (DTN_FIRST+18) @@ -4620,15 +4178,9 @@ SIZE szMax; } NMDATETIMEFORMATQUERYW,*LPNMDATETIMEFORMATQUERYW; -#ifdef UNICODE -#define DTN_FORMATQUERY DTN_FORMATQUERYW -#define NMDATETIMEFORMATQUERY NMDATETIMEFORMATQUERYW -#define LPNMDATETIMEFORMATQUERY LPNMDATETIMEFORMATQUERYW -#else -#define DTN_FORMATQUERY DTN_FORMATQUERYA -#define NMDATETIMEFORMATQUERY NMDATETIMEFORMATQUERYA -#define LPNMDATETIMEFORMATQUERY LPNMDATETIMEFORMATQUERYA -#endif +#define DTN_FORMATQUERY __MINGW_NAME_AW(DTN_FORMATQUERY) +#define NMDATETIMEFORMATQUERY __MINGW_NAME_AW(NMDATETIMEFORMATQUERY) +#define LPNMDATETIMEFORMATQUERY __MINGW_NAME_AW(LPNMDATETIMEFORMATQUERY) #define DTN_DROPDOWN (DTN_FIRST+6) #define DTN_CLOSEUP (DTN_FIRST+7) @@ -4651,11 +4203,7 @@ #define WC_IPADDRESSW L"SysIPAddress32" #define WC_IPADDRESSA "SysIPAddress32" -#ifdef UNICODE -#define WC_IPADDRESS WC_IPADDRESSW -#else -#define WC_IPADDRESS WC_IPADDRESSA -#endif +#define WC_IPADDRESS __MINGW_NAME_AW(WC_IPADDRESS) #define IPN_FIELDCHANGED (IPN_FIRST - 0) typedef struct tagNMIPADDRESS { @@ -4678,11 +4226,7 @@ #define WC_PAGESCROLLERW L"SysPager" #define WC_PAGESCROLLERA "SysPager" -#ifdef UNICODE -#define WC_PAGESCROLLER WC_PAGESCROLLERW -#else -#define WC_PAGESCROLLER WC_PAGESCROLLERA -#endif +#define WC_PAGESCROLLER __MINGW_NAME_AW(WC_PAGESCROLLER) #define PGS_VERT 0x0 #define PGS_HORZ 0x1 @@ -4790,11 +4334,7 @@ #define WC_NATIVEFONTCTLW L"NativeFontCtl" #define WC_NATIVEFONTCTLA "NativeFontCtl" -#ifdef UNICODE -#define WC_NATIVEFONTCTL WC_NATIVEFONTCTLW -#else -#define WC_NATIVEFONTCTL WC_NATIVEFONTCTLA -#endif +#define WC_NATIVEFONTCTL __MINGW_NAME_AW(WC_NATIVEFONTCTL) #define NFS_EDIT 0x1 #define NFS_STATIC 0x2 @@ -4807,11 +4347,8 @@ #ifndef NOBUTTON #define WC_BUTTONA "Button" #define WC_BUTTONW L"Button" -#ifdef UNICODE -#define WC_BUTTON WC_BUTTONW -#else -#define WC_BUTTON WC_BUTTONA -#endif + +#define WC_BUTTON __MINGW_NAME_AW(WC_BUTTON) #define BUTTON_IMAGELIST_ALIGN_LEFT 0 #define BUTTON_IMAGELIST_ALIGN_RIGHT 1 @@ -4853,20 +4390,14 @@ #ifndef NOSTATIC #define WC_STATICA "Static" #define WC_STATICW L"Static" -#ifdef UNICODE -#define WC_STATIC WC_STATICW -#else -#define WC_STATIC WC_STATICA -#endif + +#define WC_STATIC __MINGW_NAME_AW(WC_STATIC) #ifndef NOEDIT #define WC_EDITA "Edit" #define WC_EDITW L"Edit" -#ifdef UNICODE -#define WC_EDIT WC_EDITW -#else -#define WC_EDIT WC_EDITA -#endif + +#define WC_EDIT __MINGW_NAME_AW(WC_EDIT) #define EM_SETCUEBANNER (ECM_FIRST+1) #define Edit_SetCueBannerText(hwnd,lpcwText) (WINBOOL)SNDMSG((hwnd),EM_SETCUEBANNER,0,(LPARAM)(lpcwText)) @@ -4888,21 +4419,17 @@ #ifndef NOLISTBOX #define WC_LISTBOXA "ListBox" #define WC_LISTBOXW L"ListBox" -#ifdef UNICODE -#define WC_LISTBOX WC_LISTBOXW -#else -#define WC_LISTBOX WC_LISTBOXA -#endif + +#define WC_LISTBOX __MINGW_NAME_AW(WC_LISTBOX) + #endif #ifndef NOCOMBOBOX #define WC_COMBOBOXA "ComboBox" #define WC_COMBOBOXW L"ComboBox" -#ifdef UNICODE -#define WC_COMBOBOX WC_COMBOBOXW -#else -#define WC_COMBOBOX WC_COMBOBOXA -#endif + +#define WC_COMBOBOX __MINGW_NAME_AW(WC_COMBOBOX) + #endif #define CB_SETMINVISIBLE (CBM_FIRST+1) @@ -4914,11 +4441,9 @@ #ifndef NOSCROLLBAR #define WC_SCROLLBARA "ScrollBar" #define WC_SCROLLBARW L"ScrollBar" -#ifdef UNICODE -#define WC_SCROLLBAR WC_SCROLLBARW -#else -#define WC_SCROLLBAR WC_SCROLLBARA -#endif + +#define WC_SCROLLBAR __MINGW_NAME_AW(WC_SCROLLBAR) + #endif #define INVALID_LINK_INDEX (-1) @@ -5009,6 +4534,40 @@ WINCOMMCTRLAPI int WINAPI DPA_Search(HDPA hdpa,void *pFind,int iStart,PFNDPACOMPARE pfnCompare,LPARAM lParam,UINT options); WINCOMMCTRLAPI WINBOOL WINAPI Str_SetPtrW(LPWSTR *ppsz,LPCWSTR psz); + +typedef struct _DPASTREAMINFO { + int iPos; + void *pvItem; +} DPASTREAMINFO; + +struct IStream; +typedef HRESULT (CALLBACK *PFNDPASTREAM)(DPASTREAMINFO*, struct IStream*, void*); +typedef void* (CALLBACK *PFNDPAMERGE)(UINT, void*, void*, LPARAM); +typedef const void* (CALLBACK *PFNDPAMERGECONST)(UINT, const void*, const void*, LPARAM); + + WINCOMMCTRLAPI HRESULT WINAPI DPA_LoadStream(HDPA * phdpa, PFNDPASTREAM pfn, struct IStream * pstream, void *pvInstData); + WINCOMMCTRLAPI HRESULT WINAPI DPA_SaveStream(HDPA hdpa, PFNDPASTREAM pfn, struct IStream * pstream, void *pvInstData); + WINCOMMCTRLAPI WINBOOL WINAPI DPA_Grow(HDPA pdpa, int cp); + WINCOMMCTRLAPI int WINAPI DPA_InsertPtr(HDPA hdpa, int i, void *p); + WINCOMMCTRLAPI PVOID WINAPI DPA_GetPtr(HDPA hdpa, INT_PTR i); + WINCOMMCTRLAPI WINBOOL WINAPI DPA_SetPtr(HDPA hdpa, int i, void *p); + WINCOMMCTRLAPI int WINAPI DPA_GetPtrIndex(HDPA hdpa, const void *p); + +#define DPA_GetPtrCount(hdpa) (*(int *)(hdpa)) +#define DPA_SetPtrCount(hdpa, cItems) (*(int *)(hdpa) = (cItems)) +#define DPA_GetPtrPtr(hdpa) (*((void * **)((BYTE *)(hdpa) + sizeof(void *)))) +#define DPA_AppendPtr(hdpa, pitem) DPA_InsertPtr(hdpa, DA_LAST, pitem) +#define DPA_FastDeleteLastPtr(hdpa) (--*(int *)(hdpa)) +#define DPA_FastGetPtr(hdpa, i) (DPA_GetPtrPtr(hdpa)[i]) + +#define DPAM_SORTED 1 +#define DPAM_NORMAL 2 +#define DPAM_UNION 4 +#define DPAM_INTERSECT 8 + +#define DPAMM_MERGE 1 +#define DPAMM_DELETE 2 +#define DPAMM_INSERT 3 #ifndef NOTRACKMOUSEEVENT @@ -5088,39 +4647,91 @@ LRESULT WINAPI DefSubclassProc(HWND hWnd,UINT uMsg,WPARAM wParam,LPARAM lParam); int WINAPI DrawShadowText(HDC hdc,LPCWSTR pszText,UINT cch,RECT *prc,DWORD dwFlags,COLORREF crText,COLORREF crShadow,int ixOffset,int iyOffset); -typedef struct _DPASTREAMINFO { - int iPos; - void *pvItem; -} DPASTREAMINFO; - -struct IStream; -typedef HRESULT (CALLBACK *PFNDPASTREAM)(DPASTREAMINFO*, struct IStream*, void*); -typedef void* (CALLBACK *PFNDPAMERGE)(UINT, void*, void*, LPARAM); -typedef const void* (CALLBACK *PFNDPAMERGECONST)(UINT, const void*, const void*, LPARAM); - - WINCOMMCTRLAPI HRESULT WINAPI DPA_LoadStream(HDPA * phdpa, PFNDPASTREAM pfn, struct IStream * pstream, void *pvInstData); - WINCOMMCTRLAPI HRESULT WINAPI DPA_SaveStream(HDPA hdpa, PFNDPASTREAM pfn, struct IStream * pstream, void *pvInstData); - WINCOMMCTRLAPI BOOL WINAPI DPA_Grow(HDPA pdpa, IN int cp); - WINCOMMCTRLAPI int WINAPI DPA_InsertPtr(HDPA hdpa, IN int i, void *p); - WINCOMMCTRLAPI PVOID WINAPI DPA_GetPtr(HDPA hdpa, INT_PTR i); - WINCOMMCTRLAPI BOOL WINAPI DPA_SetPtr(HDPA hdpa, IN int i, void *p); - WINCOMMCTRLAPI int WINAPI DPA_GetPtrIndex(HDPA hdpa, const void *p); - -#define DPA_GetPtrCount(hdpa) (*(int *)(hdpa)) -#define DPA_SetPtrCount(hdpa, cItems) (*(int *)(hdpa) = (cItems)) -#define DPA_GetPtrPtr(hdpa) (*((void * **)((BYTE *)(hdpa) + sizeof(void *)))) -#define DPA_AppendPtr(hdpa, pitem) DPA_InsertPtr(hdpa, DA_LAST, pitem) -#define DPA_FastDeleteLastPtr(hdpa) (--*(int *)(hdpa)) -#define DPA_FastGetPtr(hdpa, i) (DPA_GetPtrPtr(hdpa)[i]) - -#define DPAM_SORTED 1 -#define DPAM_NORMAL 2 -#define DPAM_UNION 4 -#define DPAM_INTERSECT 8 - -#define DPAMM_MERGE 1 -#define DPAMM_DELETE 2 -#define DPAMM_INSERT 3 +#ifndef NOTASKDIALOG + +#include <pshpack1.h> + +enum _TASKDIALOG_FLAGS +{ + TDF_ENABLE_HYPERLINKS = 0x0001, + TDF_USE_HICON_MAIN = 0x0002, + TDF_USE_HICON_FOOTER = 0x0004, + TDF_ALLOW_DIALOG_CANCELLATION = 0x0008, + TDF_USE_COMMAND_LINKS = 0x0010, + TDF_USE_COMMAND_LINKS_NO_ICON = 0x0020, + TDF_EXPAND_FOOTER_AREA = 0x0040, + TDF_EXPANDED_BY_DEFAULT = 0x0080, + TDF_VERIFICATION_FLAG_CHECKED = 0x0100, + TDF_SHOW_PROGRESS_BAR = 0x0200, + TDF_SHOW_MARQUEE_PROGRESS_BAR = 0x0400, + TDF_CALLBACK_TIMER = 0x0800, + TDF_POSITION_RELATIVE_TO_WINDOW = 0x1000, + TDF_RTL_LAYOUT = 0x2000, + TDF_NO_DEFAULT_RADIO_BUTTON = 0x4000, + TDF_CAN_BE_MINIMIZED = 0x8000 +}; +typedef int TASKDIALOG_FLAGS; + +enum _TASKDIALOG_COMMON_BUTTON_FLAGS +{ + TDCBF_OK_BUTTON = 0x0001, + TDCBF_YES_BUTTON = 0x0002, + TDCBF_NO_BUTTON = 0x0004, + TDCBF_CANCEL_BUTTON = 0x0008, + TDCBF_RETRY_BUTTON = 0x0010, + TDCBF_CLOSE_BUTTON = 0x0020 +}; +typedef int TASKDIALOG_COMMON_BUTTON_FLAGS; + +typedef struct _TASKDIALOG_BUTTON +{ + int nButtonID; + PCWSTR pszButtonText; +} TASKDIALOG_BUTTON; + +typedef HRESULT (CALLBACK *PFTASKDIALOGCALLBACK)(HWND, UINT, WPARAM, LPARAM, LONG_PTR); + +typedef struct _TASKDIALOGCONFIG +{ + UINT cbSize; + HWND hwndParent; + HINSTANCE hInstance; + TASKDIALOG_FLAGS dwFlags; + TASKDIALOG_COMMON_BUTTON_FLAGS dwCommonButtons; + PCWSTR pszWindowTitle; + union + { + HICON hMainIcon; + PCWSTR pszMainIcon; + } DUMMYUNIONNAME; + PCWSTR pszMainInstruction; + PCWSTR pszContent; + UINT cButtons; + const TASKDIALOG_BUTTON *pButtons; + int nDefaultButton; + UINT cRadioButtons; + const TASKDIALOG_BUTTON *pRadioButtons; + int nDefaultRadioButton; + PCWSTR pszVerificationText; + PCWSTR pszExpandedInformation; + PCWSTR pszExpandedControlText; + PCWSTR pszCollapsedControlText; + union + { + HICON hFooterIcon; + PCWSTR pszFooterIcon; + } DUMMYUNIONNAME2; + PCWSTR pszFooter; + PFTASKDIALOGCALLBACK pfCallback; + LONG_PTR lpCallbackData; + UINT cxWidth; +} TASKDIALOGCONFIG; + +HRESULT WINAPI TaskDialogIndirect(const TASKDIALOGCONFIG *, int *, int *, BOOL *); + +#include <poppack.h> + +#endif /* NOTASKDIALOG */ #ifdef __cplusplus }
13 years, 10 months
1
0
0
0
[tkreuzer] 50880: [WIN32K] Small readability improvement.
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Wed Feb 23 18:51:57 2011 New Revision: 50880 URL:
http://svn.reactos.org/svn/reactos?rev=50880&view=rev
Log: [WIN32K] Small readability improvement. Modified: trunk/reactos/subsystems/win32/win32k/objects/path.c Modified: trunk/reactos/subsystems/win32/win32k/objects/path.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/path.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/path.c [iso-8859-1] Wed Feb 23 18:51:57 2011 @@ -2281,13 +2281,15 @@ BOOL ret = FALSE; PPATH pPath; PDC_ATTR pdcattr; - PDC dc = DC_LockDc ( hDC ); - - if ( !dc ) + PDC dc; + + dc = DC_LockDc(hDC); + if (!dc) { EngSetLastError(ERROR_INVALID_PARAMETER); return FALSE; } + pPath = PATH_LockPath( dc->dclevel.hPath ); if (!pPath) {
13 years, 10 months
1
0
0
0
[tkreuzer] 50879: [WIN32K] add code to register pre/post systemcall hooks. Its #if 0'ed to avoid unneccessary overhead. Can be enabled for debugging puposes.
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Wed Feb 23 18:46:02 2011 New Revision: 50879 URL:
http://svn.reactos.org/svn/reactos?rev=50879&view=rev
Log: [WIN32K] add code to register pre/post systemcall hooks. Its #if 0'ed to avoid unneccessary overhead. Can be enabled for debugging puposes. Modified: trunk/reactos/subsystems/win32/win32k/main/dllmain.c Modified: trunk/reactos/subsystems/win32/win32k/main/dllmain.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ma…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/main/dllmain.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/main/dllmain.c [iso-8859-1] Wed Feb 23 18:46:02 2011 @@ -460,6 +460,12 @@ /* Register our per-process and per-thread structures. */ PsEstablishWin32Callouts((PWIN32_CALLOUTS_FPNS)&CalloutData); +#if 0 // DBG + /* Register service hook callbacks */ + KdSystemDebugControl('CsoR', DbgPreServiceHook, ID_Win32PreServiceHook, 0, 0, 0, 0); + KdSystemDebugControl('CsoR', DbgPostServiceHook, ID_Win32PostServiceHook, 0, 0, 0, 0); +#endif + /* Create the global USER heap */ GlobalUserHeap = UserCreateHeap(&GlobalUserHeapSection, &GlobalUserHeapBase,
13 years, 10 months
1
0
0
0
[janderwald] 50878: - Fix build
by janderwald@svn.reactos.org
Author: janderwald Date: Wed Feb 23 17:15:13 2011 New Revision: 50878 URL:
http://svn.reactos.org/svn/reactos?rev=50878&view=rev
Log: - Fix build Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/interfaces.hpp Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/interfaces.hpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/interfaces.hpp [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/interfaces.hpp [iso-8859-1] Wed Feb 23 17:15:13 2011 @@ -106,7 +106,7 @@ IN PDEVICE_OBJECT DeviceObject, \ IN PIRP Irp)PURE; \ \ - virtual NTSTATUS Close( \ + STDMETHOD_(NTSTATUS, Close)( \ IN PDEVICE_OBJECT DeviceObject, \ IN PIRP Irp)PURE; \ \
13 years, 10 months
1
0
0
0
[janderwald] 50877: [PORTCLS] - Re-add the hack for gcc
by janderwald@svn.reactos.org
Author: janderwald Date: Wed Feb 23 15:14:12 2011 New Revision: 50877 URL:
http://svn.reactos.org/svn/reactos?rev=50877&view=rev
Log: [PORTCLS] - Re-add the hack for gcc Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/dma_slave.cpp trunk/reactos/drivers/wdm/audio/backpln/portcls/interfaces.hpp Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/dma_slave.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/dma_slave.cpp [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/dma_slave.cpp [iso-8859-1] Wed Feb 23 15:14:12 2011 @@ -194,6 +194,8 @@ return m_MaximumBufferSize; } +#ifdef _MSC_VER + PHYSICAL_ADDRESS NTAPI CDmaChannelInit::PhysicalAddress() @@ -203,6 +205,24 @@ return m_Address; } +#else + +PHYSICAL_ADDRESS +NTAPI +CDmaChannelInit::PhysicalAddress( + PPHYSICAL_ADDRESS Address) +{ + DPRINT("CDmaChannelInit_PhysicalAdress: this %p Virtuell %p Physical High %x Low %x%\n", this, m_Buffer, m_Address.HighPart, m_Address.LowPart); + + PHYSICAL_ADDRESS Result; + + Address->QuadPart = m_Address.QuadPart; + Result.QuadPart = (PtrToUlong(Address)); + return Result; +} + + +#endif VOID NTAPI Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/interfaces.hpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/interfaces.hpp [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/interfaces.hpp [iso-8859-1] Wed Feb 23 15:14:12 2011 @@ -106,7 +106,7 @@ IN PDEVICE_OBJECT DeviceObject, \ IN PIRP Irp)PURE; \ \ - STDMETHOD_(NTSTATUS, Close)(THIS_ \ + virtual NTSTATUS Close( \ IN PDEVICE_OBJECT DeviceObject, \ IN PIRP Irp)PURE; \ \ @@ -888,6 +888,8 @@ ***************************************************************************** */ +#ifdef _MSC_VER + #define IMP_IDmaChannelEx \ STDMETHODIMP_(NTSTATUS) AllocateBuffer( \ IN ULONG BufferSize, \ @@ -915,6 +917,42 @@ IN PVOID Destination, \ IN PVOID Source, \ IN ULONG ByteCount) + +#else + +#define IMP_IDmaChannelEx \ + STDMETHODIMP_(NTSTATUS) AllocateBuffer( \ + IN ULONG BufferSize, \ + IN PPHYSICAL_ADDRESS PhysicalAddressConstraint OPTIONAL); \ + \ + STDMETHODIMP_(void) FreeBuffer(void); \ + STDMETHODIMP_(ULONG) TransferCount(void); \ + STDMETHODIMP_(ULONG) MaximumBufferSize(void); \ + STDMETHODIMP_(ULONG) AllocatedBufferSize(void); \ + STDMETHODIMP_(ULONG) BufferSize(void); \ + \ + STDMETHODIMP_(void) SetBufferSize( \ + IN ULONG BufferSize); \ + \ + STDMETHODIMP_(PVOID) SystemAddress(void); \ + STDMETHODIMP_(PHYSICAL_ADDRESS) PhysicalAddress( \ + IN PPHYSICAL_ADDRESS PhysicalAddressConstraint OPTIONAL); \ + STDMETHODIMP_(PADAPTER_OBJECT) GetAdapterObject(void); \ + \ + STDMETHODIMP_(void) CopyTo( \ + IN PVOID Destination, \ + IN PVOID Source, \ + IN ULONG ByteCount); \ + \ + STDMETHODIMP_(void) CopyFrom( \ + IN PVOID Destination, \ + IN PVOID Source, \ + IN ULONG ByteCount) + + + +#endif + #define IMP_IDmaChannelSlaveEx \ IMP_IDmaChannelEx; \ @@ -933,6 +971,8 @@ STDMETHODIMP_(NTSTATUS) Init( \ IN PDEVICE_DESCRIPTION DeviceDescription, \ IN PDEVICE_OBJECT DeviceObject) + +#ifdef _MSC_VER #define DEFINE_ABSTRACT_DMACHANNEL_EX() \ STDMETHOD_(NTSTATUS, AllocateBuffer)( THIS_ \ @@ -961,7 +1001,38 @@ IN PVOID Destination, \ IN PVOID Source, \ IN ULONG ByteCount) PURE; - +#else + +#define DEFINE_ABSTRACT_DMACHANNEL_EX() \ + STDMETHOD_(NTSTATUS, AllocateBuffer)( THIS_ \ + IN ULONG BufferSize, \ + IN PPHYSICAL_ADDRESS PhysicalAddressConstraint OPTIONAL) PURE; \ +\ + STDMETHOD_(void, FreeBuffer)( THIS ) PURE; \ + STDMETHOD_(ULONG, TransferCount)( THIS ) PURE; \ + STDMETHOD_(ULONG, MaximumBufferSize)( THIS ) PURE; \ + STDMETHOD_(ULONG, AllocatedBufferSize)( THIS ) PURE; \ + STDMETHOD_(ULONG, BufferSize)( THIS ) PURE; \ +\ + STDMETHOD_(void, SetBufferSize)( THIS_ \ + IN ULONG BufferSize) PURE; \ +\ + STDMETHOD_(PVOID, SystemAddress)( THIS ) PURE; \ + STDMETHOD_(PHYSICAL_ADDRESS, PhysicalAddress)( THIS_ \ + IN PPHYSICAL_ADDRESS Address) PURE; \ + STDMETHOD_(PADAPTER_OBJECT, GetAdapterObject)( THIS ) PURE; \ +\ + STDMETHOD_(void, CopyTo)( THIS_ \ + IN PVOID Destination, \ + IN PVOID Source, \ + IN ULONG ByteCount) PURE; \ +\ + STDMETHOD_(void, CopyFrom)( THIS_ \ + IN PVOID Destination, \ + IN PVOID Source, \ + IN ULONG ByteCount) PURE; + +#endif #undef INTERFACE #define INTERFACE IDmaChannelInit
13 years, 10 months
1
0
0
0
← Newer
1
2
3
4
5
6
7
8
9
...
36
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
Results per page:
10
25
50
100
200