Re: winhttp: tests/server.c[new]: Add basic internal server test
Zac Brown wrote: Add basic internal server test. Thanks to Hans for some help. As a note, these tests pass on XP and 2003.
Re: Praise of sorts for Wine re Softmaker Office 2008
Dan Kegel wrote: http://forum.ubuntuusers.de/topic/softmaker-office-2008--eine-alternative--vora/ has a review of an office suite named Softmaker Office 2008, available for Windows and now also Linux. The review says in part Irritiert hat uns, daß die Windows-Version von Office 2008, die von Stick gestartet werden kann, unter Wine besser, schneller und stabiler läuft, wie die native Office 2008 für Linux. Wer also die Windows-Version legal erworben hat, kann hier Geld sparen. (It irritated us that the Windows version runs better on Wine than the native Linux version. If you have the Windows version already, save your money and run it on Wine.) That's praise of sorts... although I hope it doesn't dissuade other vendors from doing native ports. - Dan I noticed the same type of thing when I was playing with DVD Shrink a couple days ago. Ripping speed in DVD Shrink via Wine was significantly faster than on Windows. What usually is a 2.5 hour process was about 1.5-1.75 hour process. I agree though, hopefully the software vendors will do native ports :). -Zac
Re: git still down...
Dmitry Timoshkov wrote: Dan Kegel [EMAIL PROTECTED] wrote: $ git pull source.winehq.org[0: 209.46.25.134]: errno=Connection refused As a temporary solution I've replaced 'git://' protocol by 'http://' in .git/config. Should be up now anyway. I did a 'git fetch' this morning when AJ did commits or at least whenever he did commits (maybe yesterday's?). -Zac
Crashing tests for WinHttp
Hi all, Dan Kegel pointed out to me a couple of tests for WinHttp were reported as crashing in Wine, build 520ab5c26170 (the latest). Would the owners of machines 2000 wine-1.1.2 and XP th please shoot me an email. I'd like to see if I can reproduce the crash in wine. For better reference, its the machines in the first and last column on this page: http://test.winehq.org/data/520ab5c261706f6118a85a82ba84213932ba76e7/#group_Wine:winhttp:winhttp Thanks, Zac
Re: winhttp: tests/winhttp.c: Add test for WinHttpSendRequest
Hans Leidekker wrote: On Friday 25 July 2008 22:13:18 Zac Brown wrote: +#include wchar.h #include windef.h #include winbase.h +#include windows.h You shouldn't need these. -Hans Thank you, scratch this patch AJ, I'll send another.
Re: ntdll: Remove byte reversed U+3000 (CJK space) from being checked in RtlIsTextUnicode.
Dan Kegel wrote: Hang on, if you don't check U+3000 in the big endian case, you probably shouldn't check it in the little endian case, either, right? Well the problem is 0x0030 maps to a regular ASCII space. In order to really check this particular character in byte-reversed form it will probably be necessary to add an independent test that ensures that both the byte-reversed BOM is set AND the 0x0030 character is found. At the moment, unbreaking VS .NET 2005 seemed more important. It requires further investigation either way. -Zac
Re: [2/6] winhttp: Allow winhttp to use wininet.h with winhttp.h
James Hawkins wrote: On Fri, Jul 18, 2008 at 9:11 AM, Dan Kegel [EMAIL PROTECTED] wrote: James wrote: I thought the idea was to implement winhttp and then implement wininet on top of winhttp. Why are you importing wininet? As of January, Hans was still talking about implementing winhttp on top of wininet ( http://www.winehq.org/pipermail/wine-devel/2008-January/062172.html http://www.winehq.org/pipermail/wine-devel/2007-August/058420.html ) It's not clear one can fully implement either wininet on top of winhttp or vice versa. We will probably need some code duplication or private interfaces eventually. Building winhttp on top of wininet lets us develop on trunk and is probably the fastest path to making a bunch of applications happy, isn't it? That's the way I'm leaning, anyway. Sure, I was just going by the words of those I considered more experienced than me in this area, and my impression was that wininet was a subset of the functionality found in winhttp, but it seems that's not the case. It would not surprise me at all if the Windows implementations of these two modules are separate. They are in fact separate. At least by Dan H.'s looking at it. He mentioned that winhttp never actually imports wininet and as far as he can tell, they're separate albeit sharing many similar data structures.
Re: winhttp: tests/winhttp.c[new]: Add test for WinHttpOpenRequest
Zac Brown wrote: Add test for WinHttpOpenRequest. This test is modeled after wininet/tests/http.c's InternetOpenRequest_test function. This is the first of many tests for getting Bug 14381 (http://bugs.winehq.org/show_bug.cgi?id=14381) fixed with regard to WinHTTP. --- Makefile.in|2 + configure |3 + dlls/Makefile.in |1 + dlls/winhttp/tests/Makefile.in | 13 + dlls/winhttp/tests/winhttp.c | 105 5 files changed, 124 insertions(+), 0 deletions(-) create mode 100644 dlls/winhttp/tests/Makefile.in create mode 100644 dlls/winhttp/tests/winhttp.c diff --git a/Makefile.in b/Makefile.in index 1b35079..6a56e44 100644 --- a/Makefile.in +++ b/Makefile.in @@ -495,6 +495,7 @@ ALL_MAKEFILES = \ dlls/winex11.drv/Makefile \ dlls/wing32/Makefile \ dlls/winhttp/Makefile \ + dlls/winhttp/tests/Makefile \ dlls/wininet/Makefile \ dlls/wininet/tests/Makefile \ dlls/winmm/Makefile \ @@ -924,6 +925,7 @@ dlls/winequartz.drv/Makefile: dlls/winequartz.drv/Makefile.in dlls/Makedll.rules dlls/winex11.drv/Makefile: dlls/winex11.drv/Makefile.in dlls/Makedll.rules dlls/wing32/Makefile: dlls/wing32/Makefile.in dlls/Makedll.rules dlls/winhttp/Makefile: dlls/winhttp/Makefile.in dlls/Makedll.rules +dlls/winhttp/tests/Makefile: dlls/winhttp/tests/Makefile.in dlls/Maketest.rules dlls/wininet/Makefile: dlls/wininet/Makefile.in dlls/Makedll.rules dlls/wininet/tests/Makefile: dlls/wininet/tests/Makefile.in dlls/Maketest.rules dlls/winmm/Makefile: dlls/winmm/Makefile.in dlls/Makedll.rules diff --git a/configure b/configure index d9f9b65..a276261 100755 --- a/configure +++ b/configure @@ -22416,6 +22416,8 @@ ac_config_files=$ac_config_files dlls/wing32/Makefile ac_config_files=$ac_config_files dlls/winhttp/Makefile +ac_config_files=$ac_config_files dlls/winhttp/tests/Makefile + ac_config_files=$ac_config_files dlls/wininet/Makefile ac_config_files=$ac_config_files dlls/wininet/tests/Makefile @@ -23481,6 +23483,7 @@ do dlls/winex11.drv/Makefile) CONFIG_FILES=$CONFIG_FILES dlls/winex11.drv/Makefile ;; dlls/wing32/Makefile) CONFIG_FILES=$CONFIG_FILES dlls/wing32/Makefile ;; dlls/winhttp/Makefile) CONFIG_FILES=$CONFIG_FILES dlls/winhttp/Makefile ;; +dlls/winhttp/tests/Makefile) CONFIG_FILES=$CONFIG_FILES dlls/winhttp/tests/Makefile ;; dlls/wininet/Makefile) CONFIG_FILES=$CONFIG_FILES dlls/wininet/Makefile ;; dlls/wininet/tests/Makefile) CONFIG_FILES=$CONFIG_FILES dlls/wininet/tests/Makefile ;; dlls/winmm/Makefile) CONFIG_FILES=$CONFIG_FILES dlls/winmm/Makefile ;; diff --git a/dlls/Makefile.in b/dlls/Makefile.in index d130f35..1a77dc0 100644 --- a/dlls/Makefile.in +++ b/dlls/Makefile.in @@ -362,6 +362,7 @@ TESTSUBDIRS = \ usp10/tests \ uxtheme/tests \ version/tests \ + winhttp/tests \ wininet/tests \ winmm/tests \ winspool.drv/tests \ diff --git a/dlls/winhttp/tests/Makefile.in b/dlls/winhttp/tests/Makefile.in new file mode 100644 index 000..3f35e08 --- /dev/null +++ b/dlls/winhttp/tests/Makefile.in @@ -0,0 +1,13 @@ +TOPSRCDIR = @top_srcdir@ +TOPOBJDIR = ../../.. +SRCDIR= @srcdir@ +VPATH = @srcdir@ +TESTDLL = winhttp.dll +IMPORTS = winhttp ws2_32 kernel32 + +CTESTS = \ + winhttp.c + [EMAIL PROTECTED]@ + [EMAIL PROTECTED]@ # everything below this line is overwritten by make depend diff --git a/dlls/winhttp/tests/winhttp.c b/dlls/winhttp/tests/winhttp.c new file mode 100644 index 000..afc9d97 --- /dev/null +++ b/dlls/winhttp/tests/winhttp.c @@ -0,0 +1,105 @@ +/* + * WinHTTP - tests + * + * Copyright 2008 Google (Zac Brown) + * + * 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 + */ + +#define COBJMACROS + +#include stdarg.h +#include stdio.h +#include stdlib.h + +#include windef.h +#include winbase.h +#include winhttp.h + +#include wine/test.h + +/* Function pointer declarations for functions being used */ +static HINTERNET (WINAPI *pWinHttpOpen) (LPCWSTR
Re: winhttp: tests/winhttp.c[new]: Add test for WinHttpOpenRequest
Zac Brown wrote: Add test for WinHttpOpenRequest. This test is modeled after wininet/tests/http.c's InternetOpenRequest_test function. This is the first of many tests for getting Bug 14381 (http://bugs.winehq.org/show_bug.cgi?id=14381) fixed with regard to WinHTTP. --- Makefile.in|2 + configure |3 + dlls/Makefile.in |1 + dlls/winhttp/tests/Makefile.in | 13 + dlls/winhttp/tests/winhttp.c | 105 5 files changed, 124 insertions(+), 0 deletions(-) create mode 100644 dlls/winhttp/tests/Makefile.in create mode 100644 dlls/winhttp/tests/winhttp.c diff --git a/Makefile.in b/Makefile.in index 1b35079..6a56e44 100644 --- a/Makefile.in +++ b/Makefile.in @@ -495,6 +495,7 @@ ALL_MAKEFILES = \ dlls/winex11.drv/Makefile \ dlls/wing32/Makefile \ dlls/winhttp/Makefile \ + dlls/winhttp/tests/Makefile \ dlls/wininet/Makefile \ dlls/wininet/tests/Makefile \ dlls/winmm/Makefile \ @@ -924,6 +925,7 @@ dlls/winequartz.drv/Makefile: dlls/winequartz.drv/Makefile.in dlls/Makedll.rules dlls/winex11.drv/Makefile: dlls/winex11.drv/Makefile.in dlls/Makedll.rules dlls/wing32/Makefile: dlls/wing32/Makefile.in dlls/Makedll.rules dlls/winhttp/Makefile: dlls/winhttp/Makefile.in dlls/Makedll.rules +dlls/winhttp/tests/Makefile: dlls/winhttp/tests/Makefile.in dlls/Maketest.rules dlls/wininet/Makefile: dlls/wininet/Makefile.in dlls/Makedll.rules dlls/wininet/tests/Makefile: dlls/wininet/tests/Makefile.in dlls/Maketest.rules dlls/winmm/Makefile: dlls/winmm/Makefile.in dlls/Makedll.rules diff --git a/configure b/configure index d9f9b65..a276261 100755 --- a/configure +++ b/configure @@ -22416,6 +22416,8 @@ ac_config_files=$ac_config_files dlls/wing32/Makefile ac_config_files=$ac_config_files dlls/winhttp/Makefile +ac_config_files=$ac_config_files dlls/winhttp/tests/Makefile + ac_config_files=$ac_config_files dlls/wininet/Makefile ac_config_files=$ac_config_files dlls/wininet/tests/Makefile @@ -23481,6 +23483,7 @@ do dlls/winex11.drv/Makefile) CONFIG_FILES=$CONFIG_FILES dlls/winex11.drv/Makefile ;; dlls/wing32/Makefile) CONFIG_FILES=$CONFIG_FILES dlls/wing32/Makefile ;; dlls/winhttp/Makefile) CONFIG_FILES=$CONFIG_FILES dlls/winhttp/Makefile ;; +dlls/winhttp/tests/Makefile) CONFIG_FILES=$CONFIG_FILES dlls/winhttp/tests/Makefile ;; dlls/wininet/Makefile) CONFIG_FILES=$CONFIG_FILES dlls/wininet/Makefile ;; dlls/wininet/tests/Makefile) CONFIG_FILES=$CONFIG_FILES dlls/wininet/tests/Makefile ;; dlls/winmm/Makefile) CONFIG_FILES=$CONFIG_FILES dlls/winmm/Makefile ;; diff --git a/dlls/Makefile.in b/dlls/Makefile.in index d130f35..1a77dc0 100644 --- a/dlls/Makefile.in +++ b/dlls/Makefile.in @@ -362,6 +362,7 @@ TESTSUBDIRS = \ usp10/tests \ uxtheme/tests \ version/tests \ + winhttp/tests \ wininet/tests \ winmm/tests \ winspool.drv/tests \ diff --git a/dlls/winhttp/tests/Makefile.in b/dlls/winhttp/tests/Makefile.in new file mode 100644 index 000..3f35e08 --- /dev/null +++ b/dlls/winhttp/tests/Makefile.in @@ -0,0 +1,13 @@ +TOPSRCDIR = @top_srcdir@ +TOPOBJDIR = ../../.. +SRCDIR= @srcdir@ +VPATH = @srcdir@ +TESTDLL = winhttp.dll +IMPORTS = winhttp ws2_32 kernel32 + +CTESTS = \ + winhttp.c + [EMAIL PROTECTED]@ + [EMAIL PROTECTED]@ # everything below this line is overwritten by make depend diff --git a/dlls/winhttp/tests/winhttp.c b/dlls/winhttp/tests/winhttp.c new file mode 100644 index 000..afc9d97 --- /dev/null +++ b/dlls/winhttp/tests/winhttp.c @@ -0,0 +1,105 @@ +/* + * WinHTTP - tests + * + * Copyright 2008 Google (Zac Brown) + * + * 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 + */ + +#define COBJMACROS + +#include stdarg.h +#include stdio.h +#include stdlib.h + +#include windef.h +#include winbase.h +#include winhttp.h + +#include wine/test.h + +/* Function pointer declarations for functions being used */ +static HINTERNET (WINAPI *pWinHttpOpen) (LPCWSTR
Re: winhttp: main.c: Add stub implementation for WinHttpGetDefaultProxyConfiguration
Zac Brown wrote: Add stub implementation for WinHttpGetDefaultProxyConfiguration Ignore this, formatting is wrong.
Re: [RESEND]MSI:ACTION_AppSearchReg() should return backslash terminated paths - Solves bug 13838
Massimo Del Fedele wrote: I already verified that the patch does no harm AND solves a problem. For me that's more than enough. Ciao Max Can you provide proof that beyond the shadow of a doubt it will always be correct? One way to provide that proof is to write a test. -Zac
Re: [6/6] winhttp: main.c: Add stub implementation for WinHttpCloseHandle
Zac Brown wrote: Add stub implementation for WinHttpCloseHandle ignore, forgot patch.
Re: Thoughts on implementation of winhttp.dll
Hans Leidekker wrote: On Wednesday 02 July 2008 23:56:51 Rob Shearman wrote: How about: 3) Copy the networking sublayer from wininet into winhttp and build on top of that to implement winhttp. Reimplement wininet on top of winhttp. Drawback to this option is that you're going to destabilize wininet, but perhaps this is feasible now that we have a stable branch. -Hans I can see that it would be useful to do this so only one http set of functions need be updated as adjustments are made. I'd say it would definitely be something to do well after winhttp is stabilized. -Zac
Re: Thoughts on implementation of winhttp.dll
Hans Leidekker wrote: On Tuesday 01 July 2008 21:42:30 Zac Brown wrote: Does anyone have thoughts on implementing parts of winhttp in terms of wininet? The primary issue that prevents entirely implementing winhttp in terms of wininet is that there is no direct Win32 API for fetching an SSL certificate in winhttp. Would InternetQueryOption(INTERNET_OPTION_SECURITY_CERTIFICATE) not do what you want? There are other problems to be solved though, filtered callbacks and authentication come to mind. This topic has been discussed before and I even wrote a proof of concept patch, all of which can be found in the list archives. -Hans Hi Hans, Actually InternetQueryOption(INTERNET_OPTION_SECURITY_CERTIFICATE{_STRUCT}) don't get the actual certificate, only information about the certificate. The certificate would need to be in a CERT_CONTEXT structure but wininet doesn't provide a way to get that. Unless there's a way to get a handle to the particular certificate store that wininet accesses and then enumerate the certificates to find the desired one, I'll need to write an implementation of WinHttpQueryOption that can actually fetch a certificate and produce the CERT_CONTEXT. I've looked over your past posts a bit, including the patch you had posted to -devel that had mappings between the wininet and winhttp flags. From the start, I can tell that the WINHTTP_OPTION_SECURITY_CERTIFICATE_STRUCT is not equivalent to WINHTTP_OPTION_SERVER_CERT_CONTEXT which will actually fetch a certificate. Wininet has no equivalent to WINHTTP_OPTION_SERVER_CERT_CONTEXT. Based on the information above, do you think its better to architect winhttp from the ground up or to use what we can of wininet, and then add the rest around it? -Zac
Re: shell32: tests/shellord.c[new]: Add tests for SHGetNewLinkInfo[AW]
Zac Brown wrote: Add tests for SHGetNewLinkInfo[AW] Tests pass on Windows 2000, Windows XP and Windows Server 2003. Changes: * Add initial tests for SHGetNewLinkInfo[AW] to shell32/tests/shellord.c * Add shell32/tests/shellord.c * Update shell32/tests/Makefile.in --- dlls/shell32/tests/Makefile.in |1 + dlls/shell32/tests/shellord.c | 379 2 files changed, 380 insertions(+), 0 deletions(-) create mode 100644 dlls/shell32/tests/shellord.c diff --git a/dlls/shell32/tests/Makefile.in b/dlls/shell32/tests/Makefile.in index 088499f..316dd72 100644 --- a/dlls/shell32/tests/Makefile.in +++ b/dlls/shell32/tests/Makefile.in @@ -8,6 +8,7 @@ IMPORTS = uuid shell32 ole32 oleaut32 user32 advapi32 kernel32 CTESTS = \ generated.c \ shelllink.c \ + shellord.c \ shellpath.c \ shfldr_special.c \ shlexec.c \ diff --git a/dlls/shell32/tests/shellord.c b/dlls/shell32/tests/shellord.c new file mode 100644 index 000..f5ae1bd --- /dev/null +++ b/dlls/shell32/tests/shellord.c @@ -0,0 +1,379 @@ +/* + * Unit tests for shellord.c + * + * Copyright 2008 Google (Zac Brown) + * + * 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 + * + */ + +#define COBJMACROS + +#include stdio.h + +#include windows.h +#include shlguid.h +#include shobjidl.h +#include shlobj.h +#include wine/test.h + +#include shell32_test.h + +static BOOL (WINAPI *pSHGetNewLinkInfoA) (LPCSTR pszLinkTo, + LPCSTR pszDir, + LPSTR pszName, + BOOL *pfMustCopy, + UINT uFlags); +static LPITEMIDLIST (WINAPI *pSHSimpleIDListFromPath) (LPCSTR lpszPath); + +typedef struct +{ +UINT flags; +const char* expected_str_1; +const char* expected_str_2; +const char* expected_str_3; +BOOL use_full_path; +BOOL todo_str_check; +BOOL skip_crash; +} getlink_test_t, *lp_getlink_test_t; + + +static const getlink_test_t getlink_tests[] = { +{ +0, +testfile.lnk, +testfile.lnk, +testfile.txt.lnk, +TRUE, +TRUE, +FALSE +}, +{ +SHGNLI_PIDL, +testfile.lnk, +testfile.lnk, +testfile.txt.lnk, +TRUE, +TRUE, +FALSE +}, +{ +SHGNLI_NOUNIQUE, +testfile.lnk, +testfile.lnk, +testfile.txt.lnk, +FALSE, +TRUE, +FALSE +}, +{ +SHGNLI_PREFIXNAME, +Shortcut to testfile.lnk, +Shortcut to testfile.lnk, +Shortcut to testfile.txt.lnk, +TRUE, +TRUE, +TRUE +}, +{ +SHGNLI_NOLNK, +testfile, +testfile.lnk, +testfile.txt (2), +TRUE, +TRUE, +FALSE +}, +{ +SHGNLI_PIDL | SHGNLI_NOUNIQUE, +testfile.lnk, +testfile.lnk, +testfile.txt.lnk, +FALSE, +TRUE, +FALSE +}, +{ +SHGNLI_PIDL | SHGNLI_PREFIXNAME, +Shortcut to testfile.lnk, +Shortcut to testfile.lnk, +Shortcut to testfile.txt.lnk, +TRUE, +TRUE, +TRUE +}, +{ +SHGNLI_PIDL | SHGNLI_NOLNK, +testfile, +testfile.lnk, +testfile.txt (2), +TRUE, +TRUE, +TRUE +}, +{ +SHGNLI_NOUNIQUE | SHGNLI_PREFIXNAME, +Shortcut () to testfile.lnk, +Shortcut () to testfile.lnk, +Shortcut () to testfile.txt.lnk, +FALSE, +TRUE, +FALSE +}, +{ +SHGNLI_NOUNIQUE | SHGNLI_NOLNK, +testfile, +testfile.lnk, +testfile.txt, +FALSE, +TRUE, +FALSE +}, +{ +SHGNLI_PREFIXNAME | SHGNLI_NOLNK, +Shortcut to testfile, +Shortcut to testfile.lnk, +Shortcut to testfile.txt, +TRUE, +TRUE, +TRUE
Re: shell32: shellord.c: Implement SHGetNewLinkInfo[AW]. Fixes Bug 8082.
Zac Brown wrote: Implement SHGetNewLinkInfo[AW]. Fixes Bug 8082 (http://bugs.winehq.org/show_bug.cgi?id=8082) Changes: * Implement SHGetNewLinkInfo[AW] * Update tests --- dlls/shell32/shellord.c | 255 - dlls/shell32/tests/shellord.c | 40 +++ 2 files changed, 269 insertions(+), 26 deletions(-) diff --git a/dlls/shell32/shellord.c b/dlls/shell32/shellord.c index 5d1666b..5b1f824 100644 --- a/dlls/shell32/shellord.c +++ b/dlls/shell32/shellord.c @@ -4,6 +4,7 @@ * * Copyright 1997 Marcus Meissner * 1998 Jürgen Schmied + * 2008 Google (Zac Brown) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -1899,22 +1900,270 @@ BOOL WINAPI SHObjectProperties(HWND hwnd, DWORD dwType, LPCWSTR szObject, LPCWST return TRUE; } +/* + * SHGetNewLinkInfoA [SHELL32.179] + * + * See SHGetNewLinkInfoW + */ BOOL WINAPI SHGetNewLinkInfoA(LPCSTR pszLinkTo, LPCSTR pszDir, LPSTR pszName, BOOL *pfMustCopy, UINT uFlags) { -FIXME(%s, %s, %p, %p, 0x%08x - stub\n, debugstr_a(pszLinkTo), debugstr_a(pszDir), +BOOL ret; +CHAR pathA[MAX_PATH]; +WCHAR pszLinkToW[MAX_PATH]; +WCHAR pszDirW[MAX_PATH]; +WCHAR pszNameW[MAX_PATH]; +LPSTR tmp_ptr; + +TRACE(%s, %s, %p, %p, 0x%08x - stub\n, debugstr_a(pszLinkTo), debugstr_a(pszDir), pszName, pfMustCopy, uFlags); +if (pszLinkTo == NULL || pszName == NULL) +return FALSE; + +if (uFlags SHGNLI_PIDL) +{ +if (SHGetPathFromIDListA (pszLinkTo, pathA) == FALSE) +return FALSE; +tmp_ptr = pathA; +} +else +tmp_ptr = pszLinkTo; + + +if (MultiByteToWideChar(CP_ACP, 0, pszName, -1, pszNameW, MAX_PATH) == 0 || +MultiByteToWideChar(CP_ACP, 0, tmp_ptr, -1, pszLinkToW, MAX_PATH) == 0) +return FALSE; + +if (pszDir != NULL) +{ +if (MultiByteToWideChar(CP_ACP, 0, pszDir, -1, pszDirW, MAX_PATH) == 0) +return FALSE; +ret = SHGetNewLinkInfoW (pszLinkToW, pszDirW, pszNameW, pfMustCopy, uFlags); +} +else +ret = SHGetNewLinkInfoW (pszLinkToW, NULL, pszNameW, pfMustCopy, uFlags); + +if (WideCharToMultiByte(CP_ACP, 0, pszNameW, -1, pszName, MAX_PATH, 0, 0) ret == TRUE) +return ret; + return FALSE; } +/* + * [INTERNAL] + * confirm_link_unique: Check if a supplied shortcut name is unique + * within a directory and if not, generate one + * that is for SHGetNewLinkInfoW. + * + * PARAMS + * directory [I] Directory to check for duplicates in + * filename [I] Name of file that a link is being made to + * flags [I] Flags passed to SHGetNewLinkInfoW + * shortcut_name [I/O] Shortcut name to check for. Could be modified + * if needed. + * name_updated [O] Set to true when the name of the shortcut has + * been updated. + * + * RETURNS + * Success: TRUE - The function successfully completed + * Failure: FALSE - The function was unable to complete its task + */ + +static BOOL confirm_link_unique(LPCWSTR directory, LPCWSTR filename, UINT flags, LPWSTR shortcut_name) +{ +static const WCHAR search_pattern[] = {'\\','*',0}; +static const WCHAR prefix_start[] = {'S','h','o','r','t','c','u','t',' ',0}; +static const WCHAR lnk_extension[] = {'.','l','n','k',0}; +static const WCHAR prefix_format[] = {'S','h','o','r','t','c','u','t',' ','(','%','d',')',' ','t','o',' ','%','s',0}; +static const WCHAR no_prefix_format[] = {'%','s',' ','(','%','d',')',0}; +WCHAR filename_noext[MAX_PATH]; +WCHAR tmp_buf[MAX_PATH]; +WCHAR *tmp_ptr, *tmp_ptr2; +HANDLE h; +WIN32_FIND_DATAW find_data; +long shortcut_num = 1; + +/* Get name of file without the file extension */ +tmp_ptr = strrchrW (filename, '.'); +if (tmp_ptr != NULL) +{ +if (lstrcpynW (filename_noext, filename, (tmp_ptr - filename)*sizeof(WCHAR)) == NULL) +return FALSE; +} +else +lstrcpyW (filename_noext, filename); + +if (directory != NULL) +{ +if (lstrcpyW (tmp_buf, directory) == NULL) +return FALSE; +} +else +{ +if (GetCurrentDirectoryW (MAX_PATH, tmp_buf) == 0) +return FALSE; +} + +if (lstrcatW (tmp_buf, search_pattern) == NULL) +return FALSE; + +h = FindFirstFileW (tmp_buf, find_data); +if (h
Re: winhttp: include/winhttp.h: Add more #define's for options
Zac Brown wrote: Add more #define's for options used in WinHttpOpenRequest, WinHttpSendRequest, and WinHttp{Set/Query}Options. --- include/winhttp.h | 66 + 1 files changed, 66 insertions(+), 0 deletions(-) diff --git a/include/winhttp.h b/include/winhttp.h index ef2caff..e816c82 100644 --- a/include/winhttp.h +++ b/include/winhttp.h @@ -62,6 +62,72 @@ typedef int INTERNET_SCHEME, *LPINTERNET_SCHEME; #define ERROR_WINHTTP_AUTODETECTION_FAILED (WINHTTP_ERROR_BASE + 180) +/* Flags for WinHttp{Set/Query}Options */ +#define WINHTTP_FIRST_OPTION WINHTTP_OPTION_CALLBACK +#define WINHTTP_OPTION_CALLBACK 1 +#define WINHTTP_OPTION_RESOLVE_TIMEOUT2 +#define WINHTTP_OPTION_CONNECT_TIMEOUT3 +#define WINHTTP_OPTION_CONNECT_RETRIES4 +#define WINHTTP_OPTION_SEND_TIMEOUT 5 +#define WINHTTP_OPTION_RECEIVE_TIMEOUT6 +#define WINHTTP_OPTION_RECEIVE_RESPONSE_TIMEOUT 7 +#define WINHTTP_OPTION_HANDLE_TYPE9 +#define WINHTTP_OPTION_READ_BUFFER_SIZE 12 +#define WINHTTP_OPTION_WRITE_BUFFER_SIZE 13 +#define WINHTTP_OPTION_PARENT_HANDLE 21 +#define WINHTTP_OPTION_EXTENDED_ERROR24 +#define WINHTTP_OPTION_SECURITY_FLAGS31 +#define WINHTTP_OPTION_SECURITY_CERTIFICATE_STRUCT 32 +#define WINHTTP_OPTION_URL 34 +#define WINHTTP_OPTION_SECURITY_KEY_BITNESS 36 +#define WINHTTP_OPTION_PROXY 38 +#define WINHTTP_OPTION_USER_AGENT41 +#define WINHTTP_OPTION_CONTEXT_VALUE 45 +#define WINHTTP_OPTION_CLIENT_CERT_CONTEXT 47 +#define WINHTTP_OPTION_REQUEST_PRIORITY 58 +#define WINHTTP_OPTION_HTTP_VERSION 59 +#define WINHTTP_OPTION_DISABLE_FEATURE 63 +#define WINHTTP_OPTION_CODEPAGE 68 +#define WINHTTP_OPTION_MAX_CONNS_PER_SERVER 73 +#define WINHTTP_OPTION_MAX_CONNS_PER_1_0_SERVER 74 +#define WINHTTP_OPTION_AUTOLOGON_POLICY 77 +#define WINHTTP_OPTION_SERVER_CERT_CONTEXT 78 +#define WINHTTP_OPTION_ENABLE_FEATURE79 +#define WINHTTP_OPTION_WORKER_THREAD_COUNT 80 +#define WINHTTP_OPTION_PASSPORT_COBRANDING_TEXT 81 +#define WINHTTP_OPTION_PASSPORT_COBRANDING_URL 82 +#define WINHTTP_OPTION_CONFIGURE_PASSPORT_AUTH 83 +#define WINHTTP_OPTION_SECURE_PROTOCOLS 84 +#define WINHTTP_OPTION_ENABLETRACING 85 +#define WINHTTP_OPTION_PASSPORT_SIGN_OUT 86 +#define WINHTTP_OPTION_PASSPORT_RETURN_URL 87 +#define WINHTTP_OPTION_REDIRECT_POLICY 88 +#define WINHTTP_OPTION_MAX_HTTP_AUTOMATIC_REDIRECTS 89 +#define WINHTTP_OPTION_MAX_HTTP_STATUS_CONTINUE 90 +#define WINHTTP_OPTION_MAX_RESPONSE_HEADER_SIZE 91 +#define WINHTTP_OPTION_MAX_RESPONSE_DRAIN_SIZE 92 +#define WINHTTP_OPTION_CONNECTION_INFO 93 +#define WINHTTP_OPTION_CLIENT_CERT_ISSUER_LIST 94 +#define WINHTTP_OPTION_SPN 96 +#define WINHTTP_OPTION_GLOBAL_PROXY_CREDS97 +#define WINHTTP_OPTION_GLOBAL_SERVER_CREDS 98 +#define WINHTTP_OPTION_UNLOAD_NOTIFY_EVENT 99 +#define WINHTTP_OPTION_REJECT_USERPWD_IN_URL 100 +#define WINHTTP_OPTION_USE_GLOBAL_SERVER_CREDENTIALS 101 +#define WINHTTP_LAST_OPTION WINHTTP_OPTION_USE_GLOBAL_SERVER_CREDENTIALS +#define WINHTTP_OPTION_USERNAME 0x1000 +#define WINHTTP_OPTION_PASSWORD 0x1001 +#define WINHTTP_OPTION_PROXY_USERNAME0x1002 +#define WINHTTP_OPTION_PROXY_PASSWORD0x1003 + +/* Option prettifiers for WinHttpOpenRequest */ +#define WINHTTP_NO_REFERER NULL +#define WINHTTP_DEFAULT_ACCEPT_TYPES NULL + +/* Option prettifiers for WinHttpSendRequest */ +#define WINHTTP_NO_ADDITIONAL_HEADERS NULL +#define WINHTTP_NO_REQUEST_DATA NULL + typedef struct { DWORD dwStructSize; Ignore this, bad comments.
Thoughts on implementation of winhttp.dll
Hi, I've been looking at implementing winhttp.dll. Does anyone have thoughts on implementing parts of winhttp in terms of wininet? The primary issue that prevents entirely implementing winhttp in terms of wininet is that there is no direct Win32 API for fetching an SSL certificate in winhttp. To access these, I'd need access to functions defined in wininet/netconnection.c but aren't exported. My current two ideas are to either: 1) Copy the networking sublayer from wininet into winhttp and build on top of that to implement winhttp. Effectively reimplementing mostly from scratch. 2) Implement most winhttp things in terms of wininet and then copying over parts that I need from wininet's network sublayer, like fetching SSL certificates and so on. Thoughts on this are greatly appreciated, as I'd prefer to only have to write the library once. -Zac
Re: context.c
[EMAIL PROTECTED] wrote: Has anyone looked at the changes put on the list for context.c? Just had not heard anything.. I assume it is because I am new and all but still...just trying to help per the request on the wine site =) chris Get the Moviefone Toolbar http://toolbar.aol.com/moviefone/download.html?ncid=aolcmp000511. Showtimes, theaters, movie news, more! It helps if you link to the patches you submitted in the pipermail listing (http://winehq.org/pipermail/wine-patches). This way everyone can see what particular patch you're talking about. -Zac
Re: [2/2] ntdll: rtlstr.c: Implement checking for control characters in RtlIsTextUnicode [try 7]
Zac Brown wrote: Add checking for control characters in both standard and byte-reversed forms to (Rtl)IsTextUnicode. Changelog: * Add if-statement to ensure we only found control characters in the first 256 indices. If we found them beyond that, we don't care since Windows doesn't either. --- dlls/ntdll/rtlstr.c | 23 +++ dlls/ntdll/tests/rtlstr.c | 21 + 2 files changed, 28 insertions(+), 16 deletions(-) diff --git a/dlls/ntdll/rtlstr.c b/dlls/ntdll/rtlstr.c index deec931..802782f 100644 --- a/dlls/ntdll/rtlstr.c +++ b/dlls/ntdll/rtlstr.c @@ -1591,7 +1591,10 @@ NTSTATUS WINAPI RtlFindCharInUnicodeString( */ BOOLEAN WINAPI RtlIsTextUnicode( LPCVOID buf, INT len, INT *pf ) { +static const WCHAR std_control_chars[] = {'\r','\n','\t',' ',0x3000,0}; +static const WCHAR byterev_control_chars[] = {0x0d00,0x0a00,0x0900,0x2000,0x0030,0}; const WCHAR *s = buf; +WCHAR *tmp_ptr; int i; unsigned int flags = ~0U, out_flags = 0; @@ -1650,6 +1653,26 @@ BOOLEAN WINAPI RtlIsTextUnicode( LPCVOID buf, INT len, INT *pf ) } } +/* These two tests are not mutually exclusive so regardless of whether */ +/* the string has the BOM for byte-reversed order, it still checks */ +/* the string if the flag is set. */ + +/* Check for standard Unicode control characters. */ +if (flags IS_TEXT_UNICODE_CONTROLS) +{ +tmp_ptr = strpbrkW(s, std_control_chars); +if (tmp_ptr != NULL (tmp_ptr - s) len) +out_flags |= IS_TEXT_UNICODE_CONTROLS; +} + +/* Check for byte-reversed Unicode control characters. */ +if (flags IS_TEXT_UNICODE_REVERSE_CONTROLS strpbrkW(s, byterev_control_chars) != NULL) +{ +tmp_ptr = strpbrkW(s, byterev_control_chars); +if (tmp_ptr != NULL (tmp_ptr - s) len) +out_flags |= IS_TEXT_UNICODE_REVERSE_CONTROLS; +} + if (pf) { out_flags = *pf; diff --git a/dlls/ntdll/tests/rtlstr.c b/dlls/ntdll/tests/rtlstr.c index 74ba8ea..d5d8839 100644 --- a/dlls/ntdll/tests/rtlstr.c +++ b/dlls/ntdll/tests/rtlstr.c @@ -1693,7 +1693,6 @@ static void test_RtlIsTextUnicode(void) flags = IS_TEXT_UNICODE_UNICODE_MASK; ok(pRtlIsTextUnicode(unicode, sizeof(unicode), flags), Text should not pass a Unicode\n); -todo_wine ok(flags == (IS_TEXT_UNICODE_STATISTICS | IS_TEXT_UNICODE_CONTROLS), Expected flags 0x6, obtained %x\n, flags); @@ -1712,7 +1711,7 @@ static void test_RtlIsTextUnicode(void) be_unicode[i + 1] = (unicode[i] 8) | ((unicode[i] 0xff) 8); } ok(!pRtlIsTextUnicode(be_unicode, sizeof(unicode) + 2, NULL), Reverse endian should not be Unicode\n); -todo_wine ok(!pRtlIsTextUnicode(be_unicode[1], sizeof(unicode), NULL), Reverse endian should not be Unicode\n); +ok(!pRtlIsTextUnicode(be_unicode[1], sizeof(unicode), NULL), Reverse endian should not be Unicode\n); flags = IS_TEXT_UNICODE_REVERSE_MASK; ok(!pRtlIsTextUnicode(be_unicode[1], sizeof(unicode), flags), Reverse endian should be Unicode\n); @@ -1722,7 +1721,6 @@ static void test_RtlIsTextUnicode(void) flags = IS_TEXT_UNICODE_REVERSE_MASK; ok(!pRtlIsTextUnicode(be_unicode, sizeof(unicode) + 2, flags), Reverse endian should be Unicode\n); -todo_wine ok(flags == (IS_TEXT_UNICODE_REVERSE_CONTROLS | IS_TEXT_UNICODE_REVERSE_SIGNATURE), Expected flags 0xc0, obtained %x\n, flags); @@ -1750,11 +1748,8 @@ static void test_RtlIsTextUnicode(void) ok(flags == 0, Expected flags 0x0, obtained %x\n, flags); flags = IS_TEXT_UNICODE_CONTROLS; -todo_wine -{ -ok(pRtlIsTextUnicode(unicode, sizeof(unicode), flags), Test should pass on Unicode string lacking control characters.\n); -ok(flags == IS_TEXT_UNICODE_CONTROLS, Expected flags 0x04, obtained %x\n, flags); -} +ok(pRtlIsTextUnicode(unicode, sizeof(unicode), flags), Test should pass on Unicode string lacking control characters.\n); +ok(flags == IS_TEXT_UNICODE_CONTROLS, Expected flags 0x04, obtained %x\n, flags); flags = IS_TEXT_UNICODE_CONTROLS; ok(!pRtlIsTextUnicode(be_unicode_no_controls, sizeof(unicode_no_controls) + 2, flags), @@ -1762,11 +1757,8 @@ static void test_RtlIsTextUnicode(void) ok(flags == 0, Expected flags 0x0, obtained %x\n, flags); flags = IS_TEXT_UNICODE_CONTROLS; -todo_wine -{ -ok(pRtlIsTextUnicode(mixed_controls, sizeof(mixed_controls), flags), Test should pass on a string containing control characters.\n); -ok(flags == IS_TEXT_UNICODE_CONTROLS, Expected flags 0x04, obtained %x\n, flags); -} +ok(pRtlIsTextUnicode(mixed_controls, sizeof(mixed_controls), flags), Test should pass on a string
Re: shell32: iconcache.c: Add stub implementation for SHGetIconOverlayIndex[AW]
Zac Brown wrote: Add stub implementation for SHGetIconOverlayIndex[AW]. --Zac scratch this one.
Re: shell32: iconcache.c: Add stub implementation for SHGetIconOverlayIndex[AW] (RESEND)
Zac Brown wrote: Add stub implementation for SHGetIconOverlayIndex[AW]. Mentioned in Bug 7447, though it does not seem to need a full implementation yet. Since its documented in MSDN, may as well add the stub implementation of it. Error in my comments. Scratch it, sending another...
Re: ntdll: reg.c: Fix return value of NtOpenKey when key handle is NULL
Alexandre Julliard wrote: Zac Brown [EMAIL PROTECTED] writes: Could anyone give me some feedback on this patch? Talked to AJ about it pre-1.0 and he seemed to think its fine, maybe he'd chime in and let me know what he thought was wrong with it this time around? ../../../tools/runtest -q -P wine -M advapi32.dll -T ../../.. -p advapi32_test.exe.so registry.c touch registry.ok registry.c:935: Test failed: expected ERROR_INVALID_PARAMETER, got 998 make[2]: *** [registry.ok] Error 1 Ah ok, thanks. Out of my depth then. -Zac
Re: ntdll: rtlstr.c: Implement checking for control characters in RtlIsTextUnicode [try 2]
Dan Kegel wrote: The array doesn't make much sense if you're not going to iterate over it. It might be more readable if you replaced the array and long if with a switch statement. It would be nice to break out of the loop early. The last two suggestions together kind of mean a goto, which is ugly, but not too uncommon in wine. (You might want to verify that the generated code isn't too slow, but since len is limited to 256, that probably doesn't matter.) e.g. if (flags IS_TEXT_UNICODE_CONTROLS) for (i = 0; i len; i++) switch (s[i]) { case '\t': case '\n': case 'r': case 0x20: out_flags |= IS_TEXT_UNICODE_CONTROLS; goto done; default: } } done: I had thought about that before and initially wasn't sure of AJ's feelings on not declaring something that (I thought) might be considered magic values. Now that I realized it needs to be optimized, I'll definitely look into it. -Zac
Re: ntdll: rtlstr.c: Implement checking for control characters in RtlIsTextUnicode [try 2]
John Klehm wrote: On Wed, Jun 18, 2008 at 7:02 PM, Zac Brown [EMAIL PROTECTED] wrote: Implement setting of IS_TEXT_UNICODE_CONTROLS and IS_TEXT_UNICODE_REVERSE_CONTROLS when control characters are present in RtlIsTextUnicode. Just a minor point: AFAIK the rule is to use C style /* comments */ only. --John Klehm Thanks, I hadn't realized I'd done it till you mentioned it. -Zac
Re: ntdll: rtlstr.c: Implement checking for control characters in, RtlIsTextUnicode [try 3]
Zac Brown wrote: Implement setting of IS_TEXT_UNICODE_CONTROLS and IS_TEXT_UNICODE_REVERSE_CONTROLS when control characters are present in RtlIsTextUnicode. -Zac Brown --- dlls/ntdll/rtlstr.c | 57 + dlls/ntdll/tests/rtlstr.c |2 - 2 files changed, 57 insertions(+), 2 deletions(-) diff --git a/dlls/ntdll/rtlstr.c b/dlls/ntdll/rtlstr.c index deec931..ead8974 100644 --- a/dlls/ntdll/rtlstr.c +++ b/dlls/ntdll/rtlstr.c @@ -1591,6 +1591,23 @@ NTSTATUS WINAPI RtlFindCharInUnicodeString( */ BOOLEAN WINAPI RtlIsTextUnicode( LPCVOID buf, INT len, INT *pf ) { +/* + * Enum for possible control characters. + * BR = byte reversed, for use in byte reversed strings. + */ +enum control_chars { +TAB = '\t', +BR_TAB = 0x0900, +CRET = '\r', +BR_CRET = 0x0d00, +NEWLINE = '\n', +BR_NEWLINE = 0x0a00, +SPACE = ' ', +BR_SPACE = 0x2000, +CJKSPACE = 0x3000, +BR_CJKSPACE = 0x0030 +}; + const WCHAR *s = buf; int i; unsigned int flags = ~0U, out_flags = 0; @@ -1650,6 +1667,46 @@ BOOLEAN WINAPI RtlIsTextUnicode( LPCVOID buf, INT len, INT *pf ) } } +/* Check for control characters in string. */ +if (flags IS_TEXT_UNICODE_CONTROLS) +{ +for (i = 0; i len; i++) +{ +switch (s[i]) +{ +case TAB: +case CRET: +case NEWLINE: +case SPACE: +case CJKSPACE: +out_flags |= IS_TEXT_UNICODE_CONTROLS; +break; +default: +continue; +} +} +} + +/* Check for control characters in byte reversed string. */ +if ((flags IS_TEXT_UNICODE_REVERSE_CONTROLS) (out_flags IS_TEXT_UNICODE_REVERSE_SIGNATURE)) +{ +for (i = 0; i len; i++) +{ +switch (s[i]) +{ +case BR_TAB: +case BR_CRET: +case BR_NEWLINE: +case BR_SPACE: +case BR_CJKSPACE: +out_flags |= IS_TEXT_UNICODE_REVERSE_CONTROLS; +break; +default: +continue; +} +} +} + if (pf) { out_flags = *pf; diff --git a/dlls/ntdll/tests/rtlstr.c b/dlls/ntdll/tests/rtlstr.c index aa4a391..5d77f9a 100644 --- a/dlls/ntdll/tests/rtlstr.c +++ b/dlls/ntdll/tests/rtlstr.c @@ -1689,7 +1689,6 @@ static void test_RtlIsTextUnicode(void) flags = IS_TEXT_UNICODE_UNICODE_MASK; ok(pRtlIsTextUnicode(unicode, sizeof(unicode), flags), Text should not pass a Unicode\n); -todo_wine ok(flags == (IS_TEXT_UNICODE_STATISTICS | IS_TEXT_UNICODE_CONTROLS), Expected flags 0x6, obtained %x\n, flags); @@ -1718,7 +1717,6 @@ static void test_RtlIsTextUnicode(void) flags = IS_TEXT_UNICODE_REVERSE_MASK; ok(!pRtlIsTextUnicode(be_unicode, sizeof(unicode) + 2, flags), Reverse endian should be Unicode\n); -todo_wine ok(flags == (IS_TEXT_UNICODE_REVERSE_CONTROLS | IS_TEXT_UNICODE_REVERSE_SIGNATURE), Expected flags 0xc0, obtained %x\n, flags); HeapFree(GetProcessHeap(), 0, be_unicode); One more time... ignore this patch. Will send update later. -Zac
Re: ntdll: rtlstr.c: Implement checking for control characters inRtlIsTextUnicode [try 2]
Rolf Kalbermatter wrote: Dan Kegel [mailto:[EMAIL PROTECTED] e.g. if (flags IS_TEXT_UNICODE_CONTROLS) for (i = 0; i len; i++) switch (s[i]) { case '\t': case '\n': case 'r': case 0x20: out_flags |= IS_TEXT_UNICODE_CONTROLS; goto done; default: } } done: Shouldn't a break instead of the goto work too? Rolf Kalbermatter A break will only exit the switch statement which is pointless since we don't care about the rest of the string if we find a control character. I made that mistake in my third try of the patch, didn't even think about it until Dan mentioned somethign to me. Hopefully the 4th try will actually be decent. -Zac
Re: ntdll: rtlstr.c: Implement checking for control characters in RtlIsTextUnicode [try 4]
Michael Karcher wrote: Am Donnerstag, den 19.06.2008, 12:52 -0700 schrieb Zac Brown: - Because these tests are mutually exclusive, a single goto label suffices for breaking the loop. As written, your tests are not mutually exclusive. It could happen that flags has IS_TEXT_UNICODE_CONTROLS and IS_TEXT_UNICODE_REVERSE_CONTROLS, set and out_flags contains IS_TEXT_UNICODE_REVERSE_SIGNATURE. (If the caller doesn't provide flags, both flags are set, in fact!) In that case, both conditions of your if statements are true. I don't know whether that means that you need two goto targets or that your logic should be changed, but I suspect the latter. If you test for reversed control characters only I a reversed BOM was found, you should not test for non-reversed control characters if a reversed BOM was found, according to my intuition. Regards, Michael Karcher Hmmm this is true. Added a test in the first if statement to do something like: if((flags IS_TEXT_UNICODE_CONTROL) (out_flags IS_TEXT_UNICODE_SIGNATRUE)) causes a wine test to fail. So either I need a goto at the end of the first if statement before the closing brace, or I need to adjust some other things in the code. Any thoughts from anyone on the proper way to approach this ;). I'd like to get this one done before try 10 (haha). -Zac
Re: ntdll: rtlstr.c: Implement checking for control characters in RtlIsTextUnicode [try 4]
Zac Brown wrote: Michael Karcher wrote: Am Donnerstag, den 19.06.2008, 12:52 -0700 schrieb Zac Brown: - Because these tests are mutually exclusive, a single goto label suffices for breaking the loop. As written, your tests are not mutually exclusive. It could happen that flags has IS_TEXT_UNICODE_CONTROLS and IS_TEXT_UNICODE_REVERSE_CONTROLS, set and out_flags contains IS_TEXT_UNICODE_REVERSE_SIGNATURE. (If the caller doesn't provide flags, both flags are set, in fact!) In that case, both conditions of your if statements are true. I don't know whether that means that you need two goto targets or that your logic should be changed, but I suspect the latter. If you test for reversed control characters only I a reversed BOM was found, you should not test for non-reversed control characters if a reversed BOM was found, according to my intuition. Regards, Michael Karcher Hmmm this is true. Added a test in the first if statement to do something like: if((flags IS_TEXT_UNICODE_CONTROL) (out_flags IS_TEXT_UNICODE_SIGNATRUE)) causes a wine test to fail. So either I need a goto at the end of the first if statement before the closing brace, or I need to adjust some other things in the code. Any thoughts from anyone on the proper way to approach this ;). I'd like to get this one done before try 10 (haha). -Zac Actually I guess just make it an if..else..if would work too.
Re: ntdll: rtlstr.c: Implement checking for control characters in RtlIsTextUnicode [try 4]
Michael Karcher wrote: Am Donnerstag, den 19.06.2008, 12:52 -0700 schrieb Zac Brown: - Because these tests are mutually exclusive, a single goto label suffices for breaking the loop. As written, your tests are not mutually exclusive. It could happen that flags has IS_TEXT_UNICODE_CONTROLS and IS_TEXT_UNICODE_REVERSE_CONTROLS, set and out_flags contains IS_TEXT_UNICODE_REVERSE_SIGNATURE. (If the caller doesn't provide flags, both flags are set, in fact!) In that case, both conditions of your if statements are true. I don't know whether that means that you need two goto targets or that your logic should be changed, but I suspect the latter. If you test for reversed control characters only I a reversed BOM was found, you should not test for non-reversed control characters if a reversed BOM was found, according to my intuition. Regards, Michael Karcher After re-reading the documentation, it is unclear as to whether the tests are truly mutually exclusive. I took the mutually exclusive hint from comments in the code actually. Does anyone have feedback on whether they believe the tests for normal control characters vs reversed control characters should be mutually exlusive? To me it makes sense for them to be, but that doesn't necessarily mean they should be... Documentation for those interested: http://msdn.microsoft.com/en-us/library/ms776445.aspx Comments are welcome and *greatly* appreciated. -Zac
Re: ntdll: reg.c: Fix return value of NtOpenKey when key handle is NULL
Zac Brown wrote: Change return value from STATUS_INVALID_PARAMETER to STATUS_ACCESS_VIOLATION when retkey is null in NtOpenKey and remove todo_wine from test. Tested on Windows XP, Windows 2000 and Windows 2003. -Zac Brown Could anyone give me some feedback on this patch? Talked to AJ about it pre-1.0 and he seemed to think its fine, maybe he'd chime in and let me know what he thought was wrong with it this time around? Comments are greatly appreciated. -Zac
Re: ntdll: rtlstr.c: Implement checking for control characters in RtlIsTextUnicode
Zac Brown wrote: Implement setting of IS_TEXT_UNICODE_CONTROLS and IS_TEXT_UNICODE_REVERSE_CONTROLS when control characters are present in RtlIsTextUnicode. --- dlls/ntdll/rtlstr.c | 54 - dlls/ntdll/tests/rtlstr.c |2 - 2 files changed, 53 insertions(+), 3 deletions(-) diff --git a/dlls/ntdll/rtlstr.c b/dlls/ntdll/rtlstr.c index deec931..2191825 100644 --- a/dlls/ntdll/rtlstr.c +++ b/dlls/ntdll/rtlstr.c @@ -1591,8 +1591,26 @@ NTSTATUS WINAPI RtlFindCharInUnicodeString( */ BOOLEAN WINAPI RtlIsTextUnicode( LPCVOID buf, INT len, INT *pf ) { +/* lookup table for Unicode values of control chars */ + static const WCHAR control_chars[] = { + '\t', + '\r', + '\n', + ' ', + 0x3000 // CJK space + }; + +/* lookup table for byte-reversed Unicode values of control chars */ + static const WCHAR reversed_control_chars[] = { + 0x0900, // tab + 0x0d00, // carriage return + 0x0a00, // new line + 0x2000, // space + 0x0030 // CJK space + }; + const WCHAR *s = buf; -int i; +int i, j; unsigned int flags = ~0U, out_flags = 0; if (len sizeof(WCHAR)) @@ -1650,6 +1668,40 @@ BOOLEAN WINAPI RtlIsTextUnicode( LPCVOID buf, INT len, INT *pf ) } } + /* + * Check for unicode control characters, both standard and byte reversed. + * ie: (space, tab, carriage return, line feed, CJK space. + */ + + for (i = 0; i len; i++) + { + if ((flags IS_TEXT_UNICODE_CONTROLS)) + { + if (s[i] == control_chars[0] || + s[i] == control_chars[1] || + s[i] == control_chars[2] || + s[i] == control_chars[3] || + s[i] == control_chars[4]) + { + out_flags |= IS_TEXT_UNICODE_CONTROLS; + break; + } + } + + if ((flags IS_TEXT_UNICODE_REVERSE_CONTROLS) (out_flags IS_TEXT_UNICODE_REVERSE_SIGNATURE)) + { + if (s[i] == reversed_control_chars[0] || + s[i] == reversed_control_chars[1] || + s[i] == reversed_control_chars[2] || + s[i] == reversed_control_chars[3] || + s[i] == reversed_control_chars[4]) + { + out_flags |= IS_TEXT_UNICODE_REVERSE_CONTROLS; + break; + } + } + } + if (pf) { out_flags = *pf; diff --git a/dlls/ntdll/tests/rtlstr.c b/dlls/ntdll/tests/rtlstr.c index aa4a391..5d77f9a 100644 --- a/dlls/ntdll/tests/rtlstr.c +++ b/dlls/ntdll/tests/rtlstr.c @@ -1689,7 +1689,6 @@ static void test_RtlIsTextUnicode(void) flags = IS_TEXT_UNICODE_UNICODE_MASK; ok(pRtlIsTextUnicode(unicode, sizeof(unicode), flags), Text should not pass a Unicode\n); -todo_wine ok(flags == (IS_TEXT_UNICODE_STATISTICS | IS_TEXT_UNICODE_CONTROLS), Expected flags 0x6, obtained %x\n, flags); @@ -1718,7 +1717,6 @@ static void test_RtlIsTextUnicode(void) flags = IS_TEXT_UNICODE_REVERSE_MASK; ok(!pRtlIsTextUnicode(be_unicode, sizeof(unicode) + 2, flags), Reverse endian should be Unicode\n); -todo_wine ok(flags == (IS_TEXT_UNICODE_REVERSE_CONTROLS | IS_TEXT_UNICODE_REVERSE_SIGNATURE), Expected flags 0xc0, obtained %x\n, flags); HeapFree(GetProcessHeap(), 0, be_unicode); Ignore this patch, aside from tabs, it needs something changed. Thanks, Zac
Re: Please have a look at the current Valgrind warnings
Looks good... guess I know what I'll be after tomorrow ;). -Zac Dan Kegel wrote: After a few days of cleaning up Valgrind warnings in the Wine source tree, and adding suppressions where it made sense. I've whittled the list of Valgrind warnings down to 300 or so. This list is short enough that a mortal can look upon it without dispair, and even see a number of things that might be real bugs. The histogram of frequent errors is at http://kegel.com/wine/valgrind/logs-2008-06-08.counts.txt and shows one call stack per line (only top three locations are represented for each call stack). A few groups of warnings stand out: 10 of them are invalid calls to free() or friends, 30 of them involve WideCharToMultiByte, 50 of them are in ds3d or ds3d8, and 60 of them are in Gecko. (Ooodles and oodles are caused by nvidia's libgl, libfontconfig, libexpat, and libc; most of these are suppressed, or you'd die of bordom or anger reading the logs.) As before, the log broken out by directory is at http://kegel.com/wine/valgrind/logs-2008-06-08/ The full log is at http://kegel.com/wine/valgrind/logs-2008-06-08.log.gz This is run with --track-origins=yes, so you get nifty stack tracebacks for where the undefined values got their initial, um, nonvalue. This is often quite helpful for narrowing down the cause. The diff against CVS of the tree I ran this on is at http://kegel.com/wine/valgrind/logs-2008-06-08-patch.txt and is mostly the valgrind cleanup patches I've written that have not yet been committed (plus one rough one from Juan). It's given for completeness; I'll resubmit the individual patches once 1.0 is out. Oh, and the suppressions file I use is rather bigger now. As always, it's at http://kegel.com/wine/valgrind/valgrind-suppressions If you've read this far, congratulations and thanks. Please consider triaging one of these warnings. Just pick one at random, and if you really figure it out, please submit a fix; be sure to include the valgrind warning in the description of the patch. Even if all you figure out is how to improve the test and thereby not generate Valgrind warnings, that's great, please send in your patch. Every test we make squeaky-clean improves the signal-to-noise ratio for finding real problems. (But please don't submit any change you don't really understand, or that seems risky. The goal is not to clean up Valgrind warnings; it's to improve the quality of the test suite.) - Dan
Re: Winetest grrr...
As a thought, did you consider just building the tests you needed via mingw32? I've found John Klehm's script (http://wiki.winehq.org/JohnKlehm at the top) to be useful for that as winetest.exe hard locks my laptop and my desktop... ewww. -Zac Juan Lang wrote: Since my tiny little menu patch didn't go in, I figured Alexandre wanted a test. So I tried to compile and run the existing one on Windows XP. It failed for me: lots of menu size tests failed. I checked the test.winehq.org data, and I don't see lots of failures on XP, so... I thought I'd run winetest.exe from Paul Millar's site, just in case the compilation environment had something to do with it. That locks up my laptop somewhere in the d3d/ddraw tests. I know some video drivers are so broken we don't want to run on them. I have an ATI Radeon Mobility 250. I thought this was a fairly common card. Is locking up the machine really acceptable here? How the ^$*@ am I supposed to produce a test when the existing ones fail/crash/burn for me? Grrr... --Juan
Re: Winetest grrr...
Ah woops, I misread the message. -Zac Juan Lang wrote: As a thought, did you consider just building the tests you needed via mingw32? Well, as I said, I did just build the test I needed, with MSVC. It failed. That's why I tried winetest. --Juan
Re: ntdll: Strengthen current tests and add new tests for asynchronous I/O.
Woops, ignore this patch. Its got a couple things wrong with it. I'll send a fix later on. -Zac Zac Brown wrote: Strengthen current tests and add new tests for asynchronous I/O. Missing test for empty messages as well as thoroughly testing input and output of read/write commands. -Zac Brown From d2a3cbaf6d71c3b0bcfa39afcf854de7e5daa5bb Mon Sep 17 00:00:00 2001 From: Zac Brown [EMAIL PROTECTED] Date: Thu, 29 May 2008 13:34:50 -0700 Subject: [PATCH] Strengthen current tests and add new tests for asynchronous I/O. --- dlls/ntdll/tests/file.c | 103 --- 1 files changed, 79 insertions(+), 24 deletions(-) diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c index d824530..e3cbf77 100644 --- a/dlls/ntdll/tests/file.c +++ b/dlls/ntdll/tests/file.c @@ -2,6 +2,7 @@ * * Copyright 2007 Jeff Latimer * Copyright 2007 Andrey Turkin + * Copyright 2008 Google (Zac Brown) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -65,6 +66,7 @@ static inline BOOL is_signaled( HANDLE obj ) } #define PIPENAME .\\pipe\\ntdll_tests_file.c +#define TEST_BUF_LEN 10 static BOOL create_pipe( HANDLE *read, HANDLE *write, ULONG flags, ULONG size ) { @@ -114,7 +116,10 @@ static BOOL get_msg(HANDLE h) { LARGE_INTEGER timeout = {{-1000*3}}; DWORD res = pNtRemoveIoCompletion( h, completionKey, completionValue, ioSb, timeout); -ok( res == STATUS_SUCCESS, NtRemoveIoCompletion failed: %x\n, res ); +if (res == STATUS_TIMEOUT) +ok( res == STATUS_TIMEOUT, NtRemoveIoCompletion should have timed out, got: %x\n, res ); +else +ok( res == STATUS_SUCCESS, NtRemoveIoCompletion failed: %x\n, res ); if (res != STATUS_SUCCESS) { completionKey = completionValue = 0; @@ -507,6 +512,7 @@ static void test_iocp_fileio(HANDLE h) FILE_COMPLETION_INFORMATION fci = {h, CKEY_SECOND}; HANDLE hPipeSrv, hPipeClt; NTSTATUS res; +BOOL rw_res; hPipeSrv = CreateNamedPipeA( pipe_name, PIPE_ACCESS_INBOUND, PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE | PIPE_WAIT, 4, 1024, 1024, 1000, NULL ); ok( hPipeSrv != INVALID_HANDLE_VALUE, Cannot create named pipe\n ); @@ -533,49 +539,97 @@ static void test_iocp_fileio(HANDLE h) if (hPipeClt != INVALID_HANDLE_VALUE) { OVERLAPPED o = {0,}; -BYTE buf[3]; +BYTE buf_send[TEST_BUF_LEN]; +BYTE buf_rcv[TEST_BUF_LEN]; DWORD read; long count; +unsigned int i; NTSTATUS res = pNtSetInformationFile( hPipeSrv, iosb, fci, sizeof(fci), FileCompletionInformation ); ok( res == STATUS_SUCCESS, NtSetInformationFile failed: %x\n, res ); ok( U(iosb).Status == STATUS_SUCCESS, iosb.Status invalid: %x\n, U(iosb).Status ); -count = get_pending_msgs(h); -ok( !count, Unexpected msg count: %ld\n, count ); -ReadFile( hPipeSrv, buf, 3, read, o); -count = get_pending_msgs(h); -ok( !count, Unexpected msg count: %ld\n, count ); -WriteFile( hPipeClt, buf, 3, read, NULL ); - -if (get_msg(h)) +/* Try messages of differing lengths and values, checking that they match. */ +for( i = 1; i 10; i++ ) { -ok( completionKey == CKEY_SECOND, Invalid completion key: %lx\n, completionKey ); -ok( ioSb.Information == 3, Invalid ioSb.Information: %ld\n, ioSb.Information ); -ok( U(ioSb).Status == STATUS_SUCCESS, Invalid ioSb.Status: %x\n, U(ioSb).Status); -ok( completionValue == (ULONG_PTR)o, Invalid completion value: %lx\n, completionValue ); +memset( buf_send, 0, TEST_BUF_LEN ); +memset( buf_rcv, 0, TEST_BUF_LEN ); +memset( buf_send, i, i ); + +/* Try reading before writing */ +count = get_pending_msgs(h); +ok( !count, Unexpected msg count: %ld\n, count ); +rw_res = ReadFile( hPipeSrv, buf_rcv, i, read, o ); +ok( rw_res == FALSE, Unexpected success of ReadFile\n ); +ok( GetLastError() == ERROR_IO_PENDING, Expected error of ERROR_IO_PENDING, got %d\n, GetLastError() ); +count = get_pending_msgs(h); +ok( !count, Unexpected msg count: %ld\n, count ); +rw_res = WriteFile( hPipeClt, buf_send, i, read, NULL ); +ok( rw_res == TRUE, Unexpected fail of WriteFile\n ); +if (get_msg(h)) +{ +ok( completionKey == CKEY_SECOND, Invalid completion key: %lx\n, completionKey ); +ok( ioSb.Information == i, Invalid ioSb.Information: %ld\n, ioSb.Information ); +ok( U(ioSb).Status
Re: Which is more important to Linux users, itunes or photoshop?
Maarten Lankhorst wrote: Hi Dan, Dan Kegel schreef: Not a real question, but I thought this graph was interesting: http://www.google.com/trends?q=dreamweaver+linux%2C+%22world+of+warcraft%22+linux%2C++itunes+linux%2C+photoshop+linux It seems iTunes on Linux is twice as popular a query as Photoshop on Linux. No idea what that really means, but it does make me want to get our iTunes support shipshape... Then again, this graph shows mplayer beating out itunes (presumably because it works): http://www.google.com/trends?q=dreamweaver+linux%2C+mplayer+linux%2C++itunes+linux%2C+photoshop+linux OK, too much fooling around with graphs. Back to watching Underdog with my four-year-old... This is just looking for search queries, there are probably a lot more variationis of it (such as dreamweavers+ubuntu, etc). I personally think all 3 important: - iTunes because it's such a popular program, and wine should have support for it. - Photoshop and dreamweaver are because there are no professional alternatives for it with a familiar interface. They are 2 groups that have different demands of the os (amusement vs productivity). So I think they are both important in their own way. Cheers, Maarten. I agree with this stand point. Aside from the iTunes store functionality there a few different programs that are excellent replacements for iTunes. People are probably just querying it to figure out how to work with their iPods. Photoshop/Dreamweaver/Illustrator are all definitely big on the professional side. I use Photoshop myself, though I'm sort of weened myself off of it and am getting used to the Gimp. Maybe the new Gimp interface will be more intuitive? Either way both should be focus points but if you put priority one, I feel like Photoshop and friends is probably a little more important to people. -Zac
Re: Anyone know how to produce a win16 pkzip self-extractor?
Dan Kegel wrote: On Dec 24, 2007 10:36 AM, Kevin Koltzau [EMAIL PROTECTED] wrote: I also tried the DOS version, and that just hung (grumble). pkzip 2.5 for dos works fine under dosbox I am sick and tired of us wimping out and pointing people to dosbox. Wine should be able to run DOS apps. See http://bugs.winehq.org/show_bug.cgi?id=9178 for details. Mikolaj even provided a patch that gets it working. IMHO this needs fixing for wine 1.0. - Dan I agree. One way or another it needs to be done.
Re: advapi32: Fix domain length setting in LookupAccountNameW
Zac Brown wrote: Hi, Changelog: * Fix value setting for *cchReferencedDomainName in LookupAccountNameW * Fix LookupAccountNameA conversion from WCHAR to CHAR by setting proper '\0' Notes: * This patch addresses bug 10612 -Zac Brown Ignore this patch, it has stupid mistakes in it. Will send a second one thats correct. -Zac
Re: Wine Weekly News
Zachary Goldberg wrote: I thought about it, but wasn't sure of the usefulness of such a number. If consensus is that it would be worth having, i'll add it for WWN 335. On Dec 10, 2007 3:57 PM, Jonathan Ernst [EMAIL PROTECTED] wrote: Hello, First, thank you for your work on the WWN ! About the new AppDB Application Status Changes, I see that you have a change column. What do you think about adding the sum of this column somewhere so we can see how/if Wine is improving between releases regarding application compatibility (of course this would be just an indication). Best regards. Jonathan I'd like to see that as well. Could be interesting. Cheers, -Zac
Re: shlwapi: Fix memory leak in test
Alistair Leslie-Hughes wrote: Hi, Changelog: shlwapi: Fix memory leak in test. Best Regards Alistair Leslie-Hughes No patch attached? -Zac
Re: Valgrind support for our unit tests
James McKenzie wrote: Dan Kegel wrote: On Dec 8, 2007 9:13 AM, Robert Shearman [EMAIL PROTECTED] wrote: Dan Kegel wrote: + obj:/home/dank/wine-git/dlls/ntdll/ntdll.dll.so I'm not sure this will work for other people unless they log on as dank :-) Whoops! Since I am a Mac user, does valgrind exist for this platform and if so, where can it get/build it? I feel that reports from Mac users would be useful as well as from the Linux community. Thank you. James There is no valgrind port for Mac OS X yet but it looks to me that the likelihood of there being one is pretty good. See this link: http://valgrind.org/info/platforms.html It mentions that Darwin support for x86 will be high, but would that be that helpful in Leopard? If I recall correctly, Leopard is fully 64-bit now. -- Someone correct me if I'm wrong on that. -Zac
Re: wininet: Add test for FtpGetCurrentDirectoryA
James Hawkins wrote: On Nov 30, 2007 3:47 PM, Zac Brown [EMAIL PROTECTED] wrote: Hi, Changelog: * Add a test in dlls/wininet/tests/ftp.c for FtpGetCurrentDirectoryA Notes: * This test passes fully without error on Windows XP, with the test compiled by Visual Studio Express C++ 2008. * The functions this test call are currently broken in wine and I am in the process of fixing them myself. Patch is pasted below: --- dlls/wininet/tests/ftp.c | 84 +- 1 files changed, 83 insertions(+), 1 deletions(-) diff --git a/dlls/wininet/tests/ftp.c b/dlls/wininet/tests/ftp.c index 6d03fb8..f6517b0 100644 --- a/dlls/wininet/tests/ftp.c +++ b/dlls/wininet/tests/ftp.c @@ -691,6 +691,85 @@ static void test_command(HINTERNET hFtp, HINTERNET hConnect) } } +static void test_get_current_dir(HINTERNET hFtp, HINTERNET hConnect) +{ +BOOLbRet; +DWORD dwCurrentDirectory = MAX_PATH; +CHARlpszCurrentDirectory[MAX_PATH]; + +/* change directories to get a more interesting pwd */ +bRet = FtpCommandA(hFtp, FALSE, FTP_TRANSFER_TYPE_ASCII, CWD pub/, 0, NULL); +if(bRet == FALSE) +{ +trace(Failed to change directories in test_get_current_dir(HINTERNET hFtp).\n); +return; +} + +/* test with all NULL arguments */ +SetLastError(0xdeadbeef); +bRet = FtpGetCurrentDirectoryA( NULL, NULL, 0 ); +ok ( bRet == FALSE, Expected FtpGetCurrentDirectoryA to fail\n ); +ok ( GetLastError() == ERROR_INVALID_HANDLE, Expected ERROR_INVALID_HANDLE, got: %d\n, GetLastError()); + +/* test with NULL parameters instead of expected LPSTR/LPDWORD */ +SetLastError(0xdeadbeef); +bRet = FtpGetCurrentDirectoryA( hFtp, NULL, 0 ); +ok ( bRet == FALSE, Expected FtpGetCurrentDirectoryA to fail\n ); +ok ( GetLastError() == ERROR_INVALID_PARAMETER, Expected ERROR_INVALID_PARAMETER, got: %d\n, GetLastError()); + +/* test with no valid handle and valid parameters */ +SetLastError(0xdeadbeef); +bRet = FtpGetCurrentDirectoryA( NULL, lpszCurrentDirectory, dwCurrentDirectory ); +ok ( bRet == FALSE, Expected FtpGetCurrentDirectoryA to fail\n ); +ok ( GetLastError() == ERROR_INVALID_HANDLE, Expected ERROR_INVALID_HANDLE, got: %d\n, GetLastError()); + +/* test with invalid dwCurrentDirectory and all other parameters correct */ +SetLastError(0xdeadbeef); +bRet = FtpGetCurrentDirectoryA( hFtp, lpszCurrentDirectory, 0 ); +ok ( bRet == FALSE, Expected FtpGetCurrentDirectoryA to fail\n ); +ok ( GetLastError() == ERROR_INVALID_PARAMETER, Expected ERROR_INVALID_PARAMETER, got: %d\n, GetLastError()); + +/* test with invalid lpszCurrentDirectory and all other parameters correct */ +SetLastError(0xdeadbeef); +bRet = FtpGetCurrentDirectoryA( hFtp, NULL, dwCurrentDirectory ); +ok ( bRet == FALSE, Expected FtpGetCurrentDirectoryA to fail\n ); +ok ( GetLastError() == ERROR_INSUFFICIENT_BUFFER, Expected ERROR_INSUFFICIENT_BUFFER, got: %d\n, GetLastError()); + +/* test to show it checks the handle type */ +SetLastError(0xdeadbeef); +bRet = FtpGetCurrentDirectoryA( hConnect, lpszCurrentDirectory, dwCurrentDirectory ); +ok ( bRet == FALSE, Expected FtpGetCurrentDirectoryA to fail\n ); +ok ( GetLastError() == ERROR_INTERNET_INCORRECT_HANDLE_TYPE, +Expected ERROR_INTERNET_INCORRECT_HANDLE_TYPE, got: %d\n, GetLastError()); + +/* test for the current directory with legitimate values */ +SetLastError(0xdeadbeef); +bRet = FtpGetCurrentDirectoryA( hFtp, lpszCurrentDirectory, dwCurrentDirectory ); +ok ( bRet == TRUE, Expected FtpGetCurrentDirectoryA to pass\n ); +ok ( lstrcmp(lpszCurrentDirectory, /pub) == 0, Expected returned value \%s\ to match \%s\ \n, (char*)lpszCurrentDirectory, /pub); +ok ( GetLastError() == ERROR_SUCCESS, Expected ERROR_SUCCESS, got: %d\n, GetLastError()); + + +/* test for the current directory with a size only large enough to + * fit the string and not the null terminating character */ +SetLastError(0xdeadbeef); +dwCurrentDirectory = 4; +lpszCurrentDirectory[4] = 'a'; /* set position 4 of the array to something else to make sure a leftover \0 isn't fooling the test */ +bRet = FtpGetCurrentDirectoryA( hFtp, lpszCurrentDirectory, dwCurrentDirectory ); +ok ( bRet == FALSE, Expected FtpGetCurrentDirectoryA to fail\n); +ok ( lstrcmp(lpszCurrentDirectory, /pub) != 0, Expected returned value \%s\ to not match \%s\ \n, (char*)lpszCurrentDirectory, /pub); +ok ( GetLastError() == ERROR_INSUFFICIENT_BUFFER, Expected ERROR_INSUFFICIENT_BUFFER, got: %d\n, GetLastError()); + +/* test for the current directory with a size large enough to store + * the expected string as well as the null terminating character */ +SetLastError(0xdeadbeef); +dwCurrentDirectory
Re: [Bug 10488] GIT of 16.11 Exeption becaus of VBA while analysing a text
[EMAIL PROTECTED] wrote: http://bugs.winehq.org/show_bug.cgi?id=10488 --- Comment #14 from Yolande Haneder [EMAIL PROTECTED] 2007-11-25 00:30:20 --- Re: err:ole:StdMarshalImpl_ReleaseMarshalData could not map object ID to stub manager, oxid=370038, oid=d err:ole:CoReleaseMarshalData IMarshal::ReleaseMarshalData failed with error 0x8001011d Which I have been told to be a memory conflict in C and err:ole:apartment_getclassobject DllGetClassObject returned error 0x80040111 Could someone tell me which file in Wine is concerned so that someone my look at it? Thank you Looks like dlls/ole32/marshal.c by the dump. I believe Dan Kegel had reported a bug for Wine 1.0 based on the dlls/ole32/tests/marshal.c in which it failed. The relevant bug is as follows: http://bugs.winehq.com/show_bug.cgi?id=10076 -Zac
Re: [Bug 10488] GIT of 16.11 Exeption becaus of VBA while analysing a text
Zac Brown wrote: [EMAIL PROTECTED] wrote: http://bugs.winehq.org/show_bug.cgi?id=10488 --- Comment #14 from Yolande Haneder [EMAIL PROTECTED] 2007-11-25 00:30:20 --- Re: err:ole:StdMarshalImpl_ReleaseMarshalData could not map object ID to stub manager, oxid=370038, oid=d err:ole:CoReleaseMarshalData IMarshal::ReleaseMarshalData failed with error 0x8001011d Which I have been told to be a memory conflict in C and err:ole:apartment_getclassobject DllGetClassObject returned error 0x80040111 Could someone tell me which file in Wine is concerned so that someone my look at it? Thank you Looks like dlls/ole32/marshal.c by the dump. I believe Dan Kegel had reported a bug for Wine 1.0 based on the dlls/ole32/tests/marshal.c in which it failed. The relevant bug is as follows: http://bugs.winehq.com/show_bug.cgi?id=10076 -Zac As a side note, I was unable to reproduce the bug in 10076 both on a Feisty install and Gutsy install of Ubuntu. -Zac
Disregard earlier ntdll/tests/env.c patches
Hi, Please disregard any patches prior to the latest patch. It seems my mail server has been a little messed up. The only one to consider is the latest one that the wine-patches list has received. Thank you, Zac Brown -- Zac Brown (817-266-6867) [EMAIL PROTECTED] http://zacbrown.org