Temp Fix until I figure out what is wrong with Asserts.
Modified: trunk/reactos/drivers/usb/usbport/usbport.c
_____
Modified: trunk/reactos/drivers/usb/usbport/usbport.c
--- trunk/reactos/drivers/usb/usbport/usbport.c 2005-05-28 21:39:03 UTC
(rev 15623)
+++ trunk/reactos/drivers/usb/usbport/usbport.c 2005-05-28 21:40:01 UTC
(rev 15624)
@@ -1,86 +1,86 @@
-/*
- * ReactOS USB Port driver
- * Copyright (C) 2004 Aleksey Bragin
- * (C) 2005 Mark Tempel
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program 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 General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
- *
- * STATUS:
- * 19-Dec-2004 - just a stub for now, but with useful info by Filip
- */
-
-/* INCLUDES
*******************************************************************/
-#include <stddef.h>
-#include <windef.h>
-#include <ddk/ntddk.h>
-#include "usbport.h"
-#include <debug.h>
-
-/* PUBLIC AND PRIVATE FUNCTIONS
***********************************************/
-
-/*
-** Standard DriverEntry method.
-** We do nothing here. All real work is done in
USBPRORT_RegisterUSBPortDriver.
-*/
-NTSTATUS STDCALL
-DriverEntry(IN PVOID Context1, IN PVOID Context2)
-{
- DPRINT1("USBPORT.SYS DriverEntry\n");
- return STATUS_SUCCESS;
-}
-/*
- * This method is used by miniports to connect set up
- */
-NTSTATUS STDCALL
-USBPORT_RegisterUSBPortDriver(PDRIVER_OBJECT DriverObject, DWORD
Unknown1,
- PUSB_CONTROLLER_INTERFACE Interface)
-{
- //DPRINT1("USBPORT_RegisterUSBPortDriver\n");
- ASSERT(KeGetCurrentIRQL() < DISPATCH_LEVEL);
-
- return STATUS_SUCCESS;
-}
-
-NTSTATUS STDCALL
-USBPORT_GetHciMn(VOID)
-{
- return 0x10000001;
-}
-/*
- * This method is to allow miniports to create
- */
-NTSTATUS STDCALL
-USBPORT_AllocateUsbControllerInterface(OUT PUSB_CONTROLLER_INTERFACE
*pControllerInterface)
-{
- //DPRINT1("USBPORT_AllocateUsbControllerInterface\n");
- ASSERT(KeGetCurrentIRQL() < DISPATCH_LEVEL);
- ASSERT(0 != ControllerObject);
-
- *pControllerInterface =
(PUSB_CONTROLLER_INTERFACE)ExAllocatePoolWithTag(PagedPool,
sizeof(USB_CONTROLLER_INTERFACE),USB_CONTROLLER_INTERFACE_TAG);
- RtlZeroMemory(*pControllerInterface,
sizeof(USB_CONTROLLER_INTERFACE));
-
- return STATUS_SUCCESS;
-}
-
-NTSTATUS STDCALL
-USBPORT_FreeUsbControllerInterface(IN PUSB_CONTROLLER_INTERFACE
ControllerInterface)
-{
- //DPRINT1("USBPORT_FreeUsbControllerInterface\n");
- ASSERT(KeGetCurrentIRQL() < DISPATCH_LEVEL);
-
- ExFreePool(ControllerInterface);
-
- return STATUS_SUCCESS;
-}
+/*
+ * ReactOS USB Port driver
+ * Copyright (C) 2004 Aleksey Bragin
+ * (C) 2005 Mark Tempel
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
+ *
+ * STATUS:
+ * 19-Dec-2004 - just a stub for now, but with useful info by Filip
+ */
+
+/* INCLUDES
*******************************************************************/
+#include <stddef.h>
+#include <windef.h>
+#include <ddk/ntddk.h>
+#include "usbport.h"
+#include <debug.h>
+
+/* PUBLIC AND PRIVATE FUNCTIONS
***********************************************/
+
+/*
+** Standard DriverEntry method.
+** We do nothing here. All real work is done in
USBPRORT_RegisterUSBPortDriver.
+*/
+NTSTATUS STDCALL
+DriverEntry(IN PVOID Context1, IN PVOID Context2)
+{
+ DPRINT1("USBPORT.SYS DriverEntry\n");
+ return STATUS_SUCCESS;
+}
+/*
+ * This method is used by miniports to connect set up
+ */
+NTSTATUS STDCALL
+USBPORT_RegisterUSBPortDriver(PDRIVER_OBJECT DriverObject, DWORD
Unknown1,
+ PUSB_CONTROLLER_INTERFACE Interface)
+{
+ DPRINT1("USBPORT_RegisterUSBPortDriver\n");
+// ASSERT(KeGetCurrentIRQL() < DISPATCH_LEVEL);
+
+ return STATUS_SUCCESS;
+}
+
+NTSTATUS STDCALL
+USBPORT_GetHciMn(VOID)
+{
+ return 0x10000001;
+}
+/*
+ * This method is to allow miniports to create
+ */
+NTSTATUS STDCALL
+USBPORT_AllocateUsbControllerInterface(OUT PUSB_CONTROLLER_INTERFACE
*pControllerInterface)
+{
+ DPRINT1("USBPORT_AllocateUsbControllerInterface\n");
+// ASSERT(KeGetCurrentIRQL() < DISPATCH_LEVEL);
+// ASSERT(0 != ControllerObject);
+
+ *pControllerInterface =
(PUSB_CONTROLLER_INTERFACE)ExAllocatePoolWithTag(PagedPool,
sizeof(USB_CONTROLLER_INTERFACE),USB_CONTROLLER_INTERFACE_TAG);
+ RtlZeroMemory(*pControllerInterface,
sizeof(USB_CONTROLLER_INTERFACE));
+
+ return STATUS_SUCCESS;
+}
+
+NTSTATUS STDCALL
+USBPORT_FreeUsbControllerInterface(IN PUSB_CONTROLLER_INTERFACE
ControllerInterface)
+{
+ DPRINT1("USBPORT_FreeUsbControllerInterface\n");
+// ASSERT(KeGetCurrentIRQL() < DISPATCH_LEVEL);
+
+ ExFreePool(ControllerInterface);
+
+ return STATUS_SUCCESS;
+}
Alexandre Julliard <julliard(a)winehq.org>
- Added rules for building import libraries in the individual dll
makefiles, and added support for building a .def.a static import
library too.
Uwe Bonnes <bon(a)elektron.ikp.physik.tu-darmstadt.de>
- Test cases for URL_UNESCAPE and small fix.
Francois Gouget <fgouget(a)free.fr>
- Assorted spelling fixes.
Modified: trunk/reactos/lib/shlwapi/Makefile.in
Modified: trunk/reactos/lib/shlwapi/reg.c
Modified: trunk/reactos/lib/shlwapi/url.c
_____
Modified: trunk/reactos/lib/shlwapi/Makefile.in
--- trunk/reactos/lib/shlwapi/Makefile.in 2005-05-28 21:38:59 UTC
(rev 15622)
+++ trunk/reactos/lib/shlwapi/Makefile.in 2005-05-28 21:39:03 UTC
(rev 15623)
@@ -4,6 +4,7 @@
SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = shlwapi.dll
+IMPORTLIB = libshlwapi.$(IMPLIBEXT)
IMPORTS = ole32 user32 gdi32 advapi32 kernel32 ntdll
DELAYIMPORTS = oleaut32
EXTRALIBS = -luuid $(LIBUNICODE)
_____
Modified: trunk/reactos/lib/shlwapi/reg.c
--- trunk/reactos/lib/shlwapi/reg.c 2005-05-28 21:38:59 UTC (rev
15622)
+++ trunk/reactos/lib/shlwapi/reg.c 2005-05-28 21:39:03 UTC (rev
15623)
@@ -1300,10 +1300,10 @@
*
* REG_EXPAND_SZ:
* case-1: the unexpanded string is smaller than the expanded one
- * subcase-1: the buffer is to small to hold the unexpanded
string:
+ * subcase-1: the buffer is too small to hold the unexpanded
string:
* function fails and returns the size of the unexpanded
string.
*
- * subcase-2: buffer is to small to hold the expanded string:
+ * subcase-2: buffer is too small to hold the expanded string:
* the function return success (!!) and the result is
truncated
* *** This is clearly an error in the native implementation.
***
*
@@ -1332,7 +1332,7 @@
/* Expand type REG_EXPAND_SZ into REG_SZ */
LPSTR szData;
- /* If the caller didn't supply a buffer or the buffer is to small
we have
+ /* If the caller didn't supply a buffer or the buffer is too small
we have
* to allocate our own
*/
if ((!pvData) || (dwRet == ERROR_MORE_DATA) )
_____
Modified: trunk/reactos/lib/shlwapi/url.c
--- trunk/reactos/lib/shlwapi/url.c 2005-05-28 21:38:59 UTC (rev
15622)
+++ trunk/reactos/lib/shlwapi/url.c 2005-05-28 21:39:03 UTC (rev
15623)
@@ -459,7 +459,7 @@
lpszUrlCpy[--nLen]=0;
if(dwFlags & URL_UNESCAPE)
- UrlUnescapeW(lpszUrlCpy, NULL, NULL, URL_UNESCAPE_INPLACE);
+ UrlUnescapeW(lpszUrlCpy, NULL, &nLen, URL_UNESCAPE_INPLACE);
if((EscapeFlags = dwFlags & (URL_ESCAPE_UNSAFE |
URL_ESCAPE_SPACES_ONLY |
@@ -1160,7 +1160,7 @@
TRACE("(%s, %p, %p, 0x%08lx)\n", debugstr_w(pszUrl), pszUnescaped,
pcchUnescaped, dwFlags);
- if(!pszUrl || !pszUnescaped || !pcchUnescaped)
+ if(!pszUrl || (!pszUnescaped && !(dwFlags &
URL_UNESCAPE_INPLACE))|| !pcchUnescaped)
return E_INVALIDARG;
if(dwFlags & URL_UNESCAPE_INPLACE)