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
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
August 2008
----- 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
27 participants
853 discussions
Start a n
N
ew thread
[cgutman] 35283: - Don't forget to call UnlockBuffers() - Use Irp->IoStatus.Information instead of RecvReq->BufferArray[0].len
by cgutman@svn.reactos.org
Author: cgutman Date: Mon Aug 11 22:20:52 2008 New Revision: 35283 URL:
http://svn.reactos.org/svn/reactos?rev=35283&view=rev
Log: - Don't forget to call UnlockBuffers() - Use Irp->IoStatus.Information instead of RecvReq->BufferArray[0].len Modified: branches/aicom-network-fixes/drivers/network/afd/afd/read.c Modified: branches/aicom-network-fixes/drivers/network/afd/afd/read.c URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/net…
============================================================================== --- branches/aicom-network-fixes/drivers/network/afd/afd/read.c [iso-8859-1] (original) +++ branches/aicom-network-fixes/drivers/network/afd/afd/read.c [iso-8859-1] Mon Aug 11 22:20:52 2008 @@ -602,8 +602,10 @@ PollReeval( FCB->DeviceExt, FCB->FileObject ); + UnlockBuffers( RecvReq->BufferArray, RecvReq->BufferCount, TRUE ); + return UnlockAndMaybeComplete - ( FCB, Status, Irp, RecvReq->BufferArray[0].len, NULL ); + ( FCB, Status, Irp, Irp->IoStatus.Information, NULL ); } else { Status = SatisfyPacketRecvRequest ( FCB, Irp, DatagramRecv, @@ -615,6 +617,8 @@ FCB->PollState |= AFD_EVENT_RECEIVE; PollReeval( FCB->DeviceExt, FCB->FileObject ); + + UnlockBuffers( RecvReq->BufferArray, RecvReq->BufferCount, TRUE ); return UnlockAndMaybeComplete ( FCB, Status, Irp, Irp->IoStatus.Information, NULL );
16 years, 2 months
1
0
0
0
[cgutman] 35282: - Don't continue if locking failed
by cgutman@svn.reactos.org
Author: cgutman Date: Mon Aug 11 17:44:24 2008 New Revision: 35282 URL:
http://svn.reactos.org/svn/reactos?rev=35282&view=rev
Log: - Don't continue if locking failed Modified: branches/aicom-network-fixes/drivers/network/afd/afd/write.c Modified: branches/aicom-network-fixes/drivers/network/afd/afd/write.c URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/net…
============================================================================== --- branches/aicom-network-fixes/drivers/network/afd/afd/write.c [iso-8859-1] (original) +++ branches/aicom-network-fixes/drivers/network/afd/afd/write.c [iso-8859-1] Mon Aug 11 17:44:24 2008 @@ -226,6 +226,11 @@ NULL, NULL, FALSE, FALSE ); + if( !SendReq->BufferArray ) { + return UnlockAndMaybeComplete( FCB, STATUS_ACCESS_VIOLATION, + Irp, 0, NULL ); + } + TdiBuildConnectionInfo( &TargetAddress, FCB->RemoteAddress ); SocketCalloutEnter( FCB ); @@ -287,6 +292,11 @@ NULL, NULL, FALSE, FALSE ); + if( !SendReq->BufferArray ) { + return UnlockAndMaybeComplete( FCB, STATUS_ACCESS_VIOLATION, + Irp, 0, NULL ); + } + for( i = 0; FCB->Send.BytesUsed < FCB->Send.Size && i < SendReq->BufferCount; i++ ) { CopySize = MIN( SpaceAvail,
16 years, 2 months
1
0
0
0
[gedmurphy] 35281: Setup the named pipe server. Events aren't in place yet, so we don't read or write.
by gedmurphy@svn.reactos.org
Author: gedmurphy Date: Mon Aug 11 14:04:21 2008 New Revision: 35281 URL:
http://svn.reactos.org/svn/reactos?rev=35281&view=rev
Log: Setup the named pipe server. Events aren't in place yet, so we don't read or write. Modified: trunk/tools/reactosdbg/DebugProtocol/DebugConnection.cs trunk/tools/reactosdbg/Pipe/namedpipe.cs trunk/tools/reactosdbg/RosDBG/MainWindow.cs trunk/tools/reactosdbg/RosDBG/PipeTargetSelect.Designer.cs trunk/tools/reactosdbg/RosDBG/PipeTargetSelect.cs Modified: trunk/tools/reactosdbg/DebugProtocol/DebugConnection.cs URL:
http://svn.reactos.org/svn/reactos/trunk/tools/reactosdbg/DebugProtocol/Deb…
============================================================================== --- trunk/tools/reactosdbg/DebugProtocol/DebugConnection.cs [iso-8859-1] (original) +++ trunk/tools/reactosdbg/DebugProtocol/DebugConnection.cs [iso-8859-1] Mon Aug 11 14:04:21 2008 @@ -69,7 +69,7 @@ public class DebugConnection { #region Primary State - public enum Mode { ClosedMode, SocketMode, SerialMode } + public enum Mode { ClosedMode, SocketMode, SerialMode, PipeMode } public Mode ConnectionMode { get { return mConnectionMode; } @@ -109,6 +109,10 @@ #region Serial Mode Members SerialPort mSerialPort; + #endregion + + #region Named Pipe Members + NamedPipe mNamedPipe; #endregion public event DebugRegisterChangeEventHandler DebugRegisterChangeEvent; @@ -159,6 +163,14 @@ mDnsAsyncResult = Dns.BeginGetHostEntry(host, mDnsLookup, this); } + public void Start(string pipeName) + { + Close(); + mNamedPipe = new NamedPipe(); + mNamedPipe.Create(pipeName); + mNamedPipe.Listen(); + } + public void Start(int baudrate, string port) { Close(); @@ -199,6 +211,11 @@ mSerialPort = null; Running = false; break; + case Mode.PipeMode: + mNamedPipe.Close(); + mNamedPipe = null; + Running = false; + break; } mMedium = null; Modified: trunk/tools/reactosdbg/Pipe/namedpipe.cs URL:
http://svn.reactos.org/svn/reactos/trunk/tools/reactosdbg/Pipe/namedpipe.cs…
============================================================================== --- trunk/tools/reactosdbg/Pipe/namedpipe.cs [iso-8859-1] (original) +++ trunk/tools/reactosdbg/Pipe/namedpipe.cs [iso-8859-1] Mon Aug 11 14:04:21 2008 @@ -23,7 +23,7 @@ [DllImport("kernel32.dll", SetLastError = true)] public static extern bool ConnectNamedPipe( IntPtr hHandle, - Overlapped lpOverlapped + IntPtr lpOverlapped ); [DllImport("kernel32.dll", SetLastError = true)] @@ -91,20 +91,15 @@ public class NamedPipe// : Pipe { - private const string pipeName = @"\\.\Pipe\RosDbg"; private const Int32 INVALID_HANDLE_VALUE = -1; + private const ulong ERROR_PIPE_CONNECTED = 535; private IntPtr handle; //FileAccess mode; - protected NamedPipe() + public NamedPipe() { handle = IntPtr.Zero; - } - - public IntPtr Create() - { - return Create(pipeName); } public IntPtr Create(string name) @@ -141,6 +136,19 @@ if (handle == IntPtr.Zero) throw new ObjectDisposedException("NamedPipeStream", "The stream has already been closed"); Kernel32.FlushFileBuffers(handle); + } + + public bool Listen() + { + Disconnect(); + if (Kernel32.ConnectNamedPipe(handle, IntPtr.Zero) != true) + { + uint lastErr = (uint)Marshal.GetLastWin32Error(); + if (lastErr == ERROR_PIPE_CONNECTED) + return true; + return false; + } + return true; } public int Read(byte[] buffer, int offset, int count) Modified: trunk/tools/reactosdbg/RosDBG/MainWindow.cs URL:
http://svn.reactos.org/svn/reactos/trunk/tools/reactosdbg/RosDBG/MainWindow…
============================================================================== --- trunk/tools/reactosdbg/RosDBG/MainWindow.cs [iso-8859-1] (original) +++ trunk/tools/reactosdbg/RosDBG/MainWindow.cs [iso-8859-1] Mon Aug 11 14:04:21 2008 @@ -327,7 +327,8 @@ PipeTargetSelect targetSelect = new PipeTargetSelect(); if (targetSelect.ShowDialog() == DialogResult.OK) { - + mConnection.Close(); + mConnection.Start(targetSelect.PipeName); } } } Modified: trunk/tools/reactosdbg/RosDBG/PipeTargetSelect.Designer.cs URL:
http://svn.reactos.org/svn/reactos/trunk/tools/reactosdbg/RosDBG/PipeTarget…
============================================================================== --- trunk/tools/reactosdbg/RosDBG/PipeTargetSelect.Designer.cs [iso-8859-1] (original) +++ trunk/tools/reactosdbg/RosDBG/PipeTargetSelect.Designer.cs [iso-8859-1] Mon Aug 11 14:04:21 2008 @@ -101,7 +101,7 @@ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; this.Name = "PipeTargetSelect"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; - this.Text = "PipeTargetSelect"; + this.Text = "Named Pipe"; this.ResumeLayout(false); this.PerformLayout(); Modified: trunk/tools/reactosdbg/RosDBG/PipeTargetSelect.cs URL:
http://svn.reactos.org/svn/reactos/trunk/tools/reactosdbg/RosDBG/PipeTarget…
============================================================================== --- trunk/tools/reactosdbg/RosDBG/PipeTargetSelect.cs [iso-8859-1] (original) +++ trunk/tools/reactosdbg/RosDBG/PipeTargetSelect.cs [iso-8859-1] Mon Aug 11 14:04:21 2008 @@ -1,20 +1,21 @@ using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; using System.Windows.Forms; namespace RosDBG { public partial class PipeTargetSelect : Form { + private const string defaultPipeName = @"\\.\Pipe\RosDbg"; + private string pipeName; + public string PipeName { - get { return PipeNameTextBox.Text; } - set { PipeNameTextBox.Text = value; } + get { return pipeName; } + } + + public bool UseDefault + { + get { return DefaultRadioBtn.Checked; } } public PipeTargetSelect() @@ -24,6 +25,15 @@ private void bOK_Click(object sender, EventArgs e) { + if (DefaultRadioBtn.Checked) + { + pipeName = defaultPipeName; + } + else + { + pipeName = PipeNameTextBox.Text; + } + DialogResult = DialogResult.OK; Close(); }
16 years, 2 months
1
0
0
0
[hpoussin] 35280: Expand recyclebin API with DeleteFileHandleToRecycleBin and GetRecycleBinDetails
by hpoussin@svn.reactos.org
Author: hpoussin Date: Mon Aug 11 12:31:51 2008 New Revision: 35280 URL:
http://svn.reactos.org/svn/reactos?rev=35280&view=rev
Log: Expand recyclebin API with DeleteFileHandleToRecycleBin and GetRecycleBinDetails Modified: trunk/reactos/lib/recyclebin/recyclebin.c trunk/reactos/lib/recyclebin/recyclebin.h Modified: trunk/reactos/lib/recyclebin/recyclebin.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/recyclebin/recyclebin.…
============================================================================== --- trunk/reactos/lib/recyclebin/recyclebin.c [iso-8859-1] (original) +++ trunk/reactos/lib/recyclebin/recyclebin.c [iso-8859-1] Mon Aug 11 12:31:51 2008 @@ -94,6 +94,26 @@ } BOOL WINAPI +DeleteFileHandleToRecycleBin( + IN HANDLE hDeletedFile) +{ + IRecycleBinFile *rbf = (IRecycleBinFile *)hDeletedFile; + HRESULT hr; + + TRACE("(%p)\n", hDeletedFile); + + hr = IRecycleBinFile_Delete(rbf); + + if (SUCCEEDED(hr)) + return TRUE; + if (HRESULT_FACILITY(hr) == FACILITY_WIN32) + SetLastError(HRESULT_CODE(hr)); + else + SetLastError(ERROR_GEN_FAILURE); + return FALSE; +} + +BOOL WINAPI EmptyRecycleBinA( IN LPCSTR pszRoot OPTIONAL) { @@ -335,6 +355,18 @@ } BOOL WINAPI +GetRecycleBinDetails( + IN LPCWSTR pszVolume OPTIONAL, + OUT ULARGE_INTEGER *pulTotalItems, + OUT ULARGE_INTEGER *pulTotalSize) +{ + pulTotalItems->QuadPart = 0; + pulTotalSize->QuadPart = 0; + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; +} + +BOOL WINAPI RestoreFile( IN HANDLE hDeletedFile) { Modified: trunk/reactos/lib/recyclebin/recyclebin.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/recyclebin/recyclebin.…
============================================================================== --- trunk/reactos/lib/recyclebin/recyclebin.h [iso-8859-1] (original) +++ trunk/reactos/lib/recyclebin/recyclebin.h [iso-8859-1] Mon Aug 11 12:31:51 2008 @@ -72,6 +72,15 @@ #define DeleteFileToRecycleBin DeleteFileToRecycleBinA #endif +/* Moves a file to the recycle bin. + * hDeletedFile: handle of the deleted file to delete + * Returns TRUE if operation succeeded, FALSE otherwise. + * Remark: The handle is obtained in the PENUMERATE_RECYCLEBIN_CALLBACK callback + */ +BOOL WINAPI +DeleteFileHandleToRecycleBin( + IN HANDLE hDeletedFile); + /* Removes all elements contained in a recycle bin * pszRoot: the name of the drive containing the recycle bin * Returns TRUE if operation succeeded, FALSE otherwise. @@ -137,6 +146,17 @@ #else #define GetDeletedFileDetails GetDeletedFileDetailsA #endif + +/* Get details about a whole recycle bin + * pszVolume: + * pulTotalItems: + * pulTotalSize + */ +BOOL WINAPI +GetRecycleBinDetails( + IN LPCWSTR pszVolume OPTIONAL, + OUT ULARGE_INTEGER *pulTotalItems, + OUT ULARGE_INTEGER *pulTotalSize); /* Restores a deleted file * hDeletedFile: handle of the deleted file to restore
16 years, 2 months
1
0
0
0
[cgutman] 35279: - Only call LockBuffers() if we must
by cgutman@svn.reactos.org
Author: cgutman Date: Mon Aug 11 10:32:45 2008 New Revision: 35279 URL:
http://svn.reactos.org/svn/reactos?rev=35279&view=rev
Log: - Only call LockBuffers() if we must Modified: branches/aicom-network-fixes/drivers/network/afd/afd/read.c branches/aicom-network-fixes/drivers/network/afd/afd/write.c Modified: branches/aicom-network-fixes/drivers/network/afd/afd/read.c URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/net…
============================================================================== --- branches/aicom-network-fixes/drivers/network/afd/afd/read.c [iso-8859-1] (original) +++ branches/aicom-network-fixes/drivers/network/afd/afd/read.c [iso-8859-1] Mon Aug 11 10:32:45 2008 @@ -573,18 +573,18 @@ AFD_DbgPrint(MID_TRACE,("Recv flags %x\n", RecvReq->AfdFlags)); - RecvReq->BufferArray = LockBuffers( RecvReq->BufferArray, - RecvReq->BufferCount, - RecvReq->Address, - RecvReq->AddressLength, - TRUE, TRUE ); - - if( !RecvReq->BufferArray ) { /* access violation in userspace */ - return UnlockAndMaybeComplete - ( FCB, STATUS_ACCESS_VIOLATION, Irp, 0, NULL ); - } - if( !IsListEmpty( &FCB->DatagramList ) ) { + RecvReq->BufferArray = LockBuffers( RecvReq->BufferArray, + RecvReq->BufferCount, + RecvReq->Address, + RecvReq->AddressLength, + TRUE, TRUE ); + + if( !RecvReq->BufferArray ) { /* access violation in userspace */ + return UnlockAndMaybeComplete + ( FCB, STATUS_ACCESS_VIOLATION, Irp, 0, NULL ); + } + ListEntry = RemoveHeadList( &FCB->DatagramList ); DatagramRecv = CONTAINING_RECORD ( ListEntry, AFD_STORED_DATAGRAM, ListEntry ); Modified: branches/aicom-network-fixes/drivers/network/afd/afd/write.c URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/net…
============================================================================== --- branches/aicom-network-fixes/drivers/network/afd/afd/write.c [iso-8859-1] (original) +++ branches/aicom-network-fixes/drivers/network/afd/afd/write.c [iso-8859-1] Mon Aug 11 10:32:45 2008 @@ -273,11 +273,6 @@ AFD_DbgPrint(MID_TRACE,("We already have %d bytes waiting.\n", FCB->Send.BytesUsed)); - SendReq->BufferArray = LockBuffers( SendReq->BufferArray, - SendReq->BufferCount, - NULL, NULL, - FALSE, FALSE ); - AFD_DbgPrint(MID_TRACE,("FCB->Send.BytesUsed = %d\n", FCB->Send.BytesUsed)); @@ -286,6 +281,11 @@ AFD_DbgPrint(MID_TRACE,("We can accept %d bytes\n", SpaceAvail)); + + SendReq->BufferArray = LockBuffers( SendReq->BufferArray, + SendReq->BufferCount, + NULL, NULL, + FALSE, FALSE ); for( i = 0; FCB->Send.BytesUsed < FCB->Send.Size && i < SendReq->BufferCount; i++ ) {
16 years, 2 months
1
0
0
0
[janderwald] 35278: - add flags for SHEmptyRecycleBin
by janderwald@svn.reactos.org
Author: janderwald Date: Mon Aug 11 09:57:00 2008 New Revision: 35278 URL:
http://svn.reactos.org/svn/reactos?rev=35278&view=rev
Log: - add flags for SHEmptyRecycleBin Modified: trunk/reactos/include/psdk/shellapi.h Modified: trunk/reactos/include/psdk/shellapi.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/shellapi.h?re…
============================================================================== --- trunk/reactos/include/psdk/shellapi.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/shellapi.h [iso-8859-1] Mon Aug 11 09:57:00 2008 @@ -304,6 +304,10 @@ } SHNAMEMAPPINGW, *LPSHNAMEMAPPINGW; #include <poppack.h> +#define SHERB_NOCONFIRMATION 0x1 +#define SHERB_NOPROGRESSUI 0x2 +#define SHERB_NOSOUND 0x4 + LPWSTR * WINAPI CommandLineToArgvW(LPCWSTR,int*); void WINAPI DragAcceptFiles(HWND,BOOL); void WINAPI DragFinish(HDROP);
16 years, 2 months
1
0
0
0
[janderwald] 35277: - rename recyclebin
by janderwald@svn.reactos.org
Author: janderwald Date: Mon Aug 11 09:52:22 2008 New Revision: 35277 URL:
http://svn.reactos.org/svn/reactos?rev=35277&view=rev
Log: - rename recyclebin Removed: trunk/reactos/dll/win32/shell32/recyclebin.c Modified: trunk/reactos/dll/win32/shell32/shell32.rbuild Removed: trunk/reactos/dll/win32/shell32/recyclebin.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/recycleb…
============================================================================== --- trunk/reactos/dll/win32/shell32/recyclebin.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/recyclebin.c (removed) @@ -1,1651 +1,0 @@ -/* - * Trash virtual folder support. The trashing engine is implemented in trash.c - * - * Copyright (C) 2006 Mikolaj Zalewski - * - * 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 "config.h" -#define COBJMACROS -#define NONAMELESSUNION -#define NONAMELESSSTRUCT -#define MAX_PROPERTY_SHEET_PAGE 32 - -#include <stdarg.h> - -#include "winerror.h" -#include "windef.h" -#include "winbase.h" -#include "winreg.h" -#include "winuser.h" -#include "ntquery.h" -#include "shlwapi.h" -#include "shlobj.h" -#include "shresdef.h" -#include "pidl.h" -#include "wine/debug.h" - -#include "shell32_main.h" -#include "enumidlist.h" -#include "xdg.h" -#include "recyclebin.h" -#include <prsht.h> - -WINE_DEFAULT_DEBUG_CHANNEL(recyclebin); - -typedef struct -{ - int column_name_id; - const GUID *fmtId; - DWORD pid; - int pcsFlags; - int fmt; - int cxChars; -} columninfo; - -static const columninfo RecycleBinColumns[] = -{ - {IDS_SHV_COLUMN1, &FMTID_Storage, PID_STG_NAME, SHCOLSTATE_TYPE_STR|SHCOLSTATE_ONBYDEFAULT, LVCFMT_LEFT, 30}, - {IDS_SHV_COLUMN_DELFROM, &FMTID_Displaced, PID_DISPLACED_FROM, SHCOLSTATE_TYPE_STR|SHCOLSTATE_ONBYDEFAULT, LVCFMT_LEFT, 30}, - {IDS_SHV_COLUMN_DELDATE, &FMTID_Displaced, PID_DISPLACED_DATE, SHCOLSTATE_TYPE_DATE|SHCOLSTATE_ONBYDEFAULT, LVCFMT_LEFT, 20}, - {IDS_SHV_COLUMN2, &FMTID_Storage, PID_STG_SIZE, SHCOLSTATE_TYPE_INT|SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 20}, - {IDS_SHV_COLUMN3, &FMTID_Storage, PID_STG_STORAGETYPE,SHCOLSTATE_TYPE_INT|SHCOLSTATE_ONBYDEFAULT, LVCFMT_LEFT, 20}, - {IDS_SHV_COLUMN4, &FMTID_Storage, PID_STG_WRITETIME, SHCOLSTATE_TYPE_DATE|SHCOLSTATE_ONBYDEFAULT, LVCFMT_LEFT, 20}, -/* {"creation time", &FMTID_Storage, PID_STG_CREATETIME, SHCOLSTATE_TYPE_DATE, LVCFMT_LEFT, 20}, */ -/* {"attribs", &FMTID_Storage, PID_STG_ATTRIBUTES, SHCOLSTATE_TYPE_STR, LVCFMT_LEFT, 20}, */ -}; - -#define COLUMN_NAME 0 -#define COLUMN_DELFROM 1 -#define COLUMN_DATEDEL 2 -#define COLUMN_SIZE 3 -#define COLUMN_TYPE 4 -#define COLUMN_MTIME 5 - -#define COLUMNS_COUNT 6 - -/* - * Recycle Bin folder - */ - -typedef struct tagRecycleBin -{ - const IShellFolder2Vtbl *lpVtbl; - const IPersistFolder2Vtbl *lpPersistFolderVtbl; - const IContextMenu2Vtbl *lpContextMenu2; - const IShellExtInitVtbl *lpSEI; - LONG refCount; - - INT iIdOpen; - INT iIdEmpty; - INT iIdProperties; - - LPITEMIDLIST pidl; - LPCITEMIDLIST apidl; -} RecycleBin; - -typedef struct -{ - PIDLRecycleStruct *pFileDetails; - HANDLE hDeletedFile; - BOOL bFound; -}SEARCH_CONTEXT, *PSEARCH_CONTEXT; - -typedef struct -{ - DWORD dwNukeOnDelete; - DWORD dwSerial; - DWORD dwMaxCapacity; -}DRIVE_ITEM_CONTEXT, *PDRIVE_ITEM_CONTEXT; - - -static const IContextMenu2Vtbl recycleBincmVtblFolder; -static const IContextMenu2Vtbl recycleBincmVtblBitbucketItem; -static const IShellFolder2Vtbl recycleBinVtbl; -static const IPersistFolder2Vtbl recycleBinPersistVtbl; -static const IShellExtInitVtbl eivt; - -static RecycleBin *impl_from_IContextMenu2(IContextMenu2 *iface) -{ - return (RecycleBin *)((char *)iface - FIELD_OFFSET(RecycleBin, lpContextMenu2)); -} - -static RecycleBin *impl_from_IPersistFolder(IPersistFolder2 *iface) -{ - return (RecycleBin *)((char *)iface - FIELD_OFFSET(RecycleBin, lpPersistFolderVtbl)); -} - -static inline RecycleBin *impl_from_IShellExtInit( IShellExtInit *iface ) -{ - return (RecycleBin *)((char*)iface - FIELD_OFFSET(RecycleBin, lpSEI)); -} - -static void RecycleBin_Destructor(RecycleBin *This); - -HRESULT WINAPI RecycleBin_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVOID *ppOutput) -{ - RecycleBin *obj; - HRESULT ret; - if (pUnkOuter) - return CLASS_E_NOAGGREGATION; - - obj = SHAlloc(sizeof(RecycleBin)); - if (obj == NULL) - return E_OUTOFMEMORY; - ZeroMemory(obj, sizeof(RecycleBin)); - obj->lpVtbl = &recycleBinVtbl; - obj->lpSEI = &eivt; - obj->lpPersistFolderVtbl = &recycleBinPersistVtbl; - obj->lpContextMenu2 = NULL; - if (FAILED(ret = IUnknown_QueryInterface((IUnknown *)obj, riid, ppOutput))) - { - RecycleBin_Destructor(obj); - return ret; - } -/* InterlockedIncrement(&objCount);*/ - return S_OK; -} - -static void RecycleBin_Destructor(RecycleBin *This) -{ -/* InterlockedDecrement(&objCount);*/ - SHFree(This->pidl); - SHFree(This); -} - -static HRESULT WINAPI RecycleBin_QueryInterface(IShellFolder2 *iface, REFIID riid, void **ppvObject) -{ - RecycleBin *This = (RecycleBin *)iface; - TRACE("(%p, %s, %p)\n", This, debugstr_guid(riid), ppvObject); - - *ppvObject = NULL; - if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IShellFolder) - || IsEqualGUID(riid, &IID_IShellFolder2)) - *ppvObject = This; - - if (IsEqualGUID(riid, &IID_IPersist) || IsEqualGUID(riid, &IID_IPersistFolder) - || IsEqualGUID(riid, &IID_IPersistFolder2)) - *ppvObject = &This->lpPersistFolderVtbl; - - if (IsEqualIID(riid, &IID_IContextMenu) || IsEqualGUID(riid, &IID_IContextMenu2)) - { - This->lpContextMenu2 = &recycleBincmVtblFolder; - *ppvObject = &This->lpContextMenu2; - } - if(IsEqualIID(riid, &IID_IShellExtInit)) - { - *ppvObject = &(This->lpSEI); - } - - if (*ppvObject != NULL) - { - IUnknown_AddRef((IUnknown *)*ppvObject); - return S_OK; - } - WARN("no interface %s\n", debugstr_guid(riid)); - return E_NOINTERFACE; -} - -static ULONG WINAPI RecycleBin_AddRef(IShellFolder2 *iface) -{ - RecycleBin *This = (RecycleBin *)iface; - TRACE("(%p)\n", This); - return InterlockedIncrement(&This->refCount); -} - -static ULONG WINAPI RecycleBin_Release(IShellFolder2 *iface) -{ - RecycleBin *This = (RecycleBin *)iface; - LONG result; - - TRACE("(%p)\n", This); - result = InterlockedDecrement(&This->refCount); - if (result == 0) - { - TRACE("Destroy object\n"); - RecycleBin_Destructor(This); - } - return result; -} - -static HRESULT WINAPI RecycleBin_ParseDisplayName(IShellFolder2 *This, HWND hwnd, LPBC pbc, - LPOLESTR pszDisplayName, ULONG *pchEaten, LPITEMIDLIST *ppidl, - ULONG *pdwAttributes) -{ - FIXME("stub\n"); - return E_NOTIMPL; -} - - -PDELETED_FILE_DETAILS_W -UnpackDetailsFromPidl(LPCITEMIDLIST pidl) -{ - return (PDELETED_FILE_DETAILS_W)&pidl->mkid.abID; -} - -static LPITEMIDLIST _ILCreateRecycleItem(PDELETED_FILE_DETAILS_W pFileDetails) -{ - PIDLDATA tmp; - LPITEMIDLIST pidl; - PIDLRecycleStruct * p; - int size0 = (char*)&tmp.u.crecycle.szName-(char*)&tmp.u.crecycle; - int size = size0; - - tmp.type = 0x00; - size += (wcslen(pFileDetails->FileName) + 1) * sizeof(WCHAR); - - pidl = (LPITEMIDLIST)SHAlloc(size + 4); - if (!pidl) - return pidl; - - pidl->mkid.cb = size+2; - memcpy(pidl->mkid.abID, &tmp, 2+size0); - - p = &((PIDLDATA*)pidl->mkid.abID)->u.crecycle; - RtlCopyMemory(p, pFileDetails, sizeof(DELETED_FILE_DETAILS_W)); - wcscpy(p->szName, pFileDetails->FileName); - *(WORD*)((char*)pidl+(size+2)) = 0; - return pidl; -} - -static PIDLRecycleStruct * _ILGetRecycleStruct(LPCITEMIDLIST pidl) -{ - LPPIDLDATA pdata = _ILGetDataPointer(pidl); - - if (pdata && pdata->type==0x00) - return (PIDLRecycleStruct*)&(pdata->u.crecycle); - - return NULL; -} - -BOOL -WINAPI -CBSearchBitBucket(IN PVOID Context, IN HANDLE hDeletedFile) -{ - PSEARCH_CONTEXT pContext = (PSEARCH_CONTEXT)Context; - - PDELETED_FILE_DETAILS_W pFileDetails; - DWORD dwSize; - BOOL ret; - - if (!GetDeletedFileDetailsW(hDeletedFile, - 0, - NULL, - &dwSize) && - GetLastError() != ERROR_INSUFFICIENT_BUFFER) - { - ERR("GetDeletedFileDetailsW failed\n"); - return FALSE; - } - - pFileDetails = SHAlloc(dwSize); - if (!pFileDetails) - { - ERR("No memory\n"); - return FALSE; - } - - if (!GetDeletedFileDetailsW(hDeletedFile, - dwSize, - pFileDetails, - NULL)) - { - ERR("GetDeletedFileDetailsW failed\n"); - SHFree(pFileDetails); - return FALSE; - } - - ret = memcmp(pFileDetails, pContext->pFileDetails, dwSize); - if (!ret) - { - pContext->hDeletedFile = hDeletedFile; - pContext->bFound = TRUE; - } - else - CloseRecycleBinHandle(hDeletedFile); - - SHFree(pFileDetails); - return ret; -} - - - -BOOL -WINAPI -CBEnumBitBucket(IN PVOID Context, IN HANDLE hDeletedFile) -{ - PDELETED_FILE_DETAILS_W pFileDetails; - DWORD dwSize; - LPITEMIDLIST pidl = NULL; - BOOL ret; - - if (!GetDeletedFileDetailsW(hDeletedFile, - 0, - NULL, - &dwSize) && - GetLastError() != ERROR_INSUFFICIENT_BUFFER) - { - ERR("GetDeletedFileDetailsW failed\n"); - return FALSE; - } - - pFileDetails = SHAlloc(dwSize); - if (!pFileDetails) - { - ERR("No memory\n"); - return FALSE; - } - - if (!GetDeletedFileDetailsW(hDeletedFile, - dwSize, - pFileDetails, - NULL)) - { - ERR("GetDeletedFileDetailsW failed\n"); - SHFree(pFileDetails); - return FALSE; - } - - pidl = _ILCreateRecycleItem(pFileDetails); - if (!pidl) - { - SHFree(pFileDetails); - return FALSE; - } - - ret = AddToEnumList((IEnumIDList*)Context, pidl); - - if (!ret) - SHFree(pidl); - SHFree(pFileDetails); - TRACE("Returning %d\n", ret); - CloseRecycleBinHandle(hDeletedFile); - return ret; -} - -static HRESULT WINAPI RecycleBin_EnumObjects(IShellFolder2 *iface, HWND hwnd, SHCONTF grfFlags, IEnumIDList **ppenumIDList) -{ - RecycleBin *This = (RecycleBin *)iface; - IEnumIDList *list; - static LPCWSTR szDrive = L"C:\\"; - - TRACE("(%p, %p, %x, %p)\n", This, hwnd, (unsigned int)grfFlags, ppenumIDList); - - if (grfFlags & SHCONTF_NONFOLDERS) - { - TRACE("Starting Enumeration\n"); - *ppenumIDList = NULL; - list = IEnumIDList_Constructor(); - if (list == NULL) - return E_OUTOFMEMORY; - - if (!EnumerateRecycleBinW(szDrive, //FIXME - CBEnumBitBucket, - (PVOID)list)) - { - WARN("Error: EnumerateRecycleBinW failed\n"); - } - *ppenumIDList = list; - } - else - { - *ppenumIDList = IEnumIDList_Constructor(); - if (*ppenumIDList == NULL) - return E_OUTOFMEMORY; - } - - return S_OK; - -} - -static HRESULT WINAPI RecycleBin_BindToObject(IShellFolder2 *This, LPCITEMIDLIST pidl, LPBC pbc, REFIID riid, void **ppv) -{ - FIXME("(%p, %p, %p, %s, %p) - stub\n", This, pidl, pbc, debugstr_guid(riid), ppv); - return E_NOTIMPL; -} - -static HRESULT WINAPI RecycleBin_BindToStorage(IShellFolder2 *This, LPCITEMIDLIST pidl, LPBC pbc, REFIID riid, void **ppv) -{ - FIXME("(%p, %p, %p, %s, %p) - stub\n", This, pidl, pbc, debugstr_guid(riid), ppv); - return E_NOTIMPL; -} - -static HRESULT WINAPI RecycleBin_CompareIDs(IShellFolder2 *iface, LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) -{ - RecycleBin *This = (RecycleBin *)iface; - - /* TODO */ - TRACE("(%p, %p, %p, %p)\n", This, (void *)lParam, pidl1, pidl2); - if (pidl1->mkid.cb != pidl2->mkid.cb) - return MAKE_HRESULT(SEVERITY_SUCCESS, 0, pidl1->mkid.cb - pidl2->mkid.cb); - return MAKE_HRESULT(SEVERITY_SUCCESS, 0, (unsigned short)memcmp(pidl1->mkid.abID, pidl2->mkid.abID, pidl1->mkid.cb)); -} - -static HRESULT WINAPI RecycleBin_CreateViewObject(IShellFolder2 *iface, HWND hwndOwner, REFIID riid, void **ppv) -{ - RecycleBin *This = (RecycleBin *)iface; - LPSHELLVIEW pShellView; - HRESULT hr = E_NOINTERFACE; - - TRACE("(%p, %p, %s, %p)\n", This, hwndOwner, debugstr_guid(riid), ppv); - - if (!ppv) - return hr; - - *ppv = NULL; - - if (IsEqualIID (riid, &IID_IDropTarget)) - { - WARN ("IDropTarget not implemented\n"); - hr = E_NOTIMPL; - } - else if (IsEqualIID (riid, &IID_IContextMenu) || IsEqualIID (riid, &IID_IContextMenu2)) - { - This->lpContextMenu2 = &recycleBincmVtblFolder; - *ppv = &This->lpContextMenu2; - This->refCount++; - hr = S_OK; - } - else if (IsEqualIID (riid, &IID_IShellView)) - { - pShellView = IShellView_Constructor ((IShellFolder *) iface); - if (pShellView) - { - hr = IShellView_QueryInterface (pShellView, riid, ppv); - IShellView_Release (pShellView); - } - } - else - return hr; - TRACE ("-- (%p)->(interface=%p)\n", This, ppv); - return hr; - -} - -static HRESULT WINAPI RecycleBin_GetAttributesOf(IShellFolder2 *This, UINT cidl, LPCITEMIDLIST *apidl, - SFGAOF *rgfInOut) -{ - TRACE("(%p, %d, {%p, ...}, {%x})\n", This, cidl, apidl[0], (unsigned int)*rgfInOut); - *rgfInOut &= SFGAO_CANMOVE|SFGAO_CANDELETE|SFGAO_HASPROPSHEET|SFGAO_FILESYSTEM; - return S_OK; -} - -static HRESULT WINAPI RecycleBin_GetUIObjectOf(IShellFolder2 *iface, HWND hwndOwner, UINT cidl, LPCITEMIDLIST *apidl, - REFIID riid, UINT *prgfInOut, void **ppv) -{ - IUnknown *pObj = NULL; - HRESULT hr = E_INVALIDARG; - RecycleBin * This = (RecycleBin*)iface; - - TRACE ("(%p)->(%p,%u,apidl=%p, %p %p)\n", This, - hwndOwner, cidl, apidl, prgfInOut, ppv); - - if (!ppv) - return hr; - - *ppv = NULL; - - if ((IsEqualIID (riid, &IID_IContextMenu) || IsEqualIID(riid, &IID_IContextMenu2)) && (cidl >= 1)) - { - This->lpContextMenu2 = &recycleBincmVtblBitbucketItem; - pObj = (IUnknown*)(&This->lpContextMenu2); - This->apidl = apidl[0]; - IUnknown_AddRef(pObj); - hr = S_OK; - } - else if (IsEqualIID (riid, &IID_IDropTarget) && (cidl >= 1)) - { - hr = IShellFolder_QueryInterface (iface, &IID_IDropTarget, (LPVOID *) & pObj); - } - else - hr = E_NOINTERFACE; - - if (SUCCEEDED(hr) && !pObj) - hr = E_OUTOFMEMORY; - - *ppv = pObj; - TRACE ("(%p)->hr=0x%08x\n", This, hr); - return hr; -} - -static HRESULT WINAPI RecycleBin_GetDisplayNameOf(IShellFolder2 *This, LPCITEMIDLIST pidl, SHGDNF uFlags, STRRET *pName) -{ - PIDLRecycleStruct *pFileDetails; - LPWSTR pFileName; - - TRACE("(%p, %p, %x, %p)\n", This, pidl, (unsigned int)uFlags, pName); - - - if (_ILIsBitBucket (pidl)) - { - WCHAR pszPath[100]; - - HCR_GetClassNameW(&CLSID_RecycleBin, pszPath, MAX_PATH); - pName->uType = STRRET_WSTR; - pName->u.pOleStr = StrDupW(pszPath); - return S_OK; - } - - pFileDetails = _ILGetRecycleStruct(pidl); - if (!pFileDetails) - { - pName->u.cStr[0] = 0; - pName->uType = STRRET_CSTR; - return E_INVALIDARG; - } - - pFileName = wcsrchr(pFileDetails->szName, L'\\'); - if (!pFileName) - { - pName->u.cStr[0] = 0; - pName->uType = STRRET_CSTR; - return E_UNEXPECTED; - } - - pName->u.pOleStr = StrDupW(pFileName + 1); - if (pName->u.pOleStr == NULL) - return E_OUTOFMEMORY; - - pName->uType = STRRET_WSTR; - return S_OK; -} - -static HRESULT WINAPI RecycleBin_SetNameOf(IShellFolder2 *This, HWND hwnd, LPCITEMIDLIST pidl, LPCOLESTR pszName, - SHGDNF uFlags, LPITEMIDLIST *ppidlOut) -{ - TRACE("\n"); - return E_FAIL; /* not supported */ -} - -static HRESULT WINAPI RecycleBin_GetDefaultSearchGUID(IShellFolder2 *iface, GUID *pguid) -{ - FIXME("stub\n"); - return E_NOTIMPL; -} - -static HRESULT WINAPI RecycleBin_EnumSearches(IShellFolder2 *iface, IEnumExtraSearch **ppEnum) -{ - FIXME("stub\n"); - *ppEnum = NULL; - return E_NOTIMPL; -} - -static HRESULT WINAPI RecycleBin_GetDefaultColumn(IShellFolder2 *iface, DWORD dwReserved, ULONG *pSort, ULONG *pDisplay) -{ - RecycleBin *This = (RecycleBin *)iface; - TRACE("(%p, %x, %p, %p)\n", This, (unsigned int)dwReserved, pSort, pDisplay); - *pSort = 0; - *pDisplay = 0; - return S_OK; -} - -static HRESULT WINAPI RecycleBin_GetDefaultColumnState(IShellFolder2 *iface, UINT iColumn, SHCOLSTATEF *pcsFlags) -{ - RecycleBin *This = (RecycleBin *)iface; - TRACE("(%p, %d, %p)\n", This, iColumn, pcsFlags); - if (iColumn >= COLUMNS_COUNT) - return E_INVALIDARG; - *pcsFlags = RecycleBinColumns[iColumn].pcsFlags; - return S_OK; -} - -static HRESULT WINAPI RecycleBin_GetDetailsEx(IShellFolder2 *iface, LPCITEMIDLIST pidl, const SHCOLUMNID *pscid, VARIANT *pv) -{ - FIXME("stub\n"); - return E_NOTIMPL; -} - -static HRESULT FormatDateTime(LPWSTR buffer, int size, FILETIME * ft) -{ - FILETIME lft; - SYSTEMTIME time; - int ret; - - FileTimeToLocalFileTime(ft, &lft); - FileTimeToSystemTime(&lft, &time); - - ret = GetDateFormatW(LOCALE_USER_DEFAULT, DATE_SHORTDATE, &time, NULL, buffer, size); - if (ret>0 && ret<size) - { - /* Append space + time without seconds */ - buffer[ret-1] = ' '; - GetTimeFormatW(LOCALE_USER_DEFAULT, TIME_NOSECONDS, &time, NULL, &buffer[ret], size - ret); - } - - return (ret!=0 ? E_FAIL : S_OK); -} - -static HRESULT WINAPI RecycleBin_GetDetailsOf(IShellFolder2 *iface, LPCITEMIDLIST pidl, UINT iColumn, LPSHELLDETAILS pDetails) -{ - RecycleBin *This = (RecycleBin *)iface; - PIDLRecycleStruct * pFileDetails; - WCHAR buffer[MAX_PATH]; - WCHAR szTypeName[100]; - LPWSTR pszBackslash; - UINT Length; - - TRACE("(%p, %p, %d, %p)\n", This, pidl, iColumn, pDetails); - if (iColumn >= COLUMNS_COUNT) - return E_FAIL; - pDetails->fmt = RecycleBinColumns[iColumn].fmt; - pDetails->cxChar = RecycleBinColumns[iColumn].cxChars; - if (pidl == NULL) - { - pDetails->str.uType = STRRET_WSTR; - LoadStringW(shell32_hInstance, RecycleBinColumns[iColumn].column_name_id, buffer, MAX_PATH); - return SHStrDupW(buffer, &pDetails->str.u.pOleStr); - } - - if (iColumn == COLUMN_NAME) - return RecycleBin_GetDisplayNameOf(iface, pidl, SHGDN_NORMAL, &pDetails->str); - - pFileDetails = _ILGetRecycleStruct(pidl); - switch (iColumn) - { - case COLUMN_DATEDEL: - FormatDateTime(buffer, MAX_PATH, &pFileDetails->DeletionTime); - break; - case COLUMN_DELFROM: - pszBackslash = wcsrchr(pFileDetails->szName, L'\\'); - Length = (pszBackslash - pFileDetails->szName); - memcpy((LPVOID)buffer, pFileDetails->szName, Length * sizeof(WCHAR)); - buffer[Length] = L'\0'; - break; - case COLUMN_SIZE: - StrFormatKBSizeW(pFileDetails->FileSize.QuadPart, buffer, MAX_PATH); - break; - case COLUMN_MTIME: - FormatDateTime(buffer, MAX_PATH, &pFileDetails->LastModification); - break; - case COLUMN_TYPE: - szTypeName[0] = L'\0'; - lstrcpyW(buffer,PathFindExtensionW(pFileDetails->szName)); - if (!( HCR_MapTypeToValueW(buffer, buffer, sizeof(buffer)/sizeof(WCHAR), TRUE) && - HCR_MapTypeToValueW(buffer, szTypeName, sizeof(szTypeName)/sizeof(WCHAR), FALSE ))) - { - lstrcpyW (szTypeName, PathFindExtensionW(pFileDetails->szName)); - strcatW(szTypeName, L"-"); - Length = wcslen(szTypeName); - if (LoadStringW(shell32_hInstance, IDS_SHV_COLUMN1, &szTypeName[Length], (sizeof(szTypeName)/sizeof(WCHAR))- Length)) - szTypeName[(sizeof(szTypeName)/sizeof(WCHAR))-1] = L'\0'; - } - pDetails->str.uType = STRRET_WSTR; - return SHStrDupW(szTypeName, &pDetails->str.u.pOleStr); - break; - default: - return E_FAIL; - } - - pDetails->str.uType = STRRET_WSTR; - return SHStrDupW(buffer, &pDetails->str.u.pOleStr); -} - -static HRESULT WINAPI RecycleBin_MapColumnToSCID(IShellFolder2 *iface, UINT iColumn, SHCOLUMNID *pscid) -{ - RecycleBin *This = (RecycleBin *)iface; - TRACE("(%p, %d, %p)\n", This, iColumn, pscid); - if (iColumn>=COLUMNS_COUNT) - return E_INVALIDARG; - pscid->fmtid = *RecycleBinColumns[iColumn].fmtId; - pscid->pid = RecycleBinColumns[iColumn].pid; - return S_OK; -} - -static const IShellFolder2Vtbl recycleBinVtbl = -{ - /* IUnknown */ - RecycleBin_QueryInterface, - RecycleBin_AddRef, - RecycleBin_Release, - - /* IShellFolder */ - RecycleBin_ParseDisplayName, - RecycleBin_EnumObjects, - RecycleBin_BindToObject, - RecycleBin_BindToStorage, - RecycleBin_CompareIDs, - RecycleBin_CreateViewObject, - RecycleBin_GetAttributesOf, - RecycleBin_GetUIObjectOf, - RecycleBin_GetDisplayNameOf, - RecycleBin_SetNameOf, - - /* IShellFolder2 */ - RecycleBin_GetDefaultSearchGUID, - RecycleBin_EnumSearches, - RecycleBin_GetDefaultColumn, - RecycleBin_GetDefaultColumnState, - RecycleBin_GetDetailsEx, - RecycleBin_GetDetailsOf, - RecycleBin_MapColumnToSCID -}; - -static HRESULT WINAPI RecycleBin_IPersistFolder2_GetClassID(IPersistFolder2 *This, CLSID *pClassID) -{ - TRACE("(%p, %p)\n", This, pClassID); - if (This == NULL || pClassID == NULL) - return E_INVALIDARG; - memcpy(pClassID, &CLSID_RecycleBin, sizeof(CLSID)); - return S_OK; -} - -static HRESULT WINAPI RecycleBin_IPersistFolder2_Initialize(IPersistFolder2 *iface, LPCITEMIDLIST pidl) -{ - RecycleBin *This = impl_from_IPersistFolder(iface); - TRACE("(%p, %p)\n", This, pidl); - - This->pidl = ILClone(pidl); - if (This->pidl == NULL) - return E_OUTOFMEMORY; - return S_OK; -} - -static HRESULT WINAPI RecycleBin_IPersistFolder2_GetCurFolder(IPersistFolder2 *iface, LPITEMIDLIST *ppidl) -{ - RecycleBin *This = impl_from_IPersistFolder(iface); - TRACE("\n"); - *ppidl = ILClone(This->pidl); - return S_OK; -} - -static HRESULT WINAPI RecycleBin_IPersistFolder2_QueryInterface(IPersistFolder2 *This, REFIID riid, void **ppvObject) -{ - return RecycleBin_QueryInterface((IShellFolder2 *)impl_from_IPersistFolder(This), riid, ppvObject); -} - -static ULONG WINAPI RecycleBin_IPersistFolder2_AddRef(IPersistFolder2 *This) -{ - return RecycleBin_AddRef((IShellFolder2 *)impl_from_IPersistFolder(This)); -} - -static ULONG WINAPI RecycleBin_IPersistFolder2_Release(IPersistFolder2 *This) -{ - return RecycleBin_Release((IShellFolder2 *)impl_from_IPersistFolder(This)); -} - -static const IPersistFolder2Vtbl recycleBinPersistVtbl = -{ - /* IUnknown */ - RecycleBin_IPersistFolder2_QueryInterface, - RecycleBin_IPersistFolder2_AddRef, - RecycleBin_IPersistFolder2_Release, - - /* IPersist */ - RecycleBin_IPersistFolder2_GetClassID, - /* IPersistFolder */ - RecycleBin_IPersistFolder2_Initialize, - /* IPersistFolder2 */ - RecycleBin_IPersistFolder2_GetCurFolder -}; - -/************************************************************************* - * BitBucket IShellExtInit interface - */ - -static HRESULT WINAPI -RecycleBin_ExtInit_QueryInterface( IShellExtInit* iface, REFIID riid, void** ppvObject ) -{ - return RecycleBin_QueryInterface((IShellFolder2 *)impl_from_IShellExtInit(iface), riid, ppvObject); -} - -static ULONG WINAPI -RecycleBin_ExtInit_AddRef( IShellExtInit* iface ) -{ - return RecycleBin_AddRef((IShellFolder2 *)impl_from_IShellExtInit(iface)); -} - -static ULONG WINAPI -RecycleBin_ExtInit_Release( IShellExtInit* iface ) -{ - return RecycleBin_Release((IShellFolder2 *)impl_from_IShellExtInit(iface)); -} - -static HRESULT WINAPI -RecycleBin_ExtInit_Initialize( IShellExtInit* iface, LPCITEMIDLIST pidlFolder, - IDataObject *pdtobj, HKEY hkeyProgID ) -{ - RecycleBin *This = impl_from_IShellExtInit(iface); - - TRACE("%p %p %p %p\n", This, pidlFolder, pdtobj, hkeyProgID ); - return S_OK; -} - - -static const IShellExtInitVtbl eivt = -{ - RecycleBin_ExtInit_QueryInterface, - RecycleBin_ExtInit_AddRef, - RecycleBin_ExtInit_Release, - RecycleBin_ExtInit_Initialize -}; - - -/************************************************************************* - * BitBucket context menu - * - */ - -static HRESULT WINAPI -RecycleBin_IContextMenu2Folder_QueryInterface( IContextMenu2* iface, REFIID riid, void** ppvObject ) -{ - return RecycleBin_QueryInterface((IShellFolder2 *)impl_from_IContextMenu2(iface), riid, ppvObject); -} - -static ULONG WINAPI -RecycleBin_IContextMenu2Folder_AddRef( IContextMenu2* iface ) -{ - return RecycleBin_AddRef((IShellFolder2 *)impl_from_IContextMenu2(iface)); -} - -static ULONG WINAPI -RecycleBin_IContextMenu2Folder_Release( IContextMenu2* iface ) -{ - return RecycleBin_Release((IShellFolder2 *)impl_from_IContextMenu2(iface)); -} - -static HRESULT WINAPI -RecycleBin_IContextMenu2Folder_QueryContextMenu( IContextMenu2* iface, HMENU hmenu, UINT indexMenu, - UINT idCmdFirst, UINT idCmdLast, UINT uFlags ) -{ - WCHAR szBuffer[100]; - MENUITEMINFOW mii; - int id = 1; - RecycleBin * This = impl_from_IContextMenu2(iface); - - TRACE("%p %p %u %u %u %u\n", This, - hmenu, indexMenu, idCmdFirst, idCmdLast, uFlags ); - - if ( !hmenu ) - return E_INVALIDARG; - - memset( &mii, 0, sizeof(mii) ); - mii.cbSize = sizeof(mii); - mii.fMask = MIIM_TYPE | MIIM_ID | MIIM_STATE; - szBuffer[0] = L'\0'; - LoadStringW(shell32_hInstance, IDS_OPEN, szBuffer, sizeof(szBuffer)/sizeof(WCHAR)); - szBuffer[(sizeof(szBuffer)/sizeof(WCHAR))-1] = L'\0'; - mii.dwTypeData = (LPWSTR)szBuffer; - mii.cch = strlenW( mii.dwTypeData ); - mii.wID = idCmdFirst + id++; - mii.fState = MFS_ENABLED; - mii.fType = MFT_STRING; - - if (!InsertMenuItemW( hmenu, indexMenu, TRUE, &mii )) - return E_FAIL; - This->iIdOpen = 1; - - mii.fState = MFS_ENABLED; - szBuffer[0] = L'\0'; - LoadStringW(shell32_hInstance, IDS_EMPTY_BITBUCKET, szBuffer, sizeof(szBuffer)/sizeof(WCHAR)); - szBuffer[(sizeof(szBuffer)/sizeof(WCHAR))-1] = L'\0'; - mii.cch = strlenW( mii.dwTypeData ); - mii.wID = idCmdFirst + id++; - if (!InsertMenuItemW( hmenu, idCmdLast, TRUE, &mii )) - { - TRACE("RecycleBin_IContextMenu2Folder_QueryContextMenu failed to insert item properties"); - return E_FAIL; - } - This->iIdEmpty = 2; - return MAKE_HRESULT( SEVERITY_SUCCESS, 0, id ); -} - -static HRESULT WINAPI -RecycleBin_IContextMenu2Folder_InvokeCommand( IContextMenu2* iface, LPCMINVOKECOMMANDINFO lpici ) -{ - HRESULT hr; - LPSHELLBROWSER lpSB; - LPSHELLVIEW lpSV = NULL; - - RecycleBin * This = impl_from_IContextMenu2(iface); - - TRACE("%p %p verb %p\n", This, lpici, lpici->lpVerb); - - if ( LOWORD(lpici->lpVerb) == This->iIdEmpty) - { - // FIXME - // path & flags - hr = SHEmptyRecycleBinW(lpici->hwnd, L"C:\\", 0); - TRACE("result %x\n", hr); - if (hr != S_OK) - { - return hr; - } - - if((lpSB = (LPSHELLBROWSER)SendMessageA(lpici->hwnd, CWM_GETISHELLBROWSER,0,0))) - { - if(SUCCEEDED(IShellBrowser_QueryActiveShellView(lpSB, &lpSV))) - { - IShellView_Refresh(lpSV); - } - } - } - - - if ( LOWORD(lpici->lpVerb) == This->iIdProperties) - { - WCHAR szDrive = 'C'; - SH_ShowRecycleBinProperties(szDrive); - return S_OK; - } - - return S_OK; -} - -static HRESULT WINAPI -RecycleBin_IContextMenu2Folder_GetCommandString( IContextMenu2* iface, UINT_PTR idCmd, UINT uType, - UINT* pwReserved, LPSTR pszName, UINT cchMax ) -{ - RecycleBin * This = impl_from_IContextMenu2(iface); - - FIXME("%p %lu %u %p %p %u\n", This, - idCmd, uType, pwReserved, pszName, cchMax ); - - return E_NOTIMPL; -} - -/************************************************************************** -* RecycleBin_IContextMenu2Item_HandleMenuMsg() -*/ -static HRESULT WINAPI RecycleBin_IContextMenu2Folder_HandleMenuMsg( - IContextMenu2 *iface, - UINT uMsg, - WPARAM wParam, - LPARAM lParam) -{ - RecycleBin * This = impl_from_IContextMenu2(iface); - - TRACE("RecycleBin_IContextMenu2Item_IContextMenu2Folder_HandleMenuMsg (%p)->(msg=%x wp=%lx lp=%lx)\n",This, uMsg, wParam, lParam); - - return E_NOTIMPL; -} - - -static const IContextMenu2Vtbl recycleBincmVtblFolder = -{ - RecycleBin_IContextMenu2Folder_QueryInterface, - RecycleBin_IContextMenu2Folder_AddRef, - RecycleBin_IContextMenu2Folder_Release, - RecycleBin_IContextMenu2Folder_QueryContextMenu, - RecycleBin_IContextMenu2Folder_InvokeCommand, - RecycleBin_IContextMenu2Folder_GetCommandString, - RecycleBin_IContextMenu2Folder_HandleMenuMsg -}; - - -/************************************************************************** -* IContextMenu2 Bitbucket Item Implementation -*/ - -/************************************************************************ - * RecycleBin_IContextMenu2Item_QueryInterface - */ -static HRESULT WINAPI RecycleBin_IContextMenu2Item_QueryInterface(IContextMenu2 * iface, REFIID iid, LPVOID * ppvObject) -{ - RecycleBin * This = impl_from_IContextMenu2(iface); - - TRACE("(%p)\n", This); - - return RecycleBin_QueryInterface((IShellFolder2*)This, iid, ppvObject); -} - -/************************************************************************ - * RecycleBin_IContextMenu2Item_AddRef - */ -static ULONG WINAPI RecycleBin_IContextMenu2Item_AddRef(IContextMenu2 * iface) -{ - RecycleBin * This = impl_from_IContextMenu2(iface); - - TRACE("(%p)->(count=%u)\n", This, This->refCount); - - return RecycleBin_AddRef((IShellFolder2*)This); -} - -/************************************************************************ - * RecycleBin_IContextMenu2Item_Release - */ -static ULONG WINAPI RecycleBin_IContextMenu2Item_Release(IContextMenu2 * iface) -{ - RecycleBin * This = impl_from_IContextMenu2(iface); - - TRACE("(%p)->(count=%u)\n", This, This->refCount); - - return RecycleBin_Release((IShellFolder2*)This); -} - -/************************************************************************** -* RecycleBin_IContextMenu2Item_QueryContextMenu() -*/ -static HRESULT WINAPI RecycleBin_IContextMenu2Item_QueryContextMenu( - IContextMenu2 *iface, - HMENU hMenu, - UINT indexMenu, - UINT idCmdFirst, - UINT idCmdLast, - UINT uFlags) -{ - char szBuffer[30] = {0}; - ULONG Count = 1; - - RecycleBin * This = impl_from_IContextMenu2(iface); - - TRACE("(%p)->(hmenu=%p indexmenu=%x cmdfirst=%x cmdlast=%x flags=%x )\n", - This, hMenu, indexMenu, idCmdFirst, idCmdLast, uFlags); - - if (LoadStringA(shell32_hInstance, IDS_RESTORE, szBuffer, sizeof(szBuffer)/sizeof(char))) - { - szBuffer[(sizeof(szBuffer)/sizeof(char))-1] = L'\0'; - _InsertMenuItem(hMenu, indexMenu++, TRUE, idCmdFirst + Count, MFT_STRING, szBuffer, MFS_ENABLED); - Count++; - } - - if (LoadStringA(shell32_hInstance, IDS_CUT, szBuffer, sizeof(szBuffer)/sizeof(char))) - { - _InsertMenuItem(hMenu, indexMenu++, TRUE, idCmdFirst + Count++, MFT_SEPARATOR, NULL, MFS_ENABLED); - szBuffer[(sizeof(szBuffer)/sizeof(char))-1] = L'\0'; - _InsertMenuItem(hMenu, indexMenu++, TRUE, idCmdFirst + Count++, MFT_STRING, szBuffer, MFS_ENABLED); - } - - if (LoadStringA(shell32_hInstance, IDS_DELETE, szBuffer, sizeof(szBuffer)/sizeof(char))) - { - szBuffer[(sizeof(szBuffer)/sizeof(char))-1] = L'\0'; - _InsertMenuItem(hMenu, indexMenu++, TRUE, idCmdFirst + Count++, MFT_SEPARATOR, NULL, MFS_ENABLED); - _InsertMenuItem(hMenu, indexMenu++, TRUE, idCmdFirst + Count++, MFT_STRING, szBuffer, MFS_ENABLED); - } - - if (LoadStringA(shell32_hInstance, IDS_PROPERTIES, szBuffer, sizeof(szBuffer)/sizeof(char))) - { - szBuffer[(sizeof(szBuffer)/sizeof(char))-1] = L'\0'; - _InsertMenuItem(hMenu, indexMenu++, TRUE, idCmdFirst + Count++, MFT_SEPARATOR, NULL, MFS_ENABLED); - _InsertMenuItem(hMenu, indexMenu++, TRUE, idCmdFirst + Count, MFT_STRING, szBuffer, MFS_DEFAULT); - } - - return MAKE_HRESULT(SEVERITY_SUCCESS, 0, Count); -} - - -/************************************************************************** -* RecycleBin_IContextMenu2Item_InvokeCommand() -*/ -static HRESULT WINAPI RecycleBin_IContextMenu2Item_InvokeCommand( - IContextMenu2 *iface, - LPCMINVOKECOMMANDINFO lpcmi) -{ - - SEARCH_CONTEXT Context; - RecycleBin * This = impl_from_IContextMenu2(iface); - static LPCWSTR szDrive = L"C:\\"; - - TRACE("(%p)->(invcom=%p verb=%p wnd=%p)\n",This,lpcmi,lpcmi->lpVerb, lpcmi->hwnd); - - if (lpcmi->lpVerb == MAKEINTRESOURCE(1) || lpcmi->lpVerb == MAKEINTRESOURCE(5)) - { - Context.pFileDetails = _ILGetRecycleStruct(This->apidl); - Context.bFound = FALSE; - - EnumerateRecycleBinW(szDrive, CBSearchBitBucket, (PVOID)&Context); - if (!Context.bFound) - return E_FAIL; - - if (lpcmi->lpVerb == MAKEINTRESOURCE(1)) - { - /* restore file */ - if (RestoreFile(Context.hDeletedFile)) - return S_OK; - else - return E_FAIL; - } - else - { - FIXME("implement delete\n"); - CloseRecycleBinHandle(Context.hDeletedFile); - return E_NOTIMPL; - } - } - else if (lpcmi->lpVerb == MAKEINTRESOURCE(3)) - { - FIXME("implement cut\n"); - return E_NOTIMPL; - } - else if (lpcmi->lpVerb == MAKEINTRESOURCE(7)) - { - FIXME("implement properties\n"); - return E_NOTIMPL; - } - - return S_OK; -} - -/************************************************************************** - * RecycleBin_IContextMenu2Item_GetCommandString() - * - */ -static HRESULT WINAPI RecycleBin_IContextMenu2Item_GetCommandString( - IContextMenu2 *iface, - UINT_PTR idCommand, - UINT uFlags, - UINT* lpReserved, - LPSTR lpszName, - UINT uMaxNameLen) -{ - RecycleBin * This = impl_from_IContextMenu2(iface); - - TRACE("(%p)->(idcom=%lx flags=%x %p name=%p len=%x)\n",This, idCommand, uFlags, lpReserved, lpszName, uMaxNameLen); - - - return E_FAIL; -} - - - -/************************************************************************** -* RecycleBin_IContextMenu2Item_HandleMenuMsg() -*/ -static HRESULT WINAPI RecycleBin_IContextMenu2Item_HandleMenuMsg( - IContextMenu2 *iface, - UINT uMsg, - WPARAM wParam, - LPARAM lParam) -{ - RecycleBin * This = impl_from_IContextMenu2(iface); - - TRACE("RecycleBin_IContextMenu2Item_HandleMenuMsg (%p)->(msg=%x wp=%lx lp=%lx)\n",This, uMsg, wParam, lParam); - - return E_NOTIMPL; -} - -static const IContextMenu2Vtbl recycleBincmVtblBitbucketItem = -{ - RecycleBin_IContextMenu2Item_QueryInterface, - RecycleBin_IContextMenu2Item_AddRef, - RecycleBin_IContextMenu2Item_Release, - RecycleBin_IContextMenu2Item_QueryContextMenu, - RecycleBin_IContextMenu2Item_InvokeCommand, - RecycleBin_IContextMenu2Item_GetCommandString, - RecycleBin_IContextMenu2Item_HandleMenuMsg -}; - - -void toggleNukeOnDeleteOption(HWND hwndDlg, BOOL bEnable) -{ - if (bEnable) - { - SendDlgItemMessage(hwndDlg, 14001, BM_SETCHECK, BST_UNCHECKED, 0); - EnableWindow(GetDlgItem(hwndDlg, 14002), FALSE); - SendDlgItemMessage(hwndDlg, 14003, BM_SETCHECK, BST_CHECKED, 0); - } - else - { - SendDlgItemMessage(hwndDlg, 14001, BM_SETCHECK, BST_CHECKED, 0); - EnableWindow(GetDlgItem(hwndDlg, 14002), TRUE); - SendDlgItemMessage(hwndDlg, 14003, BM_SETCHECK, BST_UNCHECKED, 0); - } -} - - -void -InitializeBitBucketDlg(HWND hwndDlg, WCHAR DefaultDrive) -{ - WCHAR CurDrive = L'A'; - WCHAR szDrive[] = L"A:\\"; - DWORD dwDrives; - WCHAR szName[100]; - WCHAR szVolume[100]; - DWORD MaxComponent, Flags; - DWORD dwSerial; - LVCOLUMNW lc; - HWND hDlgCtrl; - LVITEMW li; - INT itemCount; - ULARGE_INTEGER TotalNumberOfFreeBytes, TotalNumberOfBytes, FreeBytesAvailable; - RECT rect; - int columnSize; - int defIndex = 0; - DWORD dwSize; - PDRIVE_ITEM_CONTEXT pItem = NULL, pDefault = NULL, pFirst = NULL; - - hDlgCtrl = GetDlgItem(hwndDlg, 14000); - - if (!LoadStringW(shell32_hInstance, IDS_RECYCLEBIN_LOCATION, szVolume, sizeof(szVolume) / sizeof(WCHAR))) - szVolume[0] = 0; - - GetClientRect(hDlgCtrl, &rect); - - memset(&lc, 0, sizeof(LV_COLUMN) ); - lc.mask = LVCF_WIDTH | LVCF_TEXT | LVCF_SUBITEM | LVCF_FMT; - - columnSize = 140; //FIXME - lc.iSubItem = 0; - lc.fmt = LVCFMT_FIXED_WIDTH; - lc.cx = columnSize; - lc.cchTextMax = lstrlenW(szVolume); - lc.pszText = szVolume; - (void)ListView_InsertColumnW(hDlgCtrl, 0, &lc); - - if (!LoadStringW(shell32_hInstance, IDS_RECYCLEBIN_DISKSPACE, szVolume, sizeof(szVolume) / sizeof(WCHAR))) - szVolume[0] = 0; - - lc.iSubItem = 1; - lc.cx = rect.right - rect.left - columnSize; - lc.cchTextMax = lstrlenW(szVolume); - lc.pszText = szVolume; - (void)ListView_InsertColumnW(hDlgCtrl, 1, &lc); - - dwDrives = GetLogicalDrives(); - itemCount = 0; - do - { - if ((dwDrives & 0x1)) - { - UINT Type = GetDriveTypeW(szDrive); - if (Type == DRIVE_FIXED) //FIXME - { - if (!GetVolumeInformationW(szDrive, szName, sizeof(szName) / sizeof(WCHAR), &dwSerial, &MaxComponent, &Flags, NULL, 0)) - { - szName[0] = 0; - dwSerial = -1; - } - - sprintfW(szVolume, L"%s (%c)", szName, szDrive[0]); - memset(&li, 0x0, sizeof(LVITEMW)); - li.mask = LVIF_TEXT | LVIF_PARAM; - li.iSubItem = 0; - li.pszText = szVolume; - li.iItem = itemCount; - (void)ListView_InsertItemW(hDlgCtrl, &li); - if (GetDiskFreeSpaceExW(szDrive, &FreeBytesAvailable , &TotalNumberOfBytes, &TotalNumberOfFreeBytes)) - { - if (StrFormatByteSizeW(TotalNumberOfFreeBytes.QuadPart, szVolume, sizeof(szVolume) / sizeof(WCHAR))) - { - - pItem = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(DRIVE_ITEM_CONTEXT)); - if (pItem) - { - sprintfW(szName, L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Bitbucket\\Volume\\%04X-%04X", LOWORD(dwSerial), HIWORD(dwSerial)); - dwSize = sizeof(DWORD); - RegGetValueW(HKEY_CURRENT_USER, szName, L"MaxCapacity", RRF_RT_DWORD, NULL, &pItem->dwMaxCapacity, &dwSize); - dwSize = sizeof(DWORD); - RegGetValueW(HKEY_CURRENT_USER, szName, L"NukeOnDelete", RRF_RT_DWORD, NULL, &pItem->dwNukeOnDelete, &dwSize); - pItem->dwSerial = dwSerial; - li.mask = LVIF_PARAM; - li.lParam = (LPARAM)pItem; - (void)ListView_SetItemW(hDlgCtrl, &li); - if (CurDrive == DefaultDrive) - { - defIndex = itemCount; - pDefault = pItem; - } - } - if (!pFirst) - pFirst = pItem; - - li.mask = LVIF_TEXT; - li.iSubItem = 1; - li.pszText = szVolume; - li.iItem = itemCount; - (void)ListView_SetItemW(hDlgCtrl, &li); - } - } - itemCount++; - } - } - CurDrive++; - szDrive[0] = CurDrive; - dwDrives = (dwDrives >> 1); - }while(dwDrives); - - if (!pDefault) - pDefault = pFirst; - if (pDefault) - { - toggleNukeOnDeleteOption(hwndDlg, pDefault->dwNukeOnDelete); - SetDlgItemInt(hwndDlg, 14002, pDefault->dwMaxCapacity, FALSE); - } - ZeroMemory(&li, sizeof(li)); - li.mask = LVIF_STATE; - li.stateMask = (UINT)-1; - li.state = LVIS_FOCUSED|LVIS_SELECTED; - li.iItem = defIndex; - (void)ListView_SetItemW(hDlgCtrl, &li); - -} - -static BOOL StoreDriveSettings(HWND hwndDlg) -{ - int iCount, iIndex; - HWND hDlgCtrl = GetDlgItem(hwndDlg, 14000); - LVITEMW li; - PDRIVE_ITEM_CONTEXT pItem; - HKEY hKey, hSubKey; - WCHAR szSerial[20]; - DWORD dwSize; - - - if (RegOpenKeyExW(HKEY_CURRENT_USER, L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Bitbucket\\Volume", 0, KEY_WRITE, &hKey) != ERROR_SUCCESS) - return FALSE; - - iCount = ListView_GetItemCount(hDlgCtrl); - - ZeroMemory(&li, sizeof(li)); - li.mask = LVIF_PARAM; - - for(iIndex = 0; iIndex < iCount; iIndex++) - { - li.iItem = iIndex; - if (ListView_GetItemW(hDlgCtrl, &li)) - { - pItem = (PDRIVE_ITEM_CONTEXT)li.lParam; - sprintfW(szSerial, L"%04X-%04X", LOWORD(pItem->dwSerial), HIWORD(pItem->dwSerial)); - if (RegCreateKeyExW(hKey, szSerial, 0, NULL, 0, KEY_WRITE, NULL, &hSubKey, NULL) == ERROR_SUCCESS) - { - dwSize = sizeof(DWORD); - RegSetValueExW(hSubKey, L"NukeOnDelete", 0, REG_DWORD, (LPVOID)&pItem->dwNukeOnDelete, dwSize); - dwSize = sizeof(DWORD); - RegSetValueExW(hSubKey, L"MaxCapacity", 0, REG_DWORD, (LPVOID)&pItem->dwMaxCapacity, dwSize); - RegCloseKey(hSubKey); - } - } - } - RegCloseKey(hKey); - return TRUE; - -} - -static VOID FreeDriveItemContext(HWND hwndDlg) -{ - int iCount, iIndex; - HWND hDlgCtrl = GetDlgItem(hwndDlg, 14000); - LVITEMW li; - - iCount = ListView_GetItemCount(hDlgCtrl); - - ZeroMemory(&li, sizeof(li)); - li.mask = LVIF_PARAM; - - for(iIndex = 0; iIndex < iCount; iIndex++) - { - li.iItem = iIndex; - if (ListView_GetItemW(hDlgCtrl, &li)) - { - HeapFree(GetProcessHeap(), 0, (LPVOID)li.lParam); - } - } -} - -INT -GetDefaultItem(HWND hwndDlg, LVITEMW * li) -{ - HWND hDlgCtrl; - UINT iItemCount, iIndex; - - hDlgCtrl = GetDlgItem(hwndDlg, 14000); - if (!hDlgCtrl) - return -1; - - iItemCount = ListView_GetItemCount(hDlgCtrl); - if (!iItemCount) - return -1; - - ZeroMemory(li, sizeof(LVITEMW)); - li->mask = LVIF_PARAM | LVIF_STATE; - li->stateMask = (UINT)-1; - for (iIndex = 0; iIndex < iItemCount; iIndex++) - { - li->iItem = iIndex; - if (ListView_GetItemW(hDlgCtrl, li)) - { - if (li->state & LVIS_SELECTED) - return iIndex; - } - } - return -1; - -} - -INT_PTR -CALLBACK -BitBucketDlg( - HWND hwndDlg, - UINT uMsg, - WPARAM wParam, - LPARAM lParam -) -{ - LPPSHNOTIFY lppsn; - LPNMLISTVIEW lppl; - LVITEMW li; - PDRIVE_ITEM_CONTEXT pItem; - BOOL bSuccess; - UINT uResult; - - switch(uMsg) - { - case WM_INITDIALOG: - InitializeBitBucketDlg(hwndDlg, (WCHAR)lParam); - if (GetDlgCtrlID((HWND)wParam) != 14000) - { - SetFocus(GetDlgItem(hwndDlg, 14000)); - return FALSE; - } - return TRUE; - case WM_COMMAND: - switch(LOWORD(wParam)) - { - case 14001: - toggleNukeOnDeleteOption(hwndDlg, FALSE); - PropSheet_Changed(GetParent(hwndDlg), hwndDlg); - break; - case 14003: - toggleNukeOnDeleteOption(hwndDlg, TRUE); - PropSheet_Changed(GetParent(hwndDlg), hwndDlg); - break; - case 14004: - PropSheet_Changed(GetParent(hwndDlg), hwndDlg); - break; - } - break; - case WM_NOTIFY: - lppsn = (LPPSHNOTIFY) lParam; - lppl = (LPNMLISTVIEW) lParam; - if (lppsn->hdr.code == PSN_APPLY) - { - if (GetDefaultItem(hwndDlg, &li) > -1) - { - pItem = (PDRIVE_ITEM_CONTEXT)li.lParam; - if (pItem) - { - uResult = GetDlgItemInt(hwndDlg, 14002, &bSuccess, FALSE); - if (bSuccess) - pItem->dwMaxCapacity = uResult; - if (SendDlgItemMessageW(hwndDlg, 14003, BM_GETCHECK, 0, 0) == BST_CHECKED) - pItem->dwNukeOnDelete = TRUE; - else - pItem->dwNukeOnDelete = FALSE; - } - } - if (StoreDriveSettings(hwndDlg)) - { - SetWindowLong( hwndDlg, DWL_MSGRESULT, PSNRET_NOERROR ); - return TRUE; - } - } - else if (lppl->hdr.code == LVN_ITEMCHANGING) - { - ZeroMemory(&li, sizeof(li)); - li.mask = LVIF_PARAM; - li.iItem = lppl->iItem; - if (!ListView_GetItemW(lppl->hdr.hwndFrom, &li)) - return TRUE; - - pItem = (PDRIVE_ITEM_CONTEXT)li.lParam; - if (!pItem) - return TRUE; - - if (!(lppl->uOldState & LVIS_FOCUSED) && (lppl->uNewState & LVIS_FOCUSED)) - { - /* new focused item */ - toggleNukeOnDeleteOption(lppl->hdr.hwndFrom, pItem->dwNukeOnDelete); - SetDlgItemInt(hwndDlg, 14002, pItem->dwMaxCapacity, FALSE); - } - else if ((lppl->uOldState & LVIS_FOCUSED) && !(lppl->uNewState & LVIS_FOCUSED)) - { - /* kill focus */ - uResult = GetDlgItemInt(hwndDlg, 14002, &bSuccess, FALSE); - if (bSuccess) - pItem->dwMaxCapacity = uResult; - if (SendDlgItemMessageW(hwndDlg, 14003, BM_GETCHECK, 0, 0) == BST_CHECKED) - pItem->dwNukeOnDelete = TRUE; - else - pItem->dwNukeOnDelete = FALSE; - } - return TRUE; - - } - break; - case WM_DESTROY: - FreeDriveItemContext(hwndDlg); - break; - } - return FALSE; -} - -BOOL SH_ShowRecycleBinProperties(WCHAR sDrive) -{ - HPROPSHEETPAGE hpsp[1]; - PROPSHEETHEADERW psh; - HPROPSHEETPAGE hprop; - - BOOL ret; - - - ZeroMemory(&psh, sizeof(PROPSHEETHEADERW)); - psh.dwSize = sizeof(PROPSHEETHEADERW); - psh.dwFlags = PSP_DEFAULT | PSH_PROPTITLE; - psh.pszCaption = MAKEINTRESOURCEW(IDS_RECYCLEBIN_FOLDER_NAME); - psh.hwndParent = NULL; - psh.u3.phpage = hpsp; - psh.hInstance = shell32_hInstance; - - hprop = SH_CreatePropertySheetPage("BITBUCKET_PROPERTIES_DLG", BitBucketDlg, (LPARAM)sDrive, NULL); - if (!hprop) - { - ERR("Failed to create property sheet\n"); - return FALSE; - } - hpsp[psh.nPages] = hprop; - psh.nPages++; - - - ret = PropertySheetW(&psh); - if (ret < 0) - return FALSE; - else - return TRUE; -} - -BOOL -TRASH_CanTrashFile(LPCWSTR wszPath) -{ - LONG ret; - DWORD dwNukeOnDelete, dwType, VolSerialNumber, MaxComponentLength; - DWORD FileSystemFlags, dwSize, dwDisposition; - HKEY hKey; - WCHAR szBuffer[10]; - WCHAR szKey[150] = L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Bitbucket\\Volume\\"; - - if (wszPath[1] != L':') - { - /* path is UNC */ - return FALSE; - } - - if (GetDriveTypeW(wszPath) != DRIVE_FIXED) - { - /* no bitbucket on removable media */ - return FALSE; - } - - if (!GetVolumeInformationW(wszPath, NULL, 0, &VolSerialNumber, &MaxComponentLength, &FileSystemFlags, NULL, 0)) - { - ERR("GetVolumeInformationW failed with %u\n", GetLastError()); - return FALSE; - } - - sprintfW(szBuffer, L"%04X-%04X", LOWORD(VolSerialNumber), HIWORD(VolSerialNumber)); - wcscat(szKey, szBuffer); - - if (RegCreateKeyExW(HKEY_CURRENT_USER, szKey, 0, NULL, 0, KEY_WRITE, NULL, &hKey, &dwDisposition) != ERROR_SUCCESS) - { - ERR("RegCreateKeyExW failed\n"); - return FALSE; - } - - if (dwDisposition & REG_CREATED_NEW_KEY) - { - /* per default move to bitbucket */ - dwNukeOnDelete = 0; - RegSetValueExW(hKey, L"NukeOnDelete", 0, REG_DWORD, (LPBYTE)&dwNukeOnDelete, sizeof(DWORD)); - /* per default unlimited size */ - dwSize = -1; - RegSetValueExW(hKey, L"MaxCapacity", 0, REG_DWORD, (LPBYTE)&dwSize, sizeof(DWORD)); - RegCloseKey(hKey); - return TRUE; - } - else - { - dwSize = sizeof(dwNukeOnDelete); - ret = RegQueryValueExW(hKey, L"NukeOnDelete", NULL, &dwType, (LPBYTE)&dwNukeOnDelete, &dwSize); - if (ret != ERROR_SUCCESS) - { - if (ret == ERROR_FILE_NOT_FOUND) - { - /* restore key and enable bitbucket */ - dwNukeOnDelete = 0; - RegSetValueExW(hKey, L"NukeOnDelete", 0, REG_DWORD, (LPBYTE)&dwNukeOnDelete, sizeof(DWORD)); - } - RegCloseKey(hKey); - return TRUE; - } - else if (dwNukeOnDelete) - { - /* do not delete to bitbucket */ - RegCloseKey(hKey); - return FALSE; - } - /* FIXME - * check if bitbucket is full - */ - RegCloseKey(hKey); - return TRUE; - } -} - -BOOL -TRASH_TrashFile(LPCWSTR wszPath) -{ - TRACE("(%s)\n", debugstr_w(wszPath)); - return DeleteFileToRecycleBinW(wszPath); -} - -/************************************************************************* - * SHUpdateRecycleBinIcon [SHELL32.@] - * - * Undocumented - */ -HRESULT WINAPI SHUpdateRecycleBinIcon(void) -{ - FIXME("stub\n"); - return S_OK; -} Modified: trunk/reactos/dll/win32/shell32/shell32.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shell32.…
============================================================================== --- trunk/reactos/dll/win32/shell32/shell32.rbuild [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/shell32.rbuild [iso-8859-1] Mon Aug 11 09:52:22 2008 @@ -71,7 +71,7 @@ <file>shell32.spec</file> <file>fprop.c</file> <file>drive.c</file> - <file>recyclebin.c</file> + <file>shfldr_recyclebin.c</file> <file>she_ocmenu.c</file> <file>shv_item_new.c</file> <file>folder_options.c</file>
16 years, 2 months
1
0
0
0
[gedmurphy] 35276: Add missing files.
by gedmurphy@svn.reactos.org
Author: gedmurphy Date: Mon Aug 11 09:52:19 2008 New Revision: 35276 URL:
http://svn.reactos.org/svn/reactos?rev=35276&view=rev
Log: Add missing files. Added: trunk/tools/reactosdbg/RosDBG/PipeTargetSelect.Designer.cs trunk/tools/reactosdbg/RosDBG/PipeTargetSelect.cs trunk/tools/reactosdbg/RosDBG/PipeTargetSelect.resx Added: trunk/tools/reactosdbg/RosDBG/PipeTargetSelect.Designer.cs URL:
http://svn.reactos.org/svn/reactos/trunk/tools/reactosdbg/RosDBG/PipeTarget…
============================================================================== --- trunk/tools/reactosdbg/RosDBG/PipeTargetSelect.Designer.cs (added) +++ trunk/tools/reactosdbg/RosDBG/PipeTargetSelect.Designer.cs [iso-8859-1] Mon Aug 11 09:52:19 2008 @@ -1,0 +1,118 @@ +namespace RosDBG +{ + partial class PipeTargetSelect + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.bOK = new System.Windows.Forms.Button(); + this.bCancel = new System.Windows.Forms.Button(); + this.PipeNameTextBox = new System.Windows.Forms.TextBox(); + this.DefaultRadioBtn = new System.Windows.Forms.RadioButton(); + this.CustomRadioBtn = new System.Windows.Forms.RadioButton(); + this.SuspendLayout(); + // + // bOK + // + this.bOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.bOK.Location = new System.Drawing.Point(69, 86); + this.bOK.Name = "bOK"; + this.bOK.Size = new System.Drawing.Size(75, 23); + this.bOK.TabIndex = 5; + this.bOK.Text = "OK"; + this.bOK.UseVisualStyleBackColor = true; + this.bOK.Click += new System.EventHandler(this.bOK_Click); + // + // bCancel + // + this.bCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.bCancel.Location = new System.Drawing.Point(150, 86); + this.bCancel.Name = "bCancel"; + this.bCancel.Size = new System.Drawing.Size(75, 23); + this.bCancel.TabIndex = 6; + this.bCancel.Text = "Cancel"; + this.bCancel.UseVisualStyleBackColor = true; + this.bCancel.Click += new System.EventHandler(this.bCancel_Click); + // + // PipeNameTextBox + // + this.PipeNameTextBox.Enabled = false; + this.PipeNameTextBox.Location = new System.Drawing.Point(15, 60); + this.PipeNameTextBox.Name = "PipeNameTextBox"; + this.PipeNameTextBox.Size = new System.Drawing.Size(213, 20); + this.PipeNameTextBox.TabIndex = 8; + // + // DefaultRadioBtn + // + this.DefaultRadioBtn.AutoSize = true; + this.DefaultRadioBtn.Checked = true; + this.DefaultRadioBtn.Location = new System.Drawing.Point(15, 12); + this.DefaultRadioBtn.Name = "DefaultRadioBtn"; + this.DefaultRadioBtn.Size = new System.Drawing.Size(81, 17); + this.DefaultRadioBtn.TabIndex = 9; + this.DefaultRadioBtn.TabStop = true; + this.DefaultRadioBtn.Text = "Use Default"; + this.DefaultRadioBtn.UseVisualStyleBackColor = true; + // + // CustomRadioBtn + // + this.CustomRadioBtn.AutoSize = true; + this.CustomRadioBtn.Location = new System.Drawing.Point(15, 37); + this.CustomRadioBtn.Name = "CustomRadioBtn"; + this.CustomRadioBtn.Size = new System.Drawing.Size(91, 17); + this.CustomRadioBtn.TabIndex = 10; + this.CustomRadioBtn.Text = "Custom Name"; + this.CustomRadioBtn.UseVisualStyleBackColor = true; + this.CustomRadioBtn.CheckedChanged += new System.EventHandler(this.radioButton2_CheckedChanged); + // + // PipeTargetSelect + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(237, 121); + this.Controls.Add(this.CustomRadioBtn); + this.Controls.Add(this.DefaultRadioBtn); + this.Controls.Add(this.PipeNameTextBox); + this.Controls.Add(this.bOK); + this.Controls.Add(this.bCancel); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; + this.Name = "PipeTargetSelect"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "PipeTargetSelect"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Button bOK; + private System.Windows.Forms.Button bCancel; + private System.Windows.Forms.TextBox PipeNameTextBox; + private System.Windows.Forms.RadioButton DefaultRadioBtn; + private System.Windows.Forms.RadioButton CustomRadioBtn; + } +} Added: trunk/tools/reactosdbg/RosDBG/PipeTargetSelect.cs URL:
http://svn.reactos.org/svn/reactos/trunk/tools/reactosdbg/RosDBG/PipeTarget…
============================================================================== --- trunk/tools/reactosdbg/RosDBG/PipeTargetSelect.cs (added) +++ trunk/tools/reactosdbg/RosDBG/PipeTargetSelect.cs [iso-8859-1] Mon Aug 11 09:52:19 2008 @@ -1,0 +1,44 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; + +namespace RosDBG +{ + public partial class PipeTargetSelect : Form + { + public string PipeName + { + get { return PipeNameTextBox.Text; } + set { PipeNameTextBox.Text = value; } + } + + public PipeTargetSelect() + { + InitializeComponent(); + } + + private void bOK_Click(object sender, EventArgs e) + { + DialogResult = DialogResult.OK; + Close(); + } + + private void bCancel_Click(object sender, EventArgs e) + { + DialogResult = DialogResult.Cancel; + Close(); + } + + private void radioButton2_CheckedChanged(object sender, EventArgs e) + { + RadioButton rb = (RadioButton)sender; + + PipeNameTextBox.Enabled = rb.Checked; + } + } +} Added: trunk/tools/reactosdbg/RosDBG/PipeTargetSelect.resx URL:
http://svn.reactos.org/svn/reactos/trunk/tools/reactosdbg/RosDBG/PipeTarget…
============================================================================== --- trunk/tools/reactosdbg/RosDBG/PipeTargetSelect.resx (added) +++ trunk/tools/reactosdbg/RosDBG/PipeTargetSelect.resx [iso-8859-1] Mon Aug 11 09:52:19 2008 @@ -1,0 +1,120 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ...
ado.net/XML
headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="
http://www.w3.org/2001/XMLSchema
" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="
http://www.w3.org/XML/1998/namespace
" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root>
16 years, 2 months
1
0
0
0
[janderwald] 35275: Copied remotely
by janderwald@svn.reactos.org
Author: janderwald Date: Mon Aug 11 09:49:32 2008 New Revision: 35275 URL:
http://svn.reactos.org/svn/reactos?rev=35275&view=rev
Log: Copied remotely Added: trunk/reactos/dll/win32/shell32/shfldr_recyclebin.c - copied unchanged from r35274, trunk/reactos/dll/win32/shell32/recyclebin.c
16 years, 2 months
1
0
0
0
[cgutman] 35274: - Set the MDL we just freed to NULL so we don't try to free it again later
by cgutman@svn.reactos.org
Author: cgutman Date: Mon Aug 11 09:38:17 2008 New Revision: 35274 URL:
http://svn.reactos.org/svn/reactos?rev=35274&view=rev
Log: - Set the MDL we just freed to NULL so we don't try to free it again later Modified: branches/aicom-network-fixes/drivers/network/afd/afd/lock.c Modified: branches/aicom-network-fixes/drivers/network/afd/afd/lock.c URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/net…
============================================================================== --- branches/aicom-network-fixes/drivers/network/afd/afd/lock.c [iso-8859-1] (original) +++ branches/aicom-network-fixes/drivers/network/afd/afd/lock.c [iso-8859-1] Mon Aug 11 09:38:17 2008 @@ -116,6 +116,7 @@ if( Map[i].Mdl ) { MmUnlockPages( Map[i].Mdl ); IoFreeMdl( Map[i].Mdl ); + Map[i].Mdl = NULL; } }
16 years, 2 months
1
0
0
0
← Newer
1
...
54
55
56
57
58
59
60
...
86
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
Results per page:
10
25
50
100
200