Author: cwittich
Date: Sun Jan 18 11:14:54 2009
New Revision: 38900
URL: http://svn.reactos.org/svn/reactos?rev=38900&view=rev
Log:
add ctxtcall.idl from wine
Added:
trunk/reactos/include/psdk/ctxtcall.idl (with props)
Modified:
trunk/reactos/include/psdk/psdk.rbuild
Added: trunk/reactos/include/psdk/ctxtcall.idl
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/ctxtcall.idl?…
==============================================================================
--- trunk/reactos/include/psdk/ctxtcall.idl (added)
+++ trunk/reactos/include/psdk/ctxtcall.idl [iso-8859-1] Sun Jan 18 11:14:54 2009
@@ -1,0 +1,49 @@
+/*
+ * Copyright (C) 2008 Louis Lenders
+ *
+ * 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
+ */
+
+import "wtypes.idl";
+import "objidl.idl";
+import "unknwn.idl";
+
+typedef struct tagComCallData
+{
+ DWORD dwDispid;
+ DWORD dwReserved;
+ void *pUserDefined;
+} ComCallData;
+
+/***************************************************************************
+ * IContextCallback
+ */
+[
+ local,
+ object,
+ uuid(000001da-0000-0000-c000-000000000046),
+ pointer_default(unique)
+]
+interface IContextCallback : IUnknown
+{
+ typedef HRESULT (__stdcall *PFNCONTEXTCALL)(ComCallData *pParam);
+
+ HRESULT ContextCallback(
+ [in] PFNCONTEXTCALL pCallback,
+ [in] ComCallData *pParam,
+ [in] REFIID riid,
+ [in] int iMethod,
+ [in] IUnknown *pUnk);
+}
Propchange: trunk/reactos/include/psdk/ctxtcall.idl
------------------------------------------------------------------------------
svn:eol-style = native
Modified: trunk/reactos/include/psdk/psdk.rbuild
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/psdk.rbuild?r…
==============================================================================
--- trunk/reactos/include/psdk/psdk.rbuild [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/psdk.rbuild [iso-8859-1] Sun Jan 18 11:14:54 2009
@@ -5,6 +5,7 @@
<file>activdbg.idl</file>
<file>activscp.idl</file>
<file>control.idl</file>
+ <file>ctxtcall.idl</file>
<file>dimm.idl</file>
<file>dispex.idl</file>
<file>docobj.idl</file>
Author: mjmartin
Date: Sun Jan 18 10:31:45 2009
New Revision: 38899
URL: http://svn.reactos.org/svn/reactos?rev=38899&view=rev
Log:
- Fix calculation of WriteQuotaAvailable and WritePtr when moving memory.
- Due to the new implementation, Quota is not charged for partial message retrievals. Therefore reset Quota Available to MaxDataLength when last message is read from buffer and check that Quota is greater than 0 before waking the write thread.
Modified:
trunk/reactos/drivers/filesystems/npfs/rw.c
Modified: trunk/reactos/drivers/filesystems/npfs/rw.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/npfs/r…
==============================================================================
--- trunk/reactos/drivers/filesystems/npfs/rw.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/npfs/rw.c [iso-8859-1] Sun Jan 18 10:31:45 2009
@@ -537,10 +537,10 @@
/* Check if buffer is full and the read pointer is not at the start of the buffer */
if ((Ccb->WriteQuotaAvailable == 0) && (Ccb->ReadPtr > Ccb->Data))
{
+ Ccb->WriteQuotaAvailable += (ULONG_PTR)Ccb->ReadPtr - (ULONG_PTR)Ccb->Data;
memcpy(Ccb->Data, Ccb->ReadPtr, (ULONG_PTR)Ccb->WritePtr - (ULONG_PTR)Ccb->ReadPtr);
- Ccb->WritePtr = (PVOID)((ULONG_PTR)Ccb->WritePtr - ((ULONG_PTR)Ccb->WritePtr - (ULONG_PTR)Ccb->ReadPtr));
+ Ccb->WritePtr = (PVOID)((ULONG_PTR)Ccb->WritePtr - ((ULONG_PTR)Ccb->ReadPtr - (ULONG_PTR)Ccb->Data));
Ccb->ReadPtr = Ccb->Data;
- Ccb->WriteQuotaAvailable += (ULONG_PTR)Ccb->WritePtr - (ULONG_PTR)Ccb->ReadPtr;
}
/* For Message mode, the Message length is stored in the buffer preceeding the Message. */
@@ -560,7 +560,8 @@
/* Use the smaller value */
CopyLength = min(NextMessageLength, Length);
-
+ ASSERT(CopyLength > 0);
+ ASSERT(CopyLength <= Ccb->ReadDataAvailable);
/* retrieve the message from the buffer */
memcpy(Buffer, (PVOID)((ULONG_PTR)Ccb->ReadPtr + sizeof(NextMessageLength)), CopyLength);
@@ -571,6 +572,7 @@
{
/* Calculate the remaining message new size */
ULONG NewMessageSize = NextMessageLength-CopyLength;
+
/* Update ReadPtr to point to new Message size location */
Ccb->ReadPtr = (PVOID)((ULONG_PTR)Ccb->ReadPtr + CopyLength);
@@ -586,16 +588,16 @@
}
else
{
- /* This was the last Message, so just zero this messages for safety sake */
+ /* This was the last Message, so just zero start of buffer for safety sake */
memset(Ccb->Data, 0, NextMessageLength + sizeof(NextMessageLength));
+
+ /* Reset to MaxDataLength as partial message retrievals dont
+ give the length back to Quota */
+ Ccb->WriteQuotaAvailable = Ccb->MaxDataLength;
/* reset read and write pointer to beginning of buffer */
Ccb->WritePtr = Ccb->Data;
Ccb->ReadPtr = Ccb->Data;
-
- /* Add both the message length and the header to the WriteQuotaAvailable
- as they both were removed */
- Ccb->WriteQuotaAvailable += (CopyLength + sizeof(CopyLength));
}
#ifndef NDEBUG
DPRINT("Length %d Buffer %x\n",CopyLength,Buffer);
@@ -619,7 +621,8 @@
else
{
KeResetEvent(&Ccb->ReadEvent);
- if (Ccb->PipeState == FILE_PIPE_CONNECTED_STATE)
+
+ if ((Ccb->PipeState == FILE_PIPE_CONNECTED_STATE) && (Ccb->WriteQuotaAvailable > 0))
{
KeSetEvent(&Ccb->OtherSide->WriteEvent, IO_NO_INCREMENT, FALSE);
}
@@ -870,7 +873,7 @@
if (CopyLength > ReaderCcb->WriteQuotaAvailable)
{
DPRINT1("Writing %lu byte to pipe would overflow as only %lu bytes are available\n",
- CopyLength, ReaderCcb->ReadDataAvailable);
+ CopyLength, ReaderCcb->WriteQuotaAvailable);
ASSERT(FALSE);
}
Author: gedmurphy
Date: Sun Jan 18 09:15:54 2009
New Revision: 38895
URL: http://svn.reactos.org/svn/reactos?rev=38895&view=rev
Log:
you'd never guess I was English
Modified:
trunk/reactos/dll/win32/comctl32/treeview.c
Modified: trunk/reactos/dll/win32/comctl32/treeview.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/treevie…
==============================================================================
--- trunk/reactos/dll/win32/comctl32/treeview.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/comctl32/treeview.c [iso-8859-1] Sun Jan 18 09:15:54 2009
@@ -2831,7 +2831,7 @@
}
//
- // This is correct, but is causes and infinite loop of WM_PAINT messages, resulting
+ // This is correct, but it causes an infinite loop of WM_PAINT messages, resulting
// in continuous painting of the scroll bar in reactos. Comment out until the real
// bug is found
//