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
October 2008
----- 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
25 participants
517 discussions
Start a n
N
ew thread
[sginsberg] 36911: - 64-bit fixes (ULONG -> SIZE_T)
by sginsberg@svn.reactos.org
Author: sginsberg Date: Thu Oct 23 10:56:27 2008 New Revision: 36911 URL:
http://svn.reactos.org/svn/reactos?rev=36911&view=rev
Log: - 64-bit fixes (ULONG -> SIZE_T) Modified: trunk/reactos/subsystems/win32/win32k/eng/mem.c Modified: trunk/reactos/subsystems/win32/win32k/eng/mem.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/en…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/eng/mem.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/eng/mem.c [iso-8859-1] Thu Oct 23 10:56:27 2008 @@ -76,7 +76,7 @@ { PVOID NewMem = NULL; NTSTATUS Status; - ULONG MemSize = sizeof(USERMEMHEADER) + cj; + SIZE_T MemSize = sizeof(USERMEMHEADER) + cj; PUSERMEMHEADER Header; Status = ZwAllocateVirtualMemory(NtCurrentProcess(), &NewMem, 0, &MemSize, MEM_COMMIT, PAGE_READWRITE); @@ -100,7 +100,7 @@ EngFreeUserMem(PVOID pv) { PUSERMEMHEADER Header = ((PUSERMEMHEADER) pv) - 1; - ULONG MemSize = sizeof(USERMEMHEADER) + Header->MemSize; + SIZE_T MemSize = sizeof(USERMEMHEADER) + Header->MemSize; ZwFreeVirtualMemory(NtCurrentProcess(), (PVOID *) &Header, &MemSize, MEM_RELEASE); }
16 years, 2 months
1
0
0
0
[sserapion] 36910: Reorganize a bit, remove unneeded .
by sserapion@svn.reactos.org
Author: sserapion Date: Thu Oct 23 10:18:23 2008 New Revision: 36910 URL:
http://svn.reactos.org/svn/reactos?rev=36910&view=rev
Log: Reorganize a bit, remove unneeded . Modified: branches/ros-amd64-bringup/reactos/tools/rsym.h Modified: branches/ros-amd64-bringup/reactos/tools/rsym.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/tools…
============================================================================== --- branches/ros-amd64-bringup/reactos/tools/rsym.h [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/tools/rsym.h [iso-8859-1] Thu Oct 23 10:18:23 2008 @@ -6,6 +6,17 @@ #define IMAGE_DOS_MAGIC 0x5a4d #define IMAGE_PE_MAGIC 0x00004550 #define IMAGE_SIZEOF_SHORT_NAME 8 + +#define IMAGE_FILE_LINE_NUMS_STRIPPED 0x0004 +#define IMAGE_FILE_LOCAL_SYMS_STRIPPED 0x0008 +#define IMAGE_FILE_DEBUG_STRIPPED 0x0200 + +#define IMAGE_DIRECTORY_ENTRY_BASERELOC 5 + +#define IMAGE_SCN_TYPE_NOLOAD 0x00000002 +#define IMAGE_SCN_LNK_REMOVE 0x00000800 +#define IMAGE_SCN_MEM_READ 0x40000000 +#define IMAGE_SCN_MEM_DISCARDABLE 0x02000000 #define IMAGE_NUMBEROF_DIRECTORY_ENTRIES 16 @@ -34,6 +45,7 @@ #endif #pragma pack(push,2) + typedef struct _IMAGE_DOS_HEADER { WORD e_magic; WORD e_cblp; @@ -56,10 +68,6 @@ LONG e_lfanew; } IMAGE_DOS_HEADER,*PIMAGE_DOS_HEADER; #pragma pack(pop) - -#define IMAGE_FILE_LINE_NUMS_STRIPPED 4 -#define IMAGE_FILE_LOCAL_SYMS_STRIPPED 8 -#define IMAGE_FILE_DEBUG_STRIPPED 512 #pragma pack(push,4) typedef struct _IMAGE_FILE_HEADER { @@ -145,40 +153,14 @@ IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES]; } IMAGE_OPTIONAL_HEADER64,*PIMAGE_OPTIONAL_HEADER64; -#pragma pack(push,4) -typedef struct _IMAGE_NT_HEADERS32 { - DWORD Signature; - IMAGE_FILE_HEADER FileHeader; - IMAGE_OPTIONAL_HEADER32 OptionalHeader; -} IMAGE_NT_HEADERS32,*PIMAGE_NT_HEADERS32; -#pragma pack(pop) - -#pragma pack(push,4) -typedef struct _IMAGE_NT_HEADERS64 { - DWORD Signature; - IMAGE_FILE_HEADER FileHeader; - IMAGE_OPTIONAL_HEADER64 OptionalHeader; -} IMAGE_NT_HEADERS64,*PIMAGE_NT_HEADERS64; -#pragma pack(pop) #ifdef _TARGET_PE64 typedef IMAGE_OPTIONAL_HEADER64 IMAGE_OPTIONAL_HEADER; typedef PIMAGE_OPTIONAL_HEADER64 PIMAGE_OPTIONAL_HEADER; -typedef IMAGE_NT_HEADERS64 IMAGE_NT_HEADERS; -typedef PIMAGE_NT_HEADERS64 PIMAGE_NT_HEADERS; #else typedef IMAGE_OPTIONAL_HEADER32 IMAGE_OPTIONAL_HEADER; typedef PIMAGE_OPTIONAL_HEADER32 PIMAGE_OPTIONAL_HEADER; -typedef IMAGE_NT_HEADERS32 IMAGE_NT_HEADERS; -typedef PIMAGE_NT_HEADERS32 PIMAGE_NT_HEADERS; #endif - -#define IMAGE_DIRECTORY_ENTRY_BASERELOC 5 - -#define IMAGE_SCN_TYPE_NOLOAD 0x00000002 -#define IMAGE_SCN_LNK_REMOVE 0x00000800 -#define IMAGE_SCN_MEM_READ 0x40000000 -#define IMAGE_SCN_MEM_DISCARDABLE 0x02000000 typedef struct _IMAGE_SECTION_HEADER { BYTE Name[IMAGE_SIZEOF_SHORT_NAME]; @@ -200,6 +182,7 @@ typedef struct _IMAGE_BASE_RELOCATION { DWORD VirtualAddress; DWORD SizeOfBlock; + WORD TypeOffset[1]; } IMAGE_BASE_RELOCATION,*PIMAGE_BASE_RELOCATION; #pragma pack(pop)
16 years, 2 months
1
0
0
0
[sserapion] 36909: Ntdll build fixes.
by sserapion@svn.reactos.org
Author: sserapion Date: Thu Oct 23 10:09:55 2008 New Revision: 36909 URL:
http://svn.reactos.org/svn/reactos?rev=36909&view=rev
Log: Ntdll build fixes. Modified: branches/ros-amd64-bringup/reactos/dll/ntdll/ldr/utils.c Modified: branches/ros-amd64-bringup/reactos/dll/ntdll/ldr/utils.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/n…
============================================================================== --- branches/ros-amd64-bringup/reactos/dll/ntdll/ldr/utils.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/dll/ntdll/ldr/utils.c [iso-8859-1] Thu Oct 23 10:09:55 2008 @@ -1226,7 +1226,8 @@ { PIMAGE_DATA_DIRECTORY RelocationDDir; PIMAGE_BASE_RELOCATION RelocationDir, RelocationEnd; - ULONG Count, ProtectSize, OldProtect, OldProtect2; + ULONG Count, OldProtect, OldProtect2; + SIZE_T ProtectSize; PVOID Page, ProtectPage, ProtectPage2; PUSHORT TypeOffset; ULONG_PTR Delta; @@ -1413,7 +1414,7 @@ PVOID IATBase; ULONG OldProtect; ULONG Ordinal; - ULONG IATSize; + SIZE_T IATSize; if (ImportModuleDirectory == NULL || ImportModuleDirectory->Name == 0) { @@ -1559,7 +1560,7 @@ PVOID IATBase; ULONG OldProtect; ULONG Offset; - ULONG IATSize; + SIZE_T IATSize; PIMAGE_NT_HEADERS NTHeaders; PCHAR Name; ULONG Size; @@ -2559,7 +2560,7 @@ { TRACE_LDR("Unload %wZ - Calling entry point at %x\n", &Module->BaseDllName, Module->EntryPoint); - LdrpCallDllEntry(Module, DLL_PROCESS_DETACH, (PVOID)(Module->LoadCount == 0xFFFF ? 1 : 0)); + LdrpCallDllEntry(Module, DLL_PROCESS_DETACH, (PVOID)(INT_PTR)(Module->LoadCount == 0xFFFF ? 1 : 0)); } else { @@ -2644,7 +2645,7 @@ Module->Flags |= LDRP_LOAD_IN_PROGRESS; TRACE_LDR("%wZ loaded - Calling init routine at %x for process attaching\n", &Module->BaseDllName, Module->EntryPoint); - Result = LdrpCallDllEntry(Module, DLL_PROCESS_ATTACH, (PVOID)(Module->LoadCount == 0xFFFF ? 1 : 0)); + Result = LdrpCallDllEntry(Module, DLL_PROCESS_ATTACH, (PVOID)(INT_PTR)(Module->LoadCount == 0xFFFF ? 1 : 0)); if (!Result) { Status = STATUS_DLL_INIT_FAILED;
16 years, 2 months
1
0
0
0
[sserapion] 36908: Fix 64bit build.
by sserapion@svn.reactos.org
Author: sserapion Date: Thu Oct 23 09:52:38 2008 New Revision: 36908 URL:
http://svn.reactos.org/svn/reactos?rev=36908&view=rev
Log: Fix 64bit build. Modified: branches/ros-amd64-bringup/reactos/dll/cpl/ncpa/ncpa.c Modified: branches/ros-amd64-bringup/reactos/dll/cpl/ncpa/ncpa.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/c…
============================================================================== --- branches/ros-amd64-bringup/reactos/dll/cpl/ncpa/ncpa.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/dll/cpl/ncpa/ncpa.c [iso-8859-1] Thu Oct 23 09:52:38 2008 @@ -25,7 +25,7 @@ wcscpy(szParameters, L"/n,::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\::{7007ACC7-3202-11D1-AAD2-00805FC1270E}"); - return (int) ShellExecuteW(NULL, L"open", L"explorer.exe", szParameters, NULL, SW_SHOWDEFAULT) > 32; + return (INT_PTR) ShellExecuteW(NULL, L"open", L"explorer.exe", szParameters, NULL, SW_SHOWDEFAULT) > 32; } /* Control Panel Callback */
16 years, 2 months
1
0
0
0
[sserapion] 36907: Fix taskmgr build after GetProcessAffinityMask definition change.
by sserapion@svn.reactos.org
Author: sserapion Date: Thu Oct 23 09:43:08 2008 New Revision: 36907 URL:
http://svn.reactos.org/svn/reactos?rev=36907&view=rev
Log: Fix taskmgr build after GetProcessAffinityMask definition change. Modified: branches/ros-amd64-bringup/reactos/base/applications/taskmgr/affinity.c Modified: branches/ros-amd64-bringup/reactos/base/applications/taskmgr/affinity.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/base/…
============================================================================== --- branches/ros-amd64-bringup/reactos/base/applications/taskmgr/affinity.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/base/applications/taskmgr/affinity.c [iso-8859-1] Thu Oct 23 09:43:08 2008 @@ -75,8 +75,8 @@ INT_PTR CALLBACK AffinityDialogWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { - DWORD dwProcessAffinityMask = 0; - DWORD dwSystemAffinityMask = 0; + DWORD_PTR dwProcessAffinityMask = 0; + DWORD_PTR dwSystemAffinityMask = 0; WCHAR strErrorText[260]; WCHAR szTitle[256]; BYTE nCpu;
16 years, 2 months
1
0
0
0
[sserapion] 36906: - Fix definitions of CDHOOKPROC, PROC, FARPROC, NEARPROC - Fix definitions of SYSTEM_INFO, COMPAREITEMSTRUCT, COPYDATASTRUCT, DELETEITEMSTRUCT, DRAWITEMSTRUCT, MENUITEMINFOA/W, HELPINFO, MSGBOXPARAMSA/W, MOUSEHOOKSTRUCT, DROPSTRUCT, KBDLLHOOKSTRUCT - Fix definitions of GetProcessAffinityMask, SetProcessAffinityMask, DragObject, InsertMenuA/W, ModifyMenuA/W, WinHelpA/W, RT_GROUP_CURSOR, RT_GROUP_ICON - Fix Treeview in 64bit regedit. - Patch by Daniel Verkamp.
by sserapion@svn.reactos.org
Author: sserapion Date: Thu Oct 23 09:27:06 2008 New Revision: 36906 URL:
http://svn.reactos.org/svn/reactos?rev=36906&view=rev
Log: - Fix definitions of CDHOOKPROC, PROC, FARPROC, NEARPROC - Fix definitions of SYSTEM_INFO, COMPAREITEMSTRUCT, COPYDATASTRUCT, DELETEITEMSTRUCT, DRAWITEMSTRUCT, MENUITEMINFOA/W, HELPINFO, MSGBOXPARAMSA/W, MOUSEHOOKSTRUCT, DROPSTRUCT, KBDLLHOOKSTRUCT - Fix definitions of GetProcessAffinityMask, SetProcessAffinityMask, DragObject, InsertMenuA/W, ModifyMenuA/W, WinHelpA/W, RT_GROUP_CURSOR, RT_GROUP_ICON - Fix Treeview in 64bit regedit. - Patch by Daniel Verkamp. Modified: branches/ros-amd64-bringup/reactos/include/psdk/commctrl.h branches/ros-amd64-bringup/reactos/include/psdk/commdlg.h branches/ros-amd64-bringup/reactos/include/psdk/winbase.h branches/ros-amd64-bringup/reactos/include/psdk/windef.h branches/ros-amd64-bringup/reactos/include/psdk/winuser.h Modified: branches/ros-amd64-bringup/reactos/include/psdk/commctrl.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/inclu…
============================================================================== --- branches/ros-amd64-bringup/reactos/include/psdk/commctrl.h [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/include/psdk/commctrl.h [iso-8859-1] Thu Oct 23 09:27:06 2008 @@ -2412,10 +2412,10 @@ #define TVIF_INTEGRAL 0x0080 #define TVIF_DI_SETITEM 0x1000 -#define TVI_ROOT ((HTREEITEM)0xffff0000) /* -65536 */ -#define TVI_FIRST ((HTREEITEM)0xffff0001) /* -65535 */ -#define TVI_LAST ((HTREEITEM)0xffff0002) /* -65534 */ -#define TVI_SORT ((HTREEITEM)0xffff0003) /* -65533 */ +#define TVI_ROOT ((HTREEITEM)(ULONG_PTR)-0x10000) /* -65536 */ +#define TVI_FIRST ((HTREEITEM)(ULONG_PTR)-0x0FFFF) /* -65535 */ +#define TVI_LAST ((HTREEITEM)(ULONG_PTR)-0x0FFFE) /* -65534 */ +#define TVI_SORT ((HTREEITEM)(ULONG_PTR)-0x0FFFD) /* -65533 */ #define TVIS_FOCUSED 0x0001 #define TVIS_SELECTED 0x0002 Modified: branches/ros-amd64-bringup/reactos/include/psdk/commdlg.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/inclu…
============================================================================== --- branches/ros-amd64-bringup/reactos/include/psdk/commdlg.h [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/include/psdk/commdlg.h [iso-8859-1] Thu Oct 23 09:27:06 2008 @@ -216,7 +216,7 @@ #define CommDlg_OpenSave_HideControl(d,i) ((void)SNDMSG((d),CDM_HIDECONTROL,(i),0)) #define CommDlg_OpenSave_SetDefExt(d,e) ((void)SNDMSG((d),CDM_SETDEFEXT,0,(LPARAM)(e))) -typedef UINT (APIENTRY *__CDHOOKPROC)(HWND,UINT,WPARAM,LPARAM); +typedef UINT_PTR (APIENTRY *__CDHOOKPROC)(HWND,UINT,WPARAM,LPARAM); typedef __CDHOOKPROC LPCCHOOKPROC; typedef __CDHOOKPROC LPCFHOOKPROC; typedef __CDHOOKPROC LPFRHOOKPROC; Modified: branches/ros-amd64-bringup/reactos/include/psdk/winbase.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/inclu…
============================================================================== --- branches/ros-amd64-bringup/reactos/include/psdk/winbase.h [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/include/psdk/winbase.h [iso-8859-1] Thu Oct 23 09:27:06 2008 @@ -910,7 +910,7 @@ DWORD dwPageSize; PVOID lpMinimumApplicationAddress; PVOID lpMaximumApplicationAddress; - DWORD dwActiveProcessorMask; + DWORD_PTR dwActiveProcessorMask; DWORD dwNumberOfProcessors; DWORD dwProcessorType; DWORD dwAllocationGranularity; @@ -1530,7 +1530,7 @@ BOOL WINAPI GetPrivateProfileStructA(LPCSTR,LPCSTR,LPVOID,UINT,LPCSTR); BOOL WINAPI GetPrivateProfileStructW(LPCWSTR,LPCWSTR,LPVOID,UINT,LPCWSTR); FARPROC WINAPI GetProcAddress(HINSTANCE,LPCSTR); -BOOL WINAPI GetProcessAffinityMask(HANDLE,PDWORD,PDWORD); +BOOL WINAPI GetProcessAffinityMask(HANDLE,PDWORD_PTR,PDWORD_PTR); #if (_WIN32_WINNT >= 0x0502) BOOL WINAPI GetProcessHandleCount(HANDLE,PDWORD); #endif @@ -2071,7 +2071,7 @@ BOOL WINAPI SetNamedPipeHandleState(HANDLE,PDWORD,PDWORD,PDWORD); BOOL WINAPI SetPriorityClass(HANDLE,DWORD); BOOL WINAPI SetPrivateObjectSecurity(SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR *,PGENERIC_MAPPING,HANDLE); -BOOL WINAPI SetProcessAffinityMask(HANDLE,DWORD); +BOOL WINAPI SetProcessAffinityMask(HANDLE,DWORD_PTR); BOOL WINAPI SetProcessPriorityBoost(HANDLE,BOOL); BOOL WINAPI SetProcessShutdownParameters(DWORD,DWORD); BOOL WINAPI SetProcessWorkingSetSize(HANDLE,SIZE_T,SIZE_T); Modified: branches/ros-amd64-bringup/reactos/include/psdk/windef.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/inclu…
============================================================================== --- branches/ros-amd64-bringup/reactos/include/psdk/windef.h [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/include/psdk/windef.h [iso-8859-1] Thu Oct 23 09:27:06 2008 @@ -348,9 +348,9 @@ typedef int HFILE; typedef HICON HCURSOR; typedef DWORD COLORREF; -typedef int (WINAPI *FARPROC)(); -typedef int (WINAPI *NEARPROC)(); -typedef int (WINAPI *PROC)(); +typedef INT_PTR (WINAPI *FARPROC)(); +typedef INT_PTR (WINAPI *NEARPROC)(); +typedef INT_PTR (WINAPI *PROC)(); typedef struct tagRECT { LONG left; LONG top; Modified: branches/ros-amd64-bringup/reactos/include/psdk/winuser.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/inclu…
============================================================================== --- branches/ros-amd64-bringup/reactos/include/psdk/winuser.h [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/include/psdk/winuser.h [iso-8859-1] Thu Oct 23 09:27:06 2008 @@ -615,8 +615,8 @@ #define RT_RCDATA MAKEINTRESOURCE(10) #define RT_MESSAGETABLE MAKEINTRESOURCE(11) #define DIFFERENCE 11 -#define RT_GROUP_CURSOR MAKEINTRESOURCE((DWORD)RT_CURSOR+DIFFERENCE) -#define RT_GROUP_ICON MAKEINTRESOURCE((DWORD)RT_ICON+DIFFERENCE) +#define RT_GROUP_CURSOR MAKEINTRESOURCE((ULONG_PTR)RT_CURSOR+DIFFERENCE) +#define RT_GROUP_ICON MAKEINTRESOURCE((ULONG_PTR)RT_ICON+DIFFERENCE) #define RT_VERSION MAKEINTRESOURCE(16) #define RT_DLGINCLUDE MAKEINTRESOURCE(17) #define RT_PLUGPLAY MAKEINTRESOURCE(19) @@ -2804,13 +2804,13 @@ UINT CtlID; HWND hwndItem; UINT itemID1; - DWORD itemData1; + ULONG_PTR itemData1; UINT itemID2; - DWORD itemData2; + ULONG_PTR itemData2; DWORD dwLocaleId; } COMPAREITEMSTRUCT,*LPCOMPAREITEMSTRUCT; typedef struct tagCOPYDATASTRUCT { - DWORD dwData; + ULONG_PTR dwData; DWORD cbData; PVOID lpData; } COPYDATASTRUCT,*PCOPYDATASTRUCT; @@ -2848,7 +2848,7 @@ UINT CtlID; UINT itemID; HWND hwndItem; - UINT itemData; + ULONG_PTR itemData; } DELETEITEMSTRUCT,*PDELETEITEMSTRUCT,*LPDELETEITEMSTRUCT; #pragma pack(push,2) typedef struct { @@ -2887,7 +2887,7 @@ HWND hwndItem; HDC hDC; RECT rcItem; - DWORD itemData; + ULONG_PTR itemData; } DRAWITEMSTRUCT,*LPDRAWITEMSTRUCT,*PDRAWITEMSTRUCT; typedef struct { UINT cbSize; @@ -2985,7 +2985,7 @@ HMENU hSubMenu; HBITMAP hbmpChecked; HBITMAP hbmpUnchecked; - DWORD dwItemData; + ULONG_PTR dwItemData; LPSTR dwTypeData; UINT cch; #if (_WIN32_WINNT >= 0x0500) @@ -3002,7 +3002,7 @@ HMENU hSubMenu; HBITMAP hbmpChecked; HBITMAP hbmpUnchecked; - DWORD dwItemData; + ULONG_PTR dwItemData; LPWSTR dwTypeData; UINT cch; #if (_WIN32_WINNT >= 0x0500) @@ -3043,7 +3043,7 @@ int iContextType; int iCtrlId; HANDLE hItemHandle; - DWORD dwContextId; + DWORD_PTR dwContextId; POINT MousePos; } HELPINFO,*LPHELPINFO; typedef void(CALLBACK *MSGBOXCALLBACK)(LPHELPINFO); @@ -3055,7 +3055,7 @@ LPCSTR lpszCaption; DWORD dwStyle; LPCSTR lpszIcon; - DWORD dwContextHelpId; + DWORD_PTR dwContextHelpId; MSGBOXCALLBACK lpfnMsgBoxCallback; DWORD dwLanguageId; } MSGBOXPARAMSA,*PMSGBOXPARAMSA,*LPMSGBOXPARAMSA; @@ -3067,7 +3067,7 @@ LPCWSTR lpszCaption; DWORD dwStyle; LPCWSTR lpszIcon; - DWORD dwContextHelpId; + DWORD_PTR dwContextHelpId; MSGBOXCALLBACK lpfnMsgBoxCallback; DWORD dwLanguageId; } MSGBOXPARAMSW,*PMSGBOXPARAMSW,*LPMSGBOXPARAMSW; @@ -3220,7 +3220,7 @@ POINT pt; HWND hwnd; UINT wHitTestCode; - DWORD dwExtraInfo; + ULONG_PTR dwExtraInfo; } MOUSEHOOKSTRUCT,*LPMOUSEHOOKSTRUCT,*PMOUSEHOOKSTRUCT; #if ( _WIN32_WINNT >= 0x0500 ) #ifdef __cplusplus @@ -3306,13 +3306,13 @@ UINT itemID; UINT itemWidth; UINT itemHeight; - DWORD itemData; + ULONG_PTR itemData; } MEASUREITEMSTRUCT,*PMEASUREITEMSTRUCT,*LPMEASUREITEMSTRUCT; typedef struct tagDROPSTRUCT { HWND hwndSource; HWND hwndSink; DWORD wFmt; - DWORD dwData; + ULONG_PTR dwData; POINT ptDrop; DWORD dwControlData; } DROPSTRUCT,*PDROPSTRUCT,*LPDROPSTRUCT; @@ -3451,7 +3451,7 @@ DWORD scanCode; DWORD flags; DWORD time; - DWORD dwExtraInfo; + ULONG_PTR dwExtraInfo; } KBDLLHOOKSTRUCT,*LPKBDLLHOOKSTRUCT,*PKBDLLHOOKSTRUCT; typedef struct tagMSLLHOOKSTRUCT { @@ -3750,7 +3750,7 @@ BOOL WINAPI DlgDirSelectExA(HWND,LPSTR,int,int); BOOL WINAPI DlgDirSelectExW(HWND,LPWSTR,int,int); BOOL WINAPI DragDetect(HWND,POINT); -DWORD WINAPI DragObject(HWND,HWND,UINT,DWORD,HCURSOR); +DWORD WINAPI DragObject(HWND,HWND,UINT,ULONG_PTR,HCURSOR); BOOL WINAPI DrawAnimatedRects(HWND,int,LPCRECT,LPCRECT); BOOL WINAPI DrawCaption(HWND,HDC,LPCRECT,UINT); BOOL WINAPI DrawCaptionTempA(HWND,HDC,const RECT*,HFONT,HICON,LPCSTR,UINT); @@ -3988,8 +3988,8 @@ #if (_WIN32_WINNT >= 0x0500 || _WIN32_WINDOWS >= 0x0410) DWORD WINAPI InSendMessageEx(LPVOID); #endif -BOOL WINAPI InsertMenuA(HMENU,UINT,UINT,UINT,LPCSTR); -BOOL WINAPI InsertMenuW(HMENU,UINT,UINT,UINT,LPCWSTR); +BOOL WINAPI InsertMenuA(HMENU,UINT,UINT,UINT_PTR,LPCSTR); +BOOL WINAPI InsertMenuW(HMENU,UINT,UINT,UINT_PTR,LPCWSTR); BOOL WINAPI InsertMenuItemA(HMENU,UINT,BOOL,LPCMENUITEMINFOA); BOOL WINAPI InsertMenuItemW(HMENU,UINT,BOOL,LPCMENUITEMINFOW); INT WINAPI InternalGetWindowText(HWND,LPWSTR,INT); @@ -4069,8 +4069,8 @@ int WINAPI MessageBoxExW(HWND,LPCWSTR,LPCWSTR,UINT,WORD); int WINAPI MessageBoxIndirectA(CONST MSGBOXPARAMSA*); int WINAPI MessageBoxIndirectW(CONST MSGBOXPARAMSW*); -BOOL WINAPI ModifyMenuA(HMENU,UINT,UINT,UINT,LPCSTR); -BOOL WINAPI ModifyMenuW(HMENU,UINT,UINT,UINT,LPCWSTR); +BOOL WINAPI ModifyMenuA(HMENU,UINT,UINT,UINT_PTR,LPCSTR); +BOOL WINAPI ModifyMenuW(HMENU,UINT,UINT,UINT_PTR,LPCWSTR); HMONITOR WINAPI MonitorFromPoint(POINT,DWORD); HMONITOR WINAPI MonitorFromRect(LPCRECT,DWORD); HMONITOR WINAPI MonitorFromWindow(HWND,DWORD); @@ -4284,8 +4284,8 @@ HWND WINAPI WindowFromDC(HDC hDC); HWND WINAPI WindowFromPoint(POINT); UINT WINAPI WinExec(LPCSTR,UINT); -BOOL WINAPI WinHelpA(HWND,LPCSTR,UINT,DWORD); -BOOL WINAPI WinHelpW(HWND,LPCWSTR,UINT,DWORD); +BOOL WINAPI WinHelpA(HWND,LPCSTR,UINT,ULONG_PTR); +BOOL WINAPI WinHelpW(HWND,LPCWSTR,UINT,ULONG_PTR); int WINAPIV wsprintfA(LPSTR,LPCSTR,...); int WINAPIV wsprintfW(LPWSTR,LPCWSTR,...); int WINAPI wvsprintfA(LPSTR,LPCSTR,va_list arglist);
16 years, 2 months
1
0
0
0
[dreimer] 36905: Next RosBE RC in Preperation. This time splitted in default and 64 bit in a optional installer.
by dreimer@svn.reactos.org
Author: dreimer Date: Thu Oct 23 07:48:35 2008 New Revision: 36905 URL:
http://svn.reactos.org/svn/reactos?rev=36905&view=rev
Log: Next RosBE RC in Preperation. This time splitted in default and 64 bit in a optional installer. Modified: trunk/tools/RosBE/RosBE-Windows/Root/ChangeLog.txt trunk/tools/RosBE/RosBE-Windows/RosBE64.nsi Modified: trunk/tools/RosBE/RosBE-Windows/Root/ChangeLog.txt URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/Cha…
============================================================================== --- trunk/tools/RosBE/RosBE-Windows/Root/ChangeLog.txt [iso-8859-1] (original) +++ trunk/tools/RosBE/RosBE-Windows/Root/ChangeLog.txt [iso-8859-1] Thu Oct 23 07:48:35 2008 @@ -1,16 +1,16 @@ *** July 17th, 2008 - RosBE 1.3 Released - Added: Tool to set the Architecture to build ROS for. (Daniel Reimer) -- Updated: NASM to 2.03.01 (Daniel Reimer) -- Updated: NSIS to 2.39 (Daniel Reimer) -- Updated: Subversion to 1.5.2 (Daniel Reimer) +- Updated: NASM to 2.04 (Daniel Reimer) +- Updated: NSIS to 2.40 (Daniel Reimer) +- Updated: Subversion to 1.5.3 (Daniel Reimer) - Updated: GDB to 6.8-3 (Daniel Reimer) - Updated: Binutils 2.18.50 Build 20080109. (Daniel Reimer) - Updated: MingW32 Make 3.81-3 (Daniel Reimer) - Updated: ccache 2.4 is now a native Version Without Cygwin (Colin Finck) X - Other small Fixes here and there (Daniel Reimer) - Added: Basic PowerShell Version of RosBE (Daniel Reimer) -- Added: YASM 0.71, which supports 64 bit asm too. (Daniel Reimer) +- Added: YASM 0.72, which supports 64 bit asm too. (Daniel Reimer) - Added: Update command (Daniel Reimer) - Added: Mingw-64 GCC 4.4.0 for the 64 bit Branch. (Daniel Reimer) - Fixed: Dependant on the Arch variable a crosscompiler will be used now. (Daniel Reimer) Modified: trunk/tools/RosBE/RosBE-Windows/RosBE64.nsi URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/RosBE64.…
============================================================================== --- trunk/tools/RosBE/RosBE-Windows/RosBE64.nsi [iso-8859-1] (original) +++ trunk/tools/RosBE/RosBE-Windows/RosBE64.nsi [iso-8859-1] Thu Oct 23 07:48:35 2008 @@ -90,8 +90,6 @@ !insertmacro MUI_PAGE_INSTFILES !define MUI_FINISHPAGE_TITLE_3LINES -!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\README.pdf" -!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED !insertmacro MUI_PAGE_FINISH ;; @@ -109,9 +107,6 @@ SetShellVarContext current SetOutPath "$INSTDIR" SetOverwrite try - File /r Icons\mingw.ico - File /r Icons\rosbe.ico - File /r Root\LICENSE.txt File /r Root\charch.cmd SectionEnd
16 years, 2 months
1
0
0
0
[janderwald] 36904: - Fix bug 3782 take #2 - Apply the fix to right source file and not to code which isnt build anymore
by janderwald@svn.reactos.org
Author: janderwald Date: Thu Oct 23 01:15:43 2008 New Revision: 36904 URL:
http://svn.reactos.org/svn/reactos?rev=36904&view=rev
Log: - Fix bug 3782 take #2 - Apply the fix to right source file and not to code which isnt build anymore Removed: trunk/reactos/dll/win32/shell32/cpanelfolder.c Modified: trunk/reactos/dll/win32/shell32/shfldr_cpanel.c Removed: trunk/reactos/dll/win32/shell32/cpanelfolder.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/cpanelfo…
============================================================================== --- trunk/reactos/dll/win32/shell32/cpanelfolder.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/cpanelfolder.c (removed) @@ -1,1377 +1,0 @@ -/* - * Control panel folder - * - * Copyright 2003 Martin Fuchs - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - - -#include <precomp.h> - - -WINE_DEFAULT_DEBUG_CHANNEL(shell); - -/*********************************************************************** -* control panel implementation in shell namespace -*/ - -typedef struct { - const IShellFolder2Vtbl *lpVtbl; - LONG ref; - const IPersistFolder2Vtbl *lpVtblPersistFolder2; - const IShellExecuteHookWVtbl *lpVtblShellExecuteHookW; - const IShellExecuteHookAVtbl *lpVtblShellExecuteHookA; - const IContextMenu2Vtbl *lpVtblContextMenu; - IUnknown *pUnkOuter; /* used for aggregation */ - - /* both paths are parsible from the desktop */ - LPITEMIDLIST pidlRoot; /* absolute pidl */ - int dwAttributes; /* attributes returned by GetAttributesOf FIXME: use it */ - LPCITEMIDLIST *apidl; - UINT cidl; -} ICPanelImpl, *LPICPanelImpl; - -static const IShellFolder2Vtbl vt_ShellFolder2; -static const IPersistFolder2Vtbl vt_PersistFolder2; -static const IShellExecuteHookWVtbl vt_ShellExecuteHookW; -static const IShellExecuteHookAVtbl vt_ShellExecuteHookA; -static const IContextMenu2Vtbl vt_ContextMenu; - -static LPICPanelImpl __inline impl_from_IPersistFolder2( IPersistFolder2 *iface ) -{ - return (LPICPanelImpl)((char*)iface - FIELD_OFFSET(ICPanelImpl, lpVtblPersistFolder2)); -} - -static LPICPanelImpl __inline impl_from_IContextMenu( IContextMenu2 *iface ) -{ - return (LPICPanelImpl)((char*)iface - FIELD_OFFSET(ICPanelImpl, lpVtblContextMenu)); -} - - -static LPICPanelImpl __inline impl_from_IShellExecuteHookW( IShellExecuteHookW *iface ) -{ - return (LPICPanelImpl)((char*)iface - FIELD_OFFSET(ICPanelImpl, lpVtblShellExecuteHookW)); -} - -static LPICPanelImpl __inline impl_from_IShellExecuteHookA( IShellExecuteHookA *iface ) -{ - return (LPICPanelImpl)((char*)iface - FIELD_OFFSET(ICPanelImpl, lpVtblShellExecuteHookA)); -} - - -/* - converts This to an interface pointer -*/ -#define _IUnknown_(This) (IUnknown*)&(This->lpVtbl) -#define _IShellFolder_(This) (IShellFolder*)&(This->lpVtbl) -#define _IShellFolder2_(This) (IShellFolder2*)&(This->lpVtbl) - -#define _IPersist_(This) (IPersist*)&(This->lpVtblPersistFolder2) -#define _IPersistFolder_(This) (IPersistFolder*)&(This->lpVtblPersistFolder2) -#define _IPersistFolder2_(This) (IPersistFolder2*)&(This->lpVtblPersistFolder2) -#define _IShellExecuteHookW_(This) (IShellExecuteHookW*)&(This->lpVtblShellExecuteHookW) -#define _IShellExecuteHookA_(This) (IShellExecuteHookA*)&(This->lpVtblShellExecuteHookA) - - -/*********************************************************************** -* IShellFolder [ControlPanel] implementation -*/ - -static const shvheader ControlPanelSFHeader[] = { - {IDS_SHV_COLUMN8, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 15},/*FIXME*/ - {IDS_SHV_COLUMN9, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 200},/*FIXME*/ -}; - -#define CONROLPANELSHELLVIEWCOLUMNS 2 - -/************************************************************************** -* IControlPanel_Constructor -*/ -HRESULT WINAPI IControlPanel_Constructor(IUnknown* pUnkOuter, REFIID riid, LPVOID * ppv) -{ - ICPanelImpl *sf; - - TRACE("unkOut=%p %s\n", pUnkOuter, shdebugstr_guid(riid)); - - if (!ppv) - return E_POINTER; - if (pUnkOuter && !IsEqualIID (riid, &IID_IUnknown)) - return CLASS_E_NOAGGREGATION; - - sf = (ICPanelImpl *) LocalAlloc(LMEM_ZEROINIT, sizeof(ICPanelImpl)); - if (!sf) - return E_OUTOFMEMORY; - - sf->ref = 0; - sf->apidl = NULL; - sf->cidl = 0; - sf->lpVtbl = &vt_ShellFolder2; - sf->lpVtblPersistFolder2 = &vt_PersistFolder2; - sf->lpVtblShellExecuteHookW = &vt_ShellExecuteHookW; - sf->lpVtblShellExecuteHookA = &vt_ShellExecuteHookA; - sf->lpVtblContextMenu = &vt_ContextMenu; - sf->pidlRoot = _ILCreateControlPanel(); /* my qualified pidl */ - sf->pUnkOuter = pUnkOuter ? pUnkOuter : _IUnknown_ (sf); - - if (!SUCCEEDED(IUnknown_QueryInterface(_IUnknown_(sf), riid, ppv))) { - IUnknown_Release(_IUnknown_(sf)); - return E_NOINTERFACE; - } - - TRACE("--(%p)\n", sf); - return S_OK; -} - -/************************************************************************** - * ISF_ControlPanel_fnQueryInterface - * - * NOTES supports not IPersist/IPersistFolder - */ -static HRESULT WINAPI ISF_ControlPanel_fnQueryInterface(IShellFolder2 * iface, REFIID riid, LPVOID * ppvObject) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - - TRACE("(%p)->(%s,%p)\n", This, shdebugstr_guid(riid), ppvObject); - - *ppvObject = NULL; - - if (IsEqualIID(riid, &IID_IUnknown) || - IsEqualIID(riid, &IID_IShellFolder) || IsEqualIID(riid, &IID_IShellFolder2)) - *ppvObject = This; - else if (IsEqualIID(riid, &IID_IPersist) || - IsEqualIID(riid, &IID_IPersistFolder) || IsEqualIID(riid, &IID_IPersistFolder2)) - *ppvObject = _IPersistFolder2_(This); - else if (IsEqualIID(riid, &IID_IShellExecuteHookW)) - *ppvObject = _IShellExecuteHookW_(This); - else if (IsEqualIID(riid, &IID_IShellExecuteHookA)) - *ppvObject = _IShellExecuteHookA_(This); - - if (*ppvObject) { - IUnknown_AddRef((IUnknown *)(*ppvObject)); - TRACE("-- Interface:(%p)->(%p)\n", ppvObject, *ppvObject); - return S_OK; - } - TRACE("-- Interface: E_NOINTERFACE\n"); - return E_NOINTERFACE; -} - -static ULONG WINAPI ISF_ControlPanel_fnAddRef(IShellFolder2 * iface) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - ULONG refCount = InterlockedIncrement(&This->ref); - - TRACE("(%p)->(count=%u)\n", This, refCount - 1); - - return refCount; -} - -static ULONG WINAPI ISF_ControlPanel_fnRelease(IShellFolder2 * iface) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - ULONG refCount = InterlockedDecrement(&This->ref); - - TRACE("(%p)->(count=%u)\n", This, refCount + 1); - - if (!refCount) { - TRACE("-- destroying IShellFolder(%p)\n", This); - SHFree(This->pidlRoot); - LocalFree((HLOCAL) This); - } - return refCount; -} - -/************************************************************************** -* ISF_ControlPanel_fnParseDisplayName -*/ -static HRESULT WINAPI -ISF_ControlPanel_fnParseDisplayName(IShellFolder2 * iface, - HWND hwndOwner, - LPBC pbc, - LPOLESTR lpszDisplayName, - DWORD * pchEaten, LPITEMIDLIST * ppidl, DWORD * pdwAttributes) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - - HRESULT hr = E_INVALIDARG; - - FIXME("(%p)->(HWND=%p,%p,%p=%s,%p,pidl=%p,%p)\n", - This, hwndOwner, pbc, lpszDisplayName, debugstr_w(lpszDisplayName), pchEaten, ppidl, pdwAttributes); - - *ppidl = 0; - if (pchEaten) - *pchEaten = 0; - - TRACE("(%p)->(-- ret=0x%08x)\n", This, hr); - - return hr; -} - -static LPITEMIDLIST _ILCreateCPanelApplet(LPCSTR name, LPCSTR displayName, - LPCSTR comment, int iconIdx) -{ - PIDLCPanelStruct *p; - LPITEMIDLIST pidl; - PIDLDATA tmp; - int size0 = (char*)&tmp.u.cpanel.szName-(char*)&tmp.u.cpanel; - int size = size0; - int l; - - tmp.type = PT_CPLAPPLET; - tmp.u.cpanel.dummy = 0; - tmp.u.cpanel.iconIdx = iconIdx; - - l = strlen(name); - size += l+1; - - tmp.u.cpanel.offsDispName = l+1; - l = strlen(displayName); - size += l+1; - - tmp.u.cpanel.offsComment = tmp.u.cpanel.offsDispName+1+l; - l = strlen(comment); - size += l+1; - - pidl = SHAlloc(size+4); - if (!pidl) - return NULL; - - pidl->mkid.cb = size+2; - memcpy(pidl->mkid.abID, &tmp, 2+size0); - - p = &((PIDLDATA*)pidl->mkid.abID)->u.cpanel; - strcpy(p->szName, name); - strcpy(p->szName+tmp.u.cpanel.offsDispName, displayName); - strcpy(p->szName+tmp.u.cpanel.offsComment, comment); - - *(WORD*)((char*)pidl+(size+2)) = 0; - - pcheck(pidl); - - return pidl; -} - -/************************************************************************** - * _ILGetCPanelPointer() - * gets a pointer to the control panel struct stored in the pidl - */ -static PIDLCPanelStruct* _ILGetCPanelPointer(LPCITEMIDLIST pidl) -{ - LPPIDLDATA pdata = _ILGetDataPointer(pidl); - - if (pdata && pdata->type==PT_CPLAPPLET) - return (PIDLCPanelStruct*)&(pdata->u.cpanel); - - return NULL; -} - - /************************************************************************** - * ISF_ControlPanel_fnEnumObjects - */ -static BOOL SHELL_RegisterCPanelApp(IEnumIDList* list, LPCSTR path) -{ - LPITEMIDLIST pidl; - CPlApplet* applet; - CPanel panel; - CPLINFO info; - unsigned i; - int iconIdx; - - char displayName[MAX_PATH]; - char comment[MAX_PATH]; - - WCHAR wpath[MAX_PATH]; - - MultiByteToWideChar(CP_ACP, 0, path, -1, wpath, MAX_PATH); - - panel.first = NULL; - applet = Control_LoadApplet(0, wpath, &panel); - - if (applet) - { - for(i=0; i<applet->count; ++i) - { - WideCharToMultiByte(CP_ACP, 0, applet->info[i].szName, -1, displayName, MAX_PATH, 0, 0); - WideCharToMultiByte(CP_ACP, 0, applet->info[i].szInfo, -1, comment, MAX_PATH, 0, 0); - - applet->proc(0, CPL_INQUIRE, i, (LPARAM)&info); - - if (info.idIcon > 0) - iconIdx = -info.idIcon; /* negative icon index instead of icon number */ - else - iconIdx = 0; - - pidl = _ILCreateCPanelApplet(path, displayName, comment, iconIdx); - - if (pidl) - AddToEnumList(list, pidl); - } - Control_UnloadApplet(applet); - } - return TRUE; -} - -static int SHELL_RegisterRegistryCPanelApps(IEnumIDList* list, HKEY hkey_root, LPCSTR szRepPath) -{ - char name[MAX_PATH]; - char value[MAX_PATH]; - HKEY hkey; - - int cnt = 0; - - if (RegOpenKeyA(hkey_root, szRepPath, &hkey) == ERROR_SUCCESS) - { - int idx = 0; - - for(;; ++idx) - { - DWORD nameLen = MAX_PATH; - DWORD valueLen = MAX_PATH; - - if (RegEnumValueA(hkey, idx, name, &nameLen, NULL, NULL, (LPBYTE)&value, &valueLen) != ERROR_SUCCESS) - break; - - if (SHELL_RegisterCPanelApp(list, value)) - ++cnt; - } - RegCloseKey(hkey); - } - - return cnt; -} - -static int SHELL_RegisterCPanelFolders(IEnumIDList* list, HKEY hkey_root, LPCSTR szRepPath) -{ - char name[MAX_PATH]; - HKEY hkey; - - int cnt = 0; - - if (RegOpenKeyA(hkey_root, szRepPath, &hkey) == ERROR_SUCCESS) - { - int idx = 0; - for(;; ++idx) - { - if (RegEnumKeyA(hkey, idx, name, MAX_PATH) != ERROR_SUCCESS) - break; - - if (*name == '{') - { - LPITEMIDLIST pidl = _ILCreateGuidFromStrA(name); - - if (pidl && AddToEnumList(list, pidl)) - ++cnt; - } - } - - RegCloseKey(hkey); - } - - return cnt; -} - -/************************************************************************** - * CreateCPanelEnumList() - */ -static BOOL CreateCPanelEnumList( - IEnumIDList * iface, - DWORD dwFlags) -{ - CHAR szPath[MAX_PATH]; - WIN32_FIND_DATAA wfd; - HANDLE hFile; - - TRACE("(%p)->(flags=0x%08x)\n", iface, dwFlags); - - /* enumerate control panel folders */ - if (dwFlags & SHCONTF_FOLDERS) - SHELL_RegisterCPanelFolders(iface, HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\ControlPanel\\NameSpace"); - - /* enumerate the control panel applets */ - if (dwFlags & SHCONTF_NONFOLDERS) - { - LPSTR p; - - GetSystemDirectoryA(szPath, MAX_PATH); - p = PathAddBackslashA(szPath); - strcpy(p, "*.cpl"); - - TRACE("-- (%p)-> enumerate SHCONTF_NONFOLDERS of %s\n",iface,debugstr_a(szPath)); - hFile = FindFirstFileA(szPath, &wfd); - - if (hFile != INVALID_HANDLE_VALUE) - { - do - { - if (!(dwFlags & SHCONTF_INCLUDEHIDDEN) && (wfd.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN)) - continue; - - if (!(wfd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) { - strcpy(p, wfd.cFileName); - SHELL_RegisterCPanelApp((IEnumIDList*)iface, szPath); - } - } while(FindNextFileA(hFile, &wfd)); - FindClose(hFile); - } - - SHELL_RegisterRegistryCPanelApps((IEnumIDList*)iface, HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Control Panel\\Cpls"); - SHELL_RegisterRegistryCPanelApps((IEnumIDList*)iface, HKEY_CURRENT_USER, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Control Panel\\Cpls"); - } - return TRUE; -} - -/************************************************************************** -* ISF_ControlPanel_fnEnumObjects -*/ -static HRESULT WINAPI -ISF_ControlPanel_fnEnumObjects(IShellFolder2 * iface, HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST * ppEnumIDList) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - - TRACE("(%p)->(HWND=%p flags=0x%08x pplist=%p)\n", This, hwndOwner, dwFlags, ppEnumIDList); - - *ppEnumIDList = IEnumIDList_Constructor(); - if (*ppEnumIDList) - CreateCPanelEnumList(*ppEnumIDList, dwFlags); - - TRACE("--(%p)->(new ID List: %p)\n", This, *ppEnumIDList); - - return(*ppEnumIDList) ? S_OK : E_OUTOFMEMORY; -} - -/************************************************************************** -* ISF_ControlPanel_fnBindToObject -*/ -static HRESULT WINAPI -ISF_ControlPanel_fnBindToObject(IShellFolder2 * iface, LPCITEMIDLIST pidl, - LPBC pbcReserved, REFIID riid, LPVOID * ppvOut) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - - TRACE("(%p)->(pidl=%p,%p,%s,%p)\n", This, pidl, pbcReserved, shdebugstr_guid(riid), ppvOut); - - return SHELL32_BindToChild(This->pidlRoot, NULL, pidl, riid, ppvOut); -} - -/************************************************************************** -* ISF_ControlPanel_fnBindToStorage -*/ -static HRESULT WINAPI -ISF_ControlPanel_fnBindToStorage(IShellFolder2 * iface, - LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID * ppvOut) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - - FIXME("(%p)->(pidl=%p,%p,%s,%p) stub\n", This, pidl, pbcReserved, shdebugstr_guid(riid), ppvOut); - - *ppvOut = NULL; - return E_NOTIMPL; -} - -/************************************************************************** -* ISF_ControlPanel_fnCompareIDs -*/ - -static HRESULT WINAPI -ISF_ControlPanel_fnCompareIDs(IShellFolder2 * iface, LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - - int nReturn; - - TRACE("(%p)->(0x%08lx,pidl1=%p,pidl2=%p)\n", This, lParam, pidl1, pidl2); - nReturn = SHELL32_CompareIDs(_IShellFolder_(This), lParam, pidl1, pidl2); - TRACE("-- %i\n", nReturn); - return nReturn; -} - -/************************************************************************** -* ISF_ControlPanel_fnCreateViewObject -*/ -static HRESULT WINAPI -ISF_ControlPanel_fnCreateViewObject(IShellFolder2 * iface, HWND hwndOwner, REFIID riid, LPVOID * ppvOut) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - - LPSHELLVIEW pShellView; - HRESULT hr = E_INVALIDARG; - - TRACE("(%p)->(hwnd=%p,%s,%p)\n", This, hwndOwner, shdebugstr_guid(riid), ppvOut); - - if (ppvOut) { - *ppvOut = NULL; - - if (IsEqualIID(riid, &IID_IDropTarget)) { - WARN("IDropTarget not implemented\n"); - hr = E_NOTIMPL; - } else if (IsEqualIID(riid, &IID_IContextMenu)) { - WARN("IContextMenu not implemented\n"); - hr = E_NOTIMPL; - } else if (IsEqualIID(riid, &IID_IShellView)) { - pShellView = IShellView_Constructor((IShellFolder *) iface); - if (pShellView) { - hr = IShellView_QueryInterface(pShellView, riid, ppvOut); - IShellView_Release(pShellView); - } - } - } - TRACE("--(%p)->(interface=%p)\n", This, ppvOut); - return hr; -} - -/************************************************************************** -* ISF_ControlPanel_fnGetAttributesOf -*/ -static HRESULT WINAPI -ISF_ControlPanel_fnGetAttributesOf(IShellFolder2 * iface, UINT cidl, LPCITEMIDLIST * apidl, DWORD * rgfInOut) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - - HRESULT hr = S_OK; - - TRACE("(%p)->(cidl=%d apidl=%p mask=%p (0x%08x))\n", - This, cidl, apidl, rgfInOut, rgfInOut ? *rgfInOut : 0); - - if (!rgfInOut) - return E_INVALIDARG; - if (cidl && !apidl) - return E_INVALIDARG; - - if (*rgfInOut == 0) - *rgfInOut = ~0; - - while(cidl > 0 && *apidl) { - pdump(*apidl); - SHELL32_GetItemAttributes(_IShellFolder_(This), *apidl, rgfInOut); - apidl++; - cidl--; - } - /* make sure SFGAO_VALIDATE is cleared, some apps depend on that */ - *rgfInOut &= ~SFGAO_VALIDATE; - - TRACE("-- result=0x%08x\n", *rgfInOut); - return hr; -} - -/************************************************************************** -* ISF_ControlPanel_fnGetUIObjectOf -* -* PARAMETERS -* HWND hwndOwner, //[in ] Parent window for any output -* UINT cidl, //[in ] array size -* LPCITEMIDLIST* apidl, //[in ] simple pidl array -* REFIID riid, //[in ] Requested Interface -* UINT* prgfInOut, //[ ] reserved -* LPVOID* ppvObject) //[out] Resulting Interface -* -*/ -static HRESULT WINAPI -ISF_ControlPanel_fnGetUIObjectOf(IShellFolder2 * iface, - HWND hwndOwner, - UINT cidl, LPCITEMIDLIST * apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - - LPITEMIDLIST pidl; - IUnknown *pObj = NULL; - HRESULT hr = E_INVALIDARG; - - TRACE("(%p)->(%p,%u,apidl=%p,%s,%p,%p)\n", - This, hwndOwner, cidl, apidl, shdebugstr_guid(riid), prgfInOut, ppvOut); - - if (ppvOut) { - *ppvOut = NULL; - - if (IsEqualIID(riid, &IID_IContextMenu) &&(cidl >= 1)) { - // TODO - // create a seperate item struct - // - pObj = (IUnknown*)(&This->lpVtblContextMenu); - This->apidl = apidl; - This->cidl = cidl; - IUnknown_AddRef(pObj); - hr = S_OK; - } else if (IsEqualIID(riid, &IID_IDataObject) &&(cidl >= 1)) { - pObj = (LPUNKNOWN) IDataObject_Constructor(hwndOwner, This->pidlRoot, apidl, cidl); - hr = S_OK; - } else if (IsEqualIID(riid, &IID_IExtractIconA) &&(cidl == 1)) { - pidl = ILCombine(This->pidlRoot, apidl[0]); - pObj = (LPUNKNOWN) IExtractIconA_Constructor(pidl); - SHFree(pidl); - hr = S_OK; - } else if (IsEqualIID(riid, &IID_IExtractIconW) &&(cidl == 1)) { - pidl = ILCombine(This->pidlRoot, apidl[0]); - pObj = (LPUNKNOWN) IExtractIconW_Constructor(pidl); - SHFree(pidl); - hr = S_OK; - } else if ((IsEqualIID(riid,&IID_IShellLinkW) || IsEqualIID(riid,&IID_IShellLinkA)) - && (cidl == 1)) { - pidl = ILCombine(This->pidlRoot, apidl[0]); - hr = IShellLink_ConstructFromFile(NULL, riid, pidl,(LPVOID*)&pObj); - SHFree(pidl); - } else { - hr = E_NOINTERFACE; - } - - if (SUCCEEDED(hr) && !pObj) - hr = E_OUTOFMEMORY; - - *ppvOut = pObj; - } - TRACE("(%p)->hr=0x%08x\n", This, hr); - return hr; -} - -/************************************************************************** -* ISF_ControlPanel_fnGetDisplayNameOf -*/ -static HRESULT WINAPI ISF_ControlPanel_fnGetDisplayNameOf(IShellFolder2 * iface, LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - - CHAR szPath[MAX_PATH]; - WCHAR wszPath[MAX_PATH+1]; /* +1 for potential backslash */ - PIDLCPanelStruct* pcpanel; - - *szPath = '\0'; - - TRACE("(%p)->(pidl=%p,0x%08x,%p)\n", This, pidl, dwFlags, strRet); - pdump(pidl); - - if (!pidl || !strRet) - return E_INVALIDARG; - - pcpanel = _ILGetCPanelPointer(pidl); - - if (pcpanel) { - lstrcpyA(szPath, pcpanel->szName+pcpanel->offsDispName); - - if (!(dwFlags & SHGDN_FORPARSING)) - FIXME("retrieve display name from control panel app\n"); - } - /* take names of special folders only if it's only this folder */ - else if (_ILIsSpecialFolder(pidl)) { - BOOL bSimplePidl = _ILIsPidlSimple(pidl); - - if (bSimplePidl) { - _ILSimpleGetTextW(pidl, wszPath, MAX_PATH); /* append my own path */ - } else { - FIXME("special pidl\n"); - } - - if ((dwFlags & SHGDN_FORPARSING) && !bSimplePidl) { /* go deeper if needed */ - int len = 0; - - PathAddBackslashW(wszPath); - len = wcslen(wszPath); - - if (!SUCCEEDED - (SHELL32_GetDisplayNameOfChild(iface, pidl, dwFlags, wszPath + len, MAX_PATH + 1 - len))) - return E_OUTOFMEMORY; - if (!WideCharToMultiByte(CP_ACP, 0, wszPath, -1, szPath, MAX_PATH, NULL, NULL)) - wszPath[0] = '\0'; - } else { - if (bSimplePidl) { - if (!WideCharToMultiByte(CP_ACP, 0, wszPath, -1, szPath, MAX_PATH, NULL, NULL)) - wszPath[0] = '\0'; - } - } - } - - strRet->uType = STRRET_CSTR; - lstrcpynA(strRet->u.cStr, szPath, MAX_PATH); - - TRACE("--(%p)->(%s)\n", This, szPath); - return S_OK; -} - -/************************************************************************** -* ISF_ControlPanel_fnSetNameOf -* Changes the name of a file object or subfolder, possibly changing its item -* identifier in the process. -* -* PARAMETERS -* HWND hwndOwner, //[in ] Owner window for output -* LPCITEMIDLIST pidl, //[in ] simple pidl of item to change -* LPCOLESTR lpszName, //[in ] the items new display name -* DWORD dwFlags, //[in ] SHGNO formatting flags -* LPITEMIDLIST* ppidlOut) //[out] simple pidl returned -*/ -static HRESULT WINAPI ISF_ControlPanel_fnSetNameOf(IShellFolder2 * iface, HWND hwndOwner, LPCITEMIDLIST pidl, /*simple pidl */ - LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST * pPidlOut) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - FIXME("(%p)->(%p,pidl=%p,%s,%u,%p)\n", This, hwndOwner, pidl, debugstr_w(lpName), dwFlags, pPidlOut); - return E_FAIL; -} - -static HRESULT WINAPI ISF_ControlPanel_fnGetDefaultSearchGUID(IShellFolder2 * iface, GUID * pguid) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - FIXME("(%p)\n", This); - return E_NOTIMPL; -} -static HRESULT WINAPI ISF_ControlPanel_fnEnumSearches(IShellFolder2 * iface, IEnumExtraSearch ** ppenum) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - FIXME("(%p)\n", This); - return E_NOTIMPL; -} -static HRESULT WINAPI ISF_ControlPanel_fnGetDefaultColumn(IShellFolder2 * iface, DWORD dwRes, ULONG * pSort, ULONG * pDisplay) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - - TRACE("(%p)\n", This); - - if (pSort) *pSort = 0; - if (pDisplay) *pDisplay = 0; - return S_OK; -} -static HRESULT WINAPI ISF_ControlPanel_fnGetDefaultColumnState(IShellFolder2 * iface, UINT iColumn, DWORD * pcsFlags) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - - TRACE("(%p)\n", This); - - if (!pcsFlags || iColumn >= CONROLPANELSHELLVIEWCOLUMNS) return E_INVALIDARG; - *pcsFlags = ControlPanelSFHeader[iColumn].pcsFlags; - return S_OK; -} -static HRESULT WINAPI ISF_ControlPanel_fnGetDetailsEx(IShellFolder2 * iface, LPCITEMIDLIST pidl, const SHCOLUMNID * pscid, VARIANT * pv) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - FIXME("(%p)\n", This); - return E_NOTIMPL; -} - -static HRESULT WINAPI ISF_ControlPanel_fnGetDetailsOf(IShellFolder2 * iface, LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS * psd) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - HRESULT hr; - - TRACE("(%p)->(%p %i %p)\n", This, pidl, iColumn, psd); - - if (!psd || iColumn >= CONROLPANELSHELLVIEWCOLUMNS) - return E_INVALIDARG; - - if (!pidl) { - psd->fmt = ControlPanelSFHeader[iColumn].fmt; - psd->cxChar = ControlPanelSFHeader[iColumn].cxChar; - psd->str.uType = STRRET_CSTR; - LoadStringA(shell32_hInstance, ControlPanelSFHeader[iColumn].colnameid, psd->str.u.cStr, MAX_PATH); - return S_OK; - } else { - psd->str.u.cStr[0] = 0x00; - psd->str.uType = STRRET_CSTR; - switch(iColumn) { - case 0: /* name */ - hr = IShellFolder_GetDisplayNameOf(iface, pidl, SHGDN_NORMAL | SHGDN_INFOLDER, &psd->str); - break; - case 1: /* comment */ - _ILGetFileType(pidl, psd->str.u.cStr, MAX_PATH); - break; - } - hr = S_OK; - } - - return hr; -} -static HRESULT WINAPI ISF_ControlPanel_fnMapColumnToSCID(IShellFolder2 * iface, UINT column, SHCOLUMNID * pscid) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - FIXME("(%p)\n", This); - return E_NOTIMPL; -} - -static const IShellFolder2Vtbl vt_ShellFolder2 = -{ - - ISF_ControlPanel_fnQueryInterface, - ISF_ControlPanel_fnAddRef, - ISF_ControlPanel_fnRelease, - ISF_ControlPanel_fnParseDisplayName, - ISF_ControlPanel_fnEnumObjects, - ISF_ControlPanel_fnBindToObject, - ISF_ControlPanel_fnBindToStorage, - ISF_ControlPanel_fnCompareIDs, - ISF_ControlPanel_fnCreateViewObject, - ISF_ControlPanel_fnGetAttributesOf, - ISF_ControlPanel_fnGetUIObjectOf, - ISF_ControlPanel_fnGetDisplayNameOf, - ISF_ControlPanel_fnSetNameOf, - - /* ShellFolder2 */ - ISF_ControlPanel_fnGetDefaultSearchGUID, - ISF_ControlPanel_fnEnumSearches, - ISF_ControlPanel_fnGetDefaultColumn, - ISF_ControlPanel_fnGetDefaultColumnState, - ISF_ControlPanel_fnGetDetailsEx, - ISF_ControlPanel_fnGetDetailsOf, - ISF_ControlPanel_fnMapColumnToSCID -}; - -/************************************************************************ - * ICPanel_PersistFolder2_QueryInterface - */ -static HRESULT WINAPI ICPanel_PersistFolder2_QueryInterface(IPersistFolder2 * iface, REFIID iid, LPVOID * ppvObject) -{ - ICPanelImpl *This = impl_from_IPersistFolder2(iface); - - TRACE("(%p)\n", This); - - return IUnknown_QueryInterface(_IUnknown_(This), iid, ppvObject); -} - -/************************************************************************ - * ICPanel_PersistFolder2_AddRef - */ -static ULONG WINAPI ICPanel_PersistFolder2_AddRef(IPersistFolder2 * iface) -{ - ICPanelImpl *This = impl_from_IPersistFolder2(iface); - - TRACE("(%p)->(count=%u)\n", This, This->ref); - - return IUnknown_AddRef(_IUnknown_(This)); -} - -/************************************************************************ - * ISFPersistFolder_Release - */ -static ULONG WINAPI ICPanel_PersistFolder2_Release(IPersistFolder2 * iface) -{ - ICPanelImpl *This = impl_from_IPersistFolder2(iface); - - TRACE("(%p)->(count=%u)\n", This, This->ref); - - return IUnknown_Release(_IUnknown_(This)); -} - -/************************************************************************ - * ICPanel_PersistFolder2_GetClassID - */ -static HRESULT WINAPI ICPanel_PersistFolder2_GetClassID(IPersistFolder2 * iface, CLSID * lpClassId) -{ - ICPanelImpl *This = impl_from_IPersistFolder2(iface); - - TRACE("(%p)\n", This); - - if (!lpClassId) - return E_POINTER; - *lpClassId = CLSID_ControlPanel; - - return S_OK; -} - -/************************************************************************ - * ICPanel_PersistFolder2_Initialize - * - * NOTES: it makes no sense to change the pidl - */ -static HRESULT WINAPI ICPanel_PersistFolder2_Initialize(IPersistFolder2 * iface, LPCITEMIDLIST pidl) -{ - ICPanelImpl *This = impl_from_IPersistFolder2(iface); - if (This->pidlRoot) - SHFree((LPVOID)This->pidlRoot); - - This->pidlRoot = ILClone(pidl); - return S_OK; -} - -/************************************************************************** - * IPersistFolder2_fnGetCurFolder - */ -static HRESULT WINAPI ICPanel_PersistFolder2_GetCurFolder(IPersistFolder2 * iface, LPITEMIDLIST * pidl) -{ - ICPanelImpl *This = impl_from_IPersistFolder2(iface); - - TRACE("(%p)->(%p)\n", This, pidl); - - if (!pidl) - return E_POINTER; - *pidl = ILClone(This->pidlRoot); - return S_OK; -} - -static const IPersistFolder2Vtbl vt_PersistFolder2 = -{ - - ICPanel_PersistFolder2_QueryInterface, - ICPanel_PersistFolder2_AddRef, - ICPanel_PersistFolder2_Release, - ICPanel_PersistFolder2_GetClassID, - ICPanel_PersistFolder2_Initialize, - ICPanel_PersistFolder2_GetCurFolder -}; - -HRESULT CPanel_GetIconLocationW(LPCITEMIDLIST pidl, - LPWSTR szIconFile, UINT cchMax, int* piIndex) -{ - PIDLCPanelStruct* pcpanel = _ILGetCPanelPointer(pidl); - - if (!pcpanel) - return E_INVALIDARG; - - MultiByteToWideChar(CP_ACP, 0, pcpanel->szName, -1, szIconFile, cchMax); - *piIndex = pcpanel->iconIdx!=-1? pcpanel->iconIdx: 0; - - return S_OK; -} - - -/************************************************************************** -* IShellExecuteHookW Implementation -*/ - -static HRESULT WINAPI IShellExecuteHookW_fnQueryInterface( - IShellExecuteHookW* iface, REFIID riid, void** ppvObject) -{ - ICPanelImpl *This = impl_from_IShellExecuteHookW(iface); - - TRACE("(%p)->(count=%u)\n", This, This->ref); - - return IUnknown_QueryInterface(This->pUnkOuter, riid, ppvObject); -} - -static ULONG STDMETHODCALLTYPE IShellExecuteHookW_fnAddRef(IShellExecuteHookW* iface) -{ - ICPanelImpl *This = impl_from_IShellExecuteHookW(iface); - - TRACE("(%p)->(count=%u)\n", This, This->ref); - - return IUnknown_AddRef(This->pUnkOuter); -} - -static ULONG STDMETHODCALLTYPE IShellExecuteHookW_fnRelease(IShellExecuteHookW* iface) -{ - ICPanelImpl *This = impl_from_IShellExecuteHookW(iface); - - TRACE("(%p)\n", This); - - return IUnknown_Release(This->pUnkOuter); -} - -HRESULT -ExecuteAppletFromCLSID(LPOLESTR pOleStr) -{ - WCHAR szCmd[MAX_PATH]; - WCHAR szExpCmd[MAX_PATH]; - PROCESS_INFORMATION pi; - STARTUPINFOW si; - WCHAR szBuffer[90] = { 'C', 'L', 'S', 'I', 'D', '\\', 0 }; - DWORD dwType, dwSize; - - wcscpy(&szBuffer[6], pOleStr); - wcscat(szBuffer, L"\\shell\\open\\command"); - - dwSize = sizeof(szCmd); - if (RegGetValueW(HKEY_CLASSES_ROOT, szBuffer, NULL, RRF_RT_REG_SZ, &dwType, (PVOID)szCmd, &dwSize) != ERROR_SUCCESS) - { - ERR("RegGetValueW failed with %u\n", GetLastError()); - return E_FAIL; - } - -#if 0 - if (dwType != RRF_RT_REG_SZ && dwType != RRF_RT_REG_EXPAND_SZ) - return E_FAIL; -#endif - - if (!ExpandEnvironmentStringsW(szCmd, szExpCmd, sizeof(szExpCmd)/sizeof(WCHAR))) - return E_FAIL; - - ZeroMemory(&si, sizeof(si)); - si.cb = sizeof(si); - if (!CreateProcessW(NULL, szExpCmd, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi)) - return E_FAIL; - - CloseHandle(pi.hProcess); - CloseHandle(pi.hThread); - return S_OK; -} - - -static HRESULT WINAPI IShellExecuteHookW_fnExecute(IShellExecuteHookW* iface, LPSHELLEXECUTEINFOW psei) -{ - static const WCHAR wCplopen[] = {'c','p','l','o','p','e','n','\0'}; - ICPanelImpl *This = (ICPanelImpl *)iface; - - SHELLEXECUTEINFOW sei_tmp; - PIDLCPanelStruct* pcpanel; - WCHAR path[MAX_PATH]; - WCHAR params[MAX_PATH]; - BOOL ret; - HRESULT hr; - int l; - - TRACE("(%p)->execute(%p)\n", This, psei); - - if (!psei) - return E_INVALIDARG; - - pcpanel = _ILGetCPanelPointer(ILFindLastID(psei->lpIDList)); - - if (!pcpanel) - { - LPOLESTR pOleStr; - - IID * iid = _ILGetGUIDPointer(ILFindLastID(psei->lpIDList)); - if (!iid) - return E_INVALIDARG; - if (StringFromCLSID(iid, &pOleStr) == S_OK) - { - - hr = ExecuteAppletFromCLSID(pOleStr); - CoTaskMemFree(pOleStr); - return hr; - } - - return E_INVALIDARG; - } - path[0] = '\"'; - /* Return value from MultiByteToWideChar includes terminating NUL, which - * compensates for the starting double quote we just put in */ - l = MultiByteToWideChar(CP_ACP, 0, pcpanel->szName, -1, path+1, MAX_PATH); - - /* pass applet name to Control_RunDLL to distinguish between applets in one .cpl file */ - path[l++] = '"'; - path[l] = '\0'; - - MultiByteToWideChar(CP_ACP, 0, pcpanel->szName+pcpanel->offsDispName, -1, params, MAX_PATH); - - memcpy(&sei_tmp, psei, sizeof(sei_tmp)); - sei_tmp.lpFile = path; - sei_tmp.lpParameters = params; - sei_tmp.fMask &= ~SEE_MASK_INVOKEIDLIST; - sei_tmp.lpVerb = wCplopen; - - ret = ShellExecuteExW(&sei_tmp); - if (ret) - return S_OK; - else - return S_FALSE; -} - -static const IShellExecuteHookWVtbl vt_ShellExecuteHookW = -{ - - IShellExecuteHookW_fnQueryInterface, - IShellExecuteHookW_fnAddRef, - IShellExecuteHookW_fnRelease, - - IShellExecuteHookW_fnExecute -}; - - -/************************************************************************** -* IShellExecuteHookA Implementation -*/ - -static HRESULT WINAPI IShellExecuteHookA_fnQueryInterface(IShellExecuteHookA* iface, REFIID riid, void** ppvObject) -{ - ICPanelImpl *This = impl_from_IShellExecuteHookA(iface); - - TRACE("(%p)->(count=%u)\n", This, This->ref); - - return IUnknown_QueryInterface(This->pUnkOuter, riid, ppvObject); -} - -static ULONG STDMETHODCALLTYPE IShellExecuteHookA_fnAddRef(IShellExecuteHookA* iface) -{ - ICPanelImpl *This = impl_from_IShellExecuteHookA(iface); - - TRACE("(%p)->(count=%u)\n", This, This->ref); - - return IUnknown_AddRef(This->pUnkOuter); -} - -static ULONG STDMETHODCALLTYPE IShellExecuteHookA_fnRelease(IShellExecuteHookA* iface) -{ - ICPanelImpl *This = impl_from_IShellExecuteHookA(iface); - - TRACE("(%p)\n", This); - - return IUnknown_Release(This->pUnkOuter); -} - -static HRESULT WINAPI IShellExecuteHookA_fnExecute(IShellExecuteHookA* iface, LPSHELLEXECUTEINFOA psei) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - - SHELLEXECUTEINFOA sei_tmp; - PIDLCPanelStruct* pcpanel; - char path[MAX_PATH]; - BOOL ret; - - TRACE("(%p)->execute(%p)\n", This, psei); - - if (!psei) - return E_INVALIDARG; - - pcpanel = _ILGetCPanelPointer(ILFindLastID(psei->lpIDList)); - - if (!pcpanel) - return E_INVALIDARG; - - path[0] = '\"'; - lstrcpyA(path+1, pcpanel->szName); - - /* pass applet name to Control_RunDLL to distinguish between applets in one .cpl file */ - lstrcatA(path, "\" "); - lstrcatA(path, pcpanel->szName+pcpanel->offsDispName); - - memcpy(&sei_tmp, psei, sizeof(sei_tmp)); - sei_tmp.lpFile = path; - sei_tmp.fMask &= ~SEE_MASK_INVOKEIDLIST; - - ret = ShellExecuteExA(&sei_tmp); - if (ret) - return S_OK; - else - return S_FALSE; -} - -static const IShellExecuteHookAVtbl vt_ShellExecuteHookA = -{ - IShellExecuteHookA_fnQueryInterface, - IShellExecuteHookA_fnAddRef, - IShellExecuteHookA_fnRelease, - IShellExecuteHookA_fnExecute -}; - -/************************************************************************** -* IContextMenu2 Implementation -*/ - -/************************************************************************ - * ICPanel_IContextMenu_QueryInterface - */ -static HRESULT WINAPI ICPanel_IContextMenu2_QueryInterface(IContextMenu2 * iface, REFIID iid, LPVOID * ppvObject) -{ - ICPanelImpl *This = impl_from_IContextMenu(iface); - - TRACE("(%p)\n", This); - - return IUnknown_QueryInterface(_IUnknown_(This), iid, ppvObject); -} - -/************************************************************************ - * ICPanel_IContextMenu_AddRef - */ -static ULONG WINAPI ICPanel_IContextMenu2_AddRef(IContextMenu2 * iface) -{ - ICPanelImpl *This = impl_from_IContextMenu(iface); - - TRACE("(%p)->(count=%u)\n", This, This->ref); - - return IUnknown_AddRef(_IUnknown_(This)); -} - -/************************************************************************ - * ICPanel_IContextMenu_Release - */ -static ULONG WINAPI ICPanel_IContextMenu2_Release(IContextMenu2 * iface) -{ - ICPanelImpl *This = impl_from_IContextMenu(iface); - - TRACE("(%p)->(count=%u)\n", This, This->ref); - - return IUnknown_Release(_IUnknown_(This)); -} - -/************************************************************************** -* ICPanel_IContextMenu_QueryContextMenu() -*/ -static HRESULT WINAPI ICPanel_IContextMenu2_QueryContextMenu( - IContextMenu2 *iface, - HMENU hMenu, - UINT indexMenu, - UINT idCmdFirst, - UINT idCmdLast, - UINT uFlags) -{ - WCHAR szBuffer[30] = {0}; - ULONG Count = 1; - - ICPanelImpl *This = impl_from_IContextMenu(iface); - - TRACE("(%p)->(hmenu=%p indexmenu=%x cmdfirst=%x cmdlast=%x flags=%x )\n", - This, hMenu, indexMenu, idCmdFirst, idCmdLast, uFlags); - - if (LoadStringW(shell32_hInstance, IDS_OPEN, szBuffer, sizeof(szBuffer)/sizeof(WCHAR))) - { - szBuffer[(sizeof(szBuffer)/sizeof(WCHAR))-1] = L'\0'; - _InsertMenuItemW(hMenu, indexMenu++, TRUE, idCmdFirst + Count, MFT_STRING, szBuffer, MFS_DEFAULT); - Count++; - } - - if (LoadStringW(shell32_hInstance, IDS_CREATELINK, szBuffer, sizeof(szBuffer)/sizeof(WCHAR))) - { - if (Count) - { - _InsertMenuItemW(hMenu, indexMenu++, TRUE, idCmdFirst + Count, MFT_SEPARATOR, NULL, MFS_ENABLED); - } - szBuffer[(sizeof(szBuffer)/sizeof(WCHAR))-1] = L'\0'; - - _InsertMenuItemW(hMenu, indexMenu++, TRUE, idCmdFirst + Count, MFT_STRING, szBuffer, MFS_ENABLED); - Count++; - } - return MAKE_HRESULT(SEVERITY_SUCCESS, 0, Count); -} - - -/************************************************************************** -* ICPanel_IContextMenu_InvokeCommand() -*/ -static HRESULT WINAPI ICPanel_IContextMenu2_InvokeCommand( - IContextMenu2 *iface, - LPCMINVOKECOMMANDINFO lpcmi) -{ - SHELLEXECUTEINFOW sei; - WCHAR szPath[MAX_PATH]; - char szTarget[MAX_PATH]; - STRRET strret; - WCHAR* pszPath; - INT Length, cLength; - PIDLCPanelStruct *pcpanel; - IPersistFile * ppf; - IShellLinkA * isl; - ICPanelImpl *This = impl_from_IContextMenu(iface); - - TRACE("(%p)->(invcom=%p verb=%p wnd=%p)\n",This,lpcmi,lpcmi->lpVerb, lpcmi->hwnd); - - if (lpcmi->lpVerb == MAKEINTRESOURCEA(1)) - { - ZeroMemory(&sei, sizeof(sei)); - sei.cbSize = sizeof(sei); - sei.fMask = SEE_MASK_INVOKEIDLIST; - sei.lpIDList = ILCombine(This->pidlRoot, This->apidl[0]); - sei.hwnd = lpcmi->hwnd; - sei.nShow = SW_SHOWNORMAL; - sei.lpVerb = L"open"; - ShellExecuteExW(&sei); - if (sei.hInstApp <= (HINSTANCE)32) - return E_FAIL; - } - else if (lpcmi->lpVerb == MAKEINTRESOURCEA(2)) - { - if (!SHGetSpecialFolderPathW(NULL, szPath, CSIDL_DESKTOPDIRECTORY, FALSE)) - return E_FAIL; - - pszPath = PathAddBackslashW(szPath); - if (!pszPath) - return E_FAIL; - - if (IShellFolder_GetDisplayNameOf((IShellFolder*)This, This->apidl[0], SHGDN_FORPARSING, &strret) != S_OK) - return E_FAIL; - - Length = MAX_PATH - (pszPath - szPath); - cLength = strlen(strret.u.cStr); - if (Length < cLength + 5) - { - FIXME("\n"); - return E_FAIL; - } - - if (MultiByteToWideChar(CP_ACP, 0, strret.u.cStr, cLength +1, pszPath, Length)) - { - pszPath += cLength; - Length -= cLength; - } - - if (Length > 10) - { - wcscpy(pszPath, L" - "); - cLength = LoadStringW(shell32_hInstance, IDS_LNK_FILE, &pszPath[3], Length -4) + 3; - if (cLength + 5 > Length) - cLength = Length - 5; - Length -= cLength; - pszPath += cLength; - } - wcscpy(pszPath, L".lnk"); - - pcpanel = _ILGetCPanelPointer(ILFindLastID(This->apidl[0])); - if (pcpanel) - { - strncpy(szTarget, pcpanel->szName, MAX_PATH); - } - else - { - FIXME("\n"); - return E_FAIL; - } - if (SUCCEEDED(IShellLink_Constructor(NULL, &IID_IShellLinkA, (LPVOID*)&isl))) - { - IShellLinkA_SetPath(isl, szTarget); - if (SUCCEEDED(IShellLinkA_QueryInterface(isl, &IID_IPersistFile, (LPVOID*)&ppf))) - { - IPersistFile_Save(ppf, szPath, TRUE); - IPersistFile_Release(ppf); - } - IShellLinkA_Release(isl); - } - return NOERROR; - } - return S_OK; -} - -/************************************************************************** - * ICPanel_IContextMenu_GetCommandString() - * - */ -static HRESULT WINAPI ICPanel_IContextMenu2_GetCommandString( - IContextMenu2 *iface, - UINT_PTR idCommand, - UINT uFlags, - UINT* lpReserved, - LPSTR lpszName, - UINT uMaxNameLen) -{ - ICPanelImpl *This = impl_from_IContextMenu(iface); - - TRACE("(%p)->(idcom=%lx flags=%x %p name=%p len=%x)\n",This, idCommand, uFlags, lpReserved, lpszName, uMaxNameLen); - - - FIXME("unknown command string\n"); - return E_FAIL; -} - - - -/************************************************************************** -* ICPanel_IContextMenu_HandleMenuMsg() -*/ -static HRESULT WINAPI ICPanel_IContextMenu2_HandleMenuMsg( - IContextMenu2 *iface, - UINT uMsg, - WPARAM wParam, - LPARAM lParam) -{ - ICPanelImpl *This = impl_from_IContextMenu(iface); - - TRACE("ICPanel_IContextMenu_HandleMenuMsg (%p)->(msg=%x wp=%lx lp=%lx)\n",This, uMsg, wParam, lParam); - - return E_NOTIMPL; -} - -static const IContextMenu2Vtbl vt_ContextMenu = -{ - ICPanel_IContextMenu2_QueryInterface, - ICPanel_IContextMenu2_AddRef, - ICPanel_IContextMenu2_Release, - ICPanel_IContextMenu2_QueryContextMenu, - ICPanel_IContextMenu2_InvokeCommand, - ICPanel_IContextMenu2_GetCommandString, - ICPanel_IContextMenu2_HandleMenuMsg -}; - Modified: trunk/reactos/dll/win32/shell32/shfldr_cpanel.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shfldr_c…
============================================================================== --- trunk/reactos/dll/win32/shell32/shfldr_cpanel.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/shfldr_cpanel.c [iso-8859-1] Thu Oct 23 01:15:43 2008 @@ -596,10 +596,14 @@ *ppvOut = NULL; if (IsEqualIID(riid, &IID_IContextMenu) &&(cidl >= 1)) { + // TODO + // create a seperate item struct + // pObj = (IUnknown*)(&This->lpVtblContextMenu); This->apidl = apidl; This->cidl = cidl; IUnknown_AddRef(pObj); + hr = S_OK; } else if (IsEqualIID(riid, &IID_IDataObject) &&(cidl >= 1)) { pObj = (LPUNKNOWN) IDataObject_Constructor(hwndOwner, This->pidlRoot, apidl, cidl); hr = S_OK;
16 years, 2 months
1
0
0
0
[sserapion] 36903: Fix ScmGetServiceEntryByClientHandle definition.
by sserapion@svn.reactos.org
Author: sserapion Date: Wed Oct 22 23:12:08 2008 New Revision: 36903 URL:
http://svn.reactos.org/svn/reactos?rev=36903&view=rev
Log: Fix ScmGetServiceEntryByClientHandle definition. Modified: branches/ros-amd64-bringup/reactos/base/system/services/database.c branches/ros-amd64-bringup/reactos/base/system/services/rpcserver.c branches/ros-amd64-bringup/reactos/base/system/services/services.h Modified: branches/ros-amd64-bringup/reactos/base/system/services/database.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/base/…
============================================================================== --- branches/ros-amd64-bringup/reactos/base/system/services/database.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/base/system/services/database.c [iso-8859-1] Wed Oct 22 23:12:08 2008 @@ -117,7 +117,7 @@ PSERVICE -ScmGetServiceEntryByClientHandle(ULONG Handle) +ScmGetServiceEntryByClientHandle(HANDLE Handle) { PLIST_ENTRY ServiceEntry; PSERVICE CurrentService; Modified: branches/ros-amd64-bringup/reactos/base/system/services/rpcserver.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/base/…
============================================================================== --- branches/ros-amd64-bringup/reactos/base/system/services/rpcserver.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/base/system/services/rpcserver.c [iso-8859-1] Wed Oct 22 23:12:08 2008 @@ -1026,7 +1026,7 @@ return ERROR_INVALID_HANDLE; } - lpService = ScmGetServiceEntryByClientHandle((ULONG)hServiceStatus); + lpService = ScmGetServiceEntryByClientHandle(hServiceStatus); if (lpService == NULL) { DPRINT1("lpService == NULL!\n"); Modified: branches/ros-amd64-bringup/reactos/base/system/services/services.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/base/…
============================================================================== --- branches/ros-amd64-bringup/reactos/base/system/services/services.h [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/base/system/services/services.h [iso-8859-1] Wed Oct 22 23:12:08 2008 @@ -107,7 +107,7 @@ PSERVICE ScmGetServiceEntryByName(LPWSTR lpServiceName); PSERVICE ScmGetServiceEntryByDisplayName(LPWSTR lpDisplayName); PSERVICE ScmGetServiceEntryByResumeCount(DWORD dwResumeCount); -PSERVICE ScmGetServiceEntryByClientHandle(ULONG ThreadId); +PSERVICE ScmGetServiceEntryByClientHandle(HANDLE Handle); DWORD ScmCreateNewServiceRecord(LPWSTR lpServiceName, PSERVICE *lpServiceRecord); VOID ScmDeleteServiceRecord(PSERVICE lpService);
16 years, 2 months
1
0
0
0
[sserapion] 36902: WTH happened here!?
by sserapion@svn.reactos.org
Author: sserapion Date: Wed Oct 22 22:53:09 2008 New Revision: 36902 URL:
http://svn.reactos.org/svn/reactos?rev=36902&view=rev
Log: WTH happened here!? Modified: branches/ros-amd64-bringup/reactos/lib/debugsup/debugsup-ntos-amd64.def branches/ros-amd64-bringup/reactos/lib/debugsup/debugsup-ntos-i386.def Modified: branches/ros-amd64-bringup/reactos/lib/debugsup/debugsup-ntos-amd64.def URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/lib/d…
============================================================================== --- branches/ros-amd64-bringup/reactos/lib/debugsup/debugsup-ntos-amd64.def [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/lib/debugsup/debugsup-ntos-amd64.def [iso-8859-1] Wed Oct 22 22:53:09 2008 @@ -6,15 +6,5 @@ DbgPrintEx RtlAssert RtlUnwind - +vDbgPrintExWithPrefix ;EOF -EXPORTS -DbgBreakPoint -DbgBreakPointWithStatus -DbgPrint -DbgPrompt -DbgPrintEx -RtlAssert -RtlUnwind - -;EOF Modified: branches/ros-amd64-bringup/reactos/lib/debugsup/debugsup-ntos-i386.def URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/lib/d…
============================================================================== --- branches/ros-amd64-bringup/reactos/lib/debugsup/debugsup-ntos-i386.def [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/lib/debugsup/debugsup-ntos-i386.def [iso-8859-1] Wed Oct 22 22:53:09 2008 @@ -1,12 +1,3 @@ -EXPORTS -DbgBreakPoint@0 -DbgBreakPointWithStatus@4 -DbgPrint -DbgPrompt@12 -DbgPrintEx -RtlAssert@16 -RtlUnwind@16 - ;EOF EXPORTS DbgBreakPoint@0 @@ -16,5 +7,6 @@ DbgPrintEx RtlAssert@16 RtlUnwind@16 +vDbgPrintExWithPrefix ;EOF
16 years, 2 months
1
0
0
0
← Newer
1
...
19
20
21
22
23
24
25
...
52
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
Results per page:
10
25
50
100
200