Module: wine
Branch: refs/heads/master
Commit: e4b51580e1ba482e3a3f66bcd5e24f790decf42b
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=e4b51580e1ba482e3a3f66b…
Author: Robert Shearman <rob(a)codeweavers.com>
Date: Sat Jun 17 12:32:05 2006 +0100
ntdll: If ObjectAttributes is NULL then an error is returned at the
start of the NtOpenSymbolicLinkObject, therefore ObjectAttributes does
not need to be checked for NULL later on in the function.
---
dlls/ntdll/om.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/ntdll/om.c b/dlls/ntdll/om.c
index 19d1901..41855dc 100644
--- a/dlls/ntdll/om.c
+++ b/dlls/ntdll/om.c
@@ -506,8 +506,8 @@ NTSTATUS WINAPI NtOpenSymbolicLinkObject
SERVER_START_REQ(open_symlink)
{
req->access = DesiredAccess;
- req->attributes = ObjectAttributes ? ObjectAttributes->Attributes : 0;
- req->rootdir = ObjectAttributes ? ObjectAttributes->RootDirectory : 0;
+ req->attributes = ObjectAttributes->Attributes;
+ req->rootdir = ObjectAttributes->RootDirectory;
if (ObjectAttributes->ObjectName)
wine_server_add_data(req, ObjectAttributes->ObjectName->Buffer,
ObjectAttributes->ObjectName->Length);
Module: wine
Branch: refs/heads/master
Commit: 1ddc722ec243200ec5b16792cbfde5b68d151c84
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=1ddc722ec243200ec5b1679…
Author: Robert Shearman <rob(a)codeweavers.com>
Date: Sat Jun 17 12:31:54 2006 +0100
ole32: Document CoCreateFreeThreadedMarshaler.
---
dlls/ole32/ftmarshal.c | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/dlls/ole32/ftmarshal.c b/dlls/ole32/ftmarshal.c
index 7493bab..6f80091 100644
--- a/dlls/ole32/ftmarshal.c
+++ b/dlls/ole32/ftmarshal.c
@@ -302,6 +302,23 @@ static const IMarshalVtbl ftmvtbl =
/***********************************************************************
* CoCreateFreeThreadedMarshaler [OLE32.@]
*
+ * Creates a free-threaded marshaler.
+ *
+ * PARAMS
+ * punkOuter [I] Optional. Outer unknown.
+ * ppunkMarshal [O] On return, the inner unknown of the created free-threaded marshaler.
+ *
+ * RETURNS
+ * Success: S_OK
+ * Failure: E_OUTOFMEMORY if no memory available to create object.
+ *
+ * NOTES
+ * Objects that ensure their state is maintained consistent when used by
+ * multiple threads and reference no single-threaded objects are known as
+ * free-threaded. The free-threaded marshaler enables these objects to be
+ * efficiently marshaled within the same process, by not creating proxies
+ * (as they aren't needed for the object to be safely used), whilst still
+ * allowing the object to be used in inter-process and inter-machine contexts.
*/
HRESULT WINAPI CoCreateFreeThreadedMarshaler (LPUNKNOWN punkOuter, LPUNKNOWN * ppunkMarshal)
{
Module: wine
Branch: refs/heads/master
Commit: 183da10af457f3b7ed0f0b13f49570e52a91256e
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=183da10af457f3b7ed0f0b1…
Author: Saulius Krasuckas <saulius.krasuckas(a)ieee.org>
Date: Fri Jun 16 22:43:15 2006 +0300
lz32: Enable old test and expand it.
---
dlls/lz32/tests/lzexpand_main.c | 45 +++++++++++++++++++++++++++++----------
1 files changed, 34 insertions(+), 11 deletions(-)
diff --git a/dlls/lz32/tests/lzexpand_main.c b/dlls/lz32/tests/lzexpand_main.c
index 277f1ba..07058c9 100644
--- a/dlls/lz32/tests/lzexpand_main.c
+++ b/dlls/lz32/tests/lzexpand_main.c
@@ -28,9 +28,7 @@ #include <lzexpand.h>
#include "wine/test.h"
static char filename_[] = "testfile.xx_";
-#if 0
static char filename[] = "testfile.xxx";
-#endif
static char filename2[] = "testfile.yyy";
/* This is the hex string representation of the file created by compressing
@@ -59,6 +57,9 @@ static void test_lzopenfile(void)
OFSTRUCT test;
DWORD retval;
INT file;
+ char expected[MAX_PATH];
+ char filled_0xA5[OFS_MAXPATHNAME];
+
/* Check for nonexistent file. */
file = LZOpenFile("badfilename_", &test, OF_READ);
@@ -88,20 +89,42 @@ static void test_lzopenfile(void)
ok(file >= 0, "LZOpenFile failed on read/write\n");
LZClose(file);
-
/* If the file "foo.xxx" does not exist, LZOpenFile should then
check for the file "foo.xx_" and open that -- at least on some
operating systems. Doesn't seem to on my copy of Win98.
- The Wine testing guidelines say we should accept the behavior of
- any valid version of Windows. Thus it seems we cannot check this?!
- Revisit this at some point to see if this can be tested somehow.
*/
-#if 0
+ retval = GetCurrentDirectory(MAX_PATH, expected);
+ ok(retval > 0, "GetCurrentDirectory returned %ld, GLE=0x%lx\n",
+ retval, GetLastError());
+ lstrcatA(expected, "\\");
+ lstrcatA(expected, filename);
+ /* Compressed file name ends with underscore. */
+ retval = lstrlenA(expected);
+ expected[retval-1] = '_';
+ memset(&filled_0xA5, 0xA5, OFS_MAXPATHNAME);
+ memset(&test, 0xA5, sizeof(test));
+ SetLastError(0xfaceabee);
+
+ /* Try to open compressed file. */
file = LZOpenFile(filename, &test, OF_EXIST);
- ok(file != LZERROR_BADINHANDLE,
- "LZOpenFile \"filename_\" check failed\n");
- LZClose(file);
-#endif
+ if(file != LZERROR_BADINHANDLE) { /* NT */
+ ok(test.cBytes == sizeof(OFSTRUCT),
+ "LZOpenFile set test.cBytes to %d\n", test.cBytes);
+ ok(test.nErrCode == 0,
+ "LZOpenFile set test.nErrCode to %d\n", test.nErrCode);
+ ok(lstrcmpA(test.szPathName, expected) == 0,
+ "LZOpenFile returned '%s', but was expected to return '%s'\n",
+ test.szPathName, expected);
+ LZClose(file);
+ } else { /* 9x */
+ ok(test.cBytes == 0xA5,
+ "LZOpenFile set test.cBytes to %d\n", test.cBytes);
+ ok(test.nErrCode == ERROR_FILE_NOT_FOUND,
+ "LZOpenFile set test.nErrCode to %d\n", test.nErrCode);
+ ok(strncmp(test.szPathName, filled_0xA5, OFS_MAXPATHNAME) == 0,
+ "LZOpenFile returned '%s', but was expected to return '%s'\n",
+ test.szPathName, filled_0xA5);
+ }
/* Delete the file then make sure it doesn't exist anymore. */
file = LZOpenFile(filename_, &test, OF_DELETE);
Module: wine
Branch: refs/heads/master
Commit: 698a8a0b86348149f60e7352bbe6857048712ae0
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=698a8a0b86348149f60e735…
Author: Detlef Riekenberg <wine.dev(a)web.de>
Date: Fri Jun 16 10:01:31 2006 +0200
winspool: AddMonitor: Test the driver entry before return an error.
---
dlls/winspool.drv/info.c | 21 +++++++++++++++++----
1 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/dlls/winspool.drv/info.c b/dlls/winspool.drv/info.c
index 9d6e1c0..05df47a 100644
--- a/dlls/winspool.drv/info.c
+++ b/dlls/winspool.drv/info.c
@@ -1480,10 +1480,23 @@ BOOL WINAPI AddMonitorW(LPWSTR pName, DW
return FALSE;
}
- if(RegCreateKeyExW(hroot, mi2w->pName, 0, NULL, REG_OPTION_NON_VOLATILE,
- KEY_WRITE, NULL, &hentry, &disposition) == ERROR_SUCCESS) {
-
- if (disposition == REG_OPENED_EXISTING_KEY) {
+ if(RegCreateKeyExW( hroot, mi2w->pName, 0, NULL, REG_OPTION_NON_VOLATILE,
+ KEY_WRITE | KEY_QUERY_VALUE, NULL, &hentry,
+ &disposition) == ERROR_SUCCESS) {
+
+ /* Some installers set options for the port before calling AddMonitor.
+ We query the "Driver" entry to verify that the monitor is installed,
+ before we return an error.
+ When a user installs two print monitors at the same time with the
+ same name but with a different driver DLL and a task switch comes
+ between RegQueryValueExW and RegSetValueExW, a race condition
+ is possible but silently ignored. */
+
+ DWORD namesize = 0;
+
+ if ((disposition == REG_OPENED_EXISTING_KEY) &&
+ (RegQueryValueExW(hentry, DriverW, NULL, NULL, NULL,
+ &namesize) == ERROR_SUCCESS)) {
TRACE("monitor %s already exists\n", debugstr_w(mi2w->pName));
/* NT: ERROR_PRINT_MONITOR_ALREADY_INSTALLED (3006)
9x: ERROR_ALREADY_EXISTS (183) */