Re: user32: Add GetListBoxInfo

2012-01-09 Thread Nikolay Sivov

On 1/9/2012 01:28, Louis Lenders wrote:

This should fix http://bugs.winehq.org/show_bug.cgi?id=27385

(See also Remarks on 
http://msdn.microsoft.com/en-us/library/windows/desktop/bb775208%28v=vs.85%29.aspx
 : This message is equivalent to GetListBoxInfo.



+DWORD WINAPI GetListBoxInfo(HWND hwnd)
+{
+TRACE((%p)\n, hwnd);
+return SendMessageW( hwnd, LB_GETLISTBOXINFO, 0, 0);
+}
+

Please add a test showing that it really sends a message.




Re: [PATCH 1/6] ieframe: Added support for SID_SHTMLWindow in WebBrowser::QueryService

2012-01-09 Thread Marvin
Hi,

While running your changed tests on Windows, I think I found new failures.
Being a bot and all I'm not very good at pattern recognition, so I might be
wrong, but could you please double-check?
Full results can be found at
http://testbot.winehq.org/JobDetails.pl?Key=16341

Your paranoid android.


=== WNT4WSSP6 (32 bit webbrowser) ===
webbrowser.c:3093: Test failed: Creating WebBrowser object failed: 80040154
webbrowser.c:3093: Test failed: Creating WebBrowser object failed: 80040154
webbrowser.c:3093: Test failed: Creating WebBrowser object failed: 80040154
webbrowser.c:3093: Test failed: Creating WebBrowser object failed: 80040154
webbrowser.c:3170: Test failed: Creating WebBrowser object failed: 80040154

=== W2KPROSP4 (32 bit webbrowser) ===
webbrowser.c:2473: Test failed: expected GetOverridesKeyPath
webbrowser.c:2477: Test failed: expected Invoke_SETSECURELOCKICON
webbrowser.c:2478: Test failed: expected Invoke_FILEDOWNLOAD
webbrowser.c:2087: Test failed: put_Resizable failed: 80004001
webbrowser.c:2088: Test failed: expected Invoke_WINDOWSETRESIZABLE
webbrowser.c:2092: Test failed: put_Resizable failed: 80004001
webbrowser.c:2093: Test failed: expected Invoke_WINDOWSETRESIZABLE
webbrowser.c:2473: Test failed: expected GetOverridesKeyPath
webbrowser.c:2477: Test failed: expected Invoke_SETSECURELOCKICON
webbrowser.c:2478: Test failed: expected Invoke_FILEDOWNLOAD
webbrowser.c:405: Test failed: unexpected call Exec_SETDOWNLOADSTATE_0
webbrowser.c:2087: Test failed: put_Resizable failed: 80004001
webbrowser.c:2088: Test failed: expected Invoke_WINDOWSETRESIZABLE
webbrowser.c:2092: Test failed: put_Resizable failed: 80004001
webbrowser.c:2093: Test failed: expected Invoke_WINDOWSETRESIZABLE
webbrowser.c:2473: Test failed: expected GetOverridesKeyPath
webbrowser.c:2477: Test failed: expected Invoke_SETSECURELOCKICON
webbrowser.c:2478: Test failed: expected Invoke_FILEDOWNLOAD
webbrowser.c:461: Test failed: unexpected nCmdID 29
webbrowser.c:959: Test failed: unexpected call GetContainer
webbrowser.c:509: Test failed: unexpected call
webbrowser.c:959: Test failed: unexpected call GetContainer
webbrowser.c:509: Test failed: unexpected call
webbrowser.c:2630: Test failed: expected Invoke_SETSECURELOCKICON
webbrowser.c:2754: Test failed: expected TranslateUrl
webbrowser.c:2755: Test failed: expected Invoke_BEFORENAVIGATE2
webbrowser.c:2756: Test failed: expected Invoke_PROPERTYCHANGE
webbrowser.c:2762: Test failed: ReadyState = 1, expected 4
webbrowser.c:2582: Test failed: ReadyState = 1, expected 4
webbrowser.c:791: Test failed: unexpected call Invoke_PROPERTYCHANGE
webbrowser.c:807: Test failed: unexpected call Invoke_BEFORENAVIGATE2
webbrowser.c:814: Test failed: ReadyState = 1, expected 4
webbrowser.c:606: Test failed: unexpected call Invoke_AMBIENT_USERMODE
webbrowser.c:606: Test failed: unexpected call Invoke_AMBIENT_USERMODE
webbrowser.c:609: Test failed: unexpected call Invoke_AMBIENT_DLCONTROL
webbrowser.c:613: Test failed: unexpected call Invoke_AMBIENT_USERAGENT
webbrowser.c:617: Test failed: unexpected call Invoke_AMBIENT_PALETTE
webbrowser.c:1509: Test failed: unexpected call GetOptionKeyPath
webbrowser.c:354: Test failed: unexpected call QueryStatus_SETPROGRESSTEXT
webbrowser.c:791: Test failed: unexpected call Invoke_PROPERTYCHANGE
webbrowser.c:791: Test failed: unexpected call Invoke_PROPERTYCHANGE
webbrowser.c:791: Test failed: unexpected call Invoke_PROPERTYCHANGE
webbrowser.c:791: Test failed: unexpected call Invoke_PROPERTYCHANGE
webbrowser.c:461: Test failed: unexpected nCmdID 26
webbrowser.c:461: Test failed: unexpected nCmdID 29
webbrowser.c:959: Test failed: unexpected call GetContainer
webbrowser.c:509: Test failed: unexpected call
webbrowser.c:892: Test failed: ReadyState = 1, expected 4
webbrowser.c:1520: Test failed: unexpected call GetDropTarget
webbrowser.c:959: Test failed: unexpected call GetContainer
webbrowser.c:509: Test failed: unexpected call
webbrowser.c:2630: Test failed: expected Invoke_SETSECURELOCKICON
webbrowser.c:3129: Test failed: doc != doc2
webbrowser.c:606: Test failed: unexpected call Invoke_AMBIENT_USERMODE
webbrowser.c:606: Test failed: unexpected call Invoke_AMBIENT_USERMODE
webbrowser.c:609: Test failed: unexpected call Invoke_AMBIENT_DLCONTROL
webbrowser.c:613: Test failed: unexpected call Invoke_AMBIENT_USERAGENT
webbrowser.c:617: Test failed: unexpected call Invoke_AMBIENT_PALETTE
webbrowser.c:1509: Test failed: unexpected call GetOptionKeyPath
webbrowser.c:354: Test failed: unexpected call QueryStatus_SETPROGRESSTEXT
webbrowser.c:461: Test failed: unexpected nCmdID 26
webbrowser.c:461: Test failed: unexpected nCmdID 29
webbrowser.c:959: Test failed: unexpected call GetContainer
webbrowser.c:509: Test failed: unexpected call
webbrowser.c:1520: Test failed: unexpected call GetDropTarget
webbrowser.c:959: Test failed: unexpected call GetContainer
webbrowser.c:509: Test failed: unexpected call
webbrowser.c:2623: Test failed: expected TranslateUrl

Re: [PATCH] programs/explorer: Fix explorer's command line parsing (try 2)

2012-01-09 Thread Vitaliy Margolen

On 01/08/2012 08:45 PM, Jay Yang wrote:

Fixed some small formatting issues from last time.



Your patch strips spaces all over the place. For example:
+LPWSTR *argv;
+if(commandline[0]=='\0')
Need an empty line after variable declarations.
No space after if. No space around equal operator.

+for(i=0;iargc;i++)
No spaces after semi-colon.

+copy_path_string(parameters-root,curr);
No space after coma.

Some other issues - you will parse over parameters given to the program. Ex:
explorer /desktop=foo,800x600 program.exe /n /e

Parsing inside parameters is incorrect:
+LPWSTR end=strchrW(curr,',');
+LPWSTR next;
+if(end==NULL)
+next=(end=strchrW(curr,'\0'));
+else
+next=end+1;
...
+curr=next;

You end up parsing something like this as a valid param:
/n,/e,/select,c:\\

Vitaliy.




Re: [PATCH] programs/explorer: Fix explorer's command line parsing (try 2)

2012-01-09 Thread Jay Yang
On 01/09/2012 09:46 AM, Vitaliy Margolen wrote:
 On 01/08/2012 08:45 PM, Jay Yang wrote:
 Fixed some small formatting issues from last time.


 Your patch strips spaces all over the place. For example:
 +LPWSTR *argv;
 +if(commandline[0]=='\0')
 Need an empty line after variable declarations.
 No space after if. No space around equal operator.

 +for(i=0;iargc;i++)
 No spaces after semi-colon.

 +copy_path_string(parameters-root,curr);
 No space after coma.

I'll fix these

 Some other issues - you will parse over parameters given to the program. Ex:
 explorer /desktop=foo,800x600 program.exe /n /e


the /desktop command causes a the parsing to go back to the original command 
line and reparse it.
I can add a comment for this. So in this particular case, manage_desktop is 
called with
=foo,800x600 program.exe /n /e, which should be correct

 Parsing inside parameters is incorrect:
 +LPWSTR end=strchrW(curr,',');
 +LPWSTR next;
 +if(end==NULL)
 +next=(end=strchrW(curr,'\0'));
 +else
 +next=end+1;
 ...
 +curr=next;

 You end up parsing something like this as a valid param:
 /n,/e,/select,c:\\
Windows accepts this. If one types explorer /n,/e,/select,c:\ into the windows 
command line, it
opens My Computer with the c:\ drive selected. Incidentally this is not quite 
what wine does because
copy_path_root only tries to strip the last part of the path and the wine 
explorer currently doesn't
actually select anything, even with the select parameter. Should I fix this in 
this patch or another
patch?




Rethinking WineConf

2012-01-09 Thread Jeremy White
Hi All,

This past Wine conference, while great fun as always, was not as well
attended as Wine conferences in the past.

So I would like to stir up trouble by suggesting we rethink WineConf.

For those that have not attended, the Wine conference has been a mostly
annual affair since 2002.  It is open to all, but is advertised as being
aimed at Wine developers.  About 35 people attend each year.  It's been
in Minnesota about every 3rd year, and is otherwise 'normally' somewhere
in Europe.

I see the primary goal as creating human bonds between otherwise
anonymous people (aka going to the pub).  It's a bonus if it also spurs
resolution to tricky issues, or motivates people to get more done.

So I'd like to ask folks to brain storm with me.

How could Wineconf be different?  If you've never been, what would
encourage you to come?

If you've been to a technical conference recently that you thought was
well done, what did they do well?  Anything we could emulate?

Any other ideas, or suggestions?

Cheers,

Jeremy




Re: [6/6] d3drm: Implement GetParent

2012-01-09 Thread André Hentschel
Am 08.01.2012 20:02, schrieb Nikolay Sivov:
 On 1/8/2012 20:47, André Hentschel wrote:
 ---
   dlls/d3drm/frame.c   |   11 +++
   dlls/d3drm/tests/d3drm.c |   16 
   2 files changed, 15 insertions(+), 12 deletions(-)

 diff --git a/dlls/d3drm/frame.c b/dlls/d3drm/frame.c
 index 212f7dd..b72700c 100644
 --- a/dlls/d3drm/frame.c
 +++ b/dlls/d3drm/frame.c
 @@ -33,6 +33,7 @@ typedef struct {
   IDirect3DRMFrame2 IDirect3DRMFrame2_iface;
   IDirect3DRMFrame3 IDirect3DRMFrame3_iface;
   LONG ref;
 +LPVOID parent;
   } IDirect3DRMFrameImpl;
 Parent is store as another frame interface pointer, right? Why void* here?

Didn't read that at first time. I wanted to access parent as LPDIRECT3DRMFRAME, 
LPDIRECT3DRMFRAME2 and maybe LPDIRECT3DRMFRAME3


-- 

Best Regards, André Hentschel




Re: [6/6] d3drm: Implement GetParent

2012-01-09 Thread Nikolay Sivov

On 1/9/2012 23:42, André Hentschel wrote:

Am 08.01.2012 20:02, schrieb Nikolay Sivov:

On 1/8/2012 20:47, André Hentschel wrote:

---
   dlls/d3drm/frame.c   |   11 +++
   dlls/d3drm/tests/d3drm.c |   16 
   2 files changed, 15 insertions(+), 12 deletions(-)

diff --git a/dlls/d3drm/frame.c b/dlls/d3drm/frame.c
index 212f7dd..b72700c 100644
--- a/dlls/d3drm/frame.c
+++ b/dlls/d3drm/frame.c
@@ -33,6 +33,7 @@ typedef struct {
   IDirect3DRMFrame2 IDirect3DRMFrame2_iface;
   IDirect3DRMFrame3 IDirect3DRMFrame3_iface;
   LONG ref;
+LPVOID parent;
   } IDirect3DRMFrameImpl;

Parent is store as another frame interface pointer, right? Why void* here?

Didn't read that at first time. I wanted to access parent as LPDIRECT3DRMFRAME, 
LPDIRECT3DRMFRAME2 and maybe LPDIRECT3DRMFRAME3
You mean access IDirect3DRMFrameImpl through that pointer? It's better 
to avoid that if possible, I mean a preferred way is to use interface 
methods when interface pointer is supplied by a caller instead of 
relying on internal implementation. It's not always possible of course, 
but still.






Re: [6/6] d3drm: Implement GetParent

2012-01-09 Thread Michael Stefaniuc
On 01/09/2012 09:42 PM, André Hentschel wrote:
 Am 08.01.2012 20:02, schrieb Nikolay Sivov:
 On 1/8/2012 20:47, André Hentschel wrote:
 ---
   dlls/d3drm/frame.c   |   11 +++
   dlls/d3drm/tests/d3drm.c |   16 
   2 files changed, 15 insertions(+), 12 deletions(-)

 diff --git a/dlls/d3drm/frame.c b/dlls/d3drm/frame.c
 index 212f7dd..b72700c 100644
 --- a/dlls/d3drm/frame.c
 +++ b/dlls/d3drm/frame.c
 @@ -33,6 +33,7 @@ typedef struct {
   IDirect3DRMFrame2 IDirect3DRMFrame2_iface;
   IDirect3DRMFrame3 IDirect3DRMFrame3_iface;
   LONG ref;
 +LPVOID parent;
   } IDirect3DRMFrameImpl;
 Parent is store as another frame interface pointer, right? Why void* here?
 
 Didn't read that at first time. I wanted to access parent as 
 LPDIRECT3DRMFRAME, LPDIRECT3DRMFRAME2 and maybe LPDIRECT3DRMFRAME3
Store the object in the parent pointer and then you can easily return a
pointer to all interfaces implemented by the parent in a type safe manner:
IDirect3DRMFrameImpl *parent;

bye
michael





Re: [6/6] d3drm: Implement GetParent

2012-01-09 Thread André Hentschel
Am 09.01.2012 22:33, schrieb Michael Stefaniuc:
 On 01/09/2012 09:42 PM, André Hentschel wrote:
 Am 08.01.2012 20:02, schrieb Nikolay Sivov:
 On 1/8/2012 20:47, André Hentschel wrote:
 ---
   dlls/d3drm/frame.c   |   11 +++
   dlls/d3drm/tests/d3drm.c |   16 
   2 files changed, 15 insertions(+), 12 deletions(-)

 diff --git a/dlls/d3drm/frame.c b/dlls/d3drm/frame.c
 index 212f7dd..b72700c 100644
 --- a/dlls/d3drm/frame.c
 +++ b/dlls/d3drm/frame.c
 @@ -33,6 +33,7 @@ typedef struct {
   IDirect3DRMFrame2 IDirect3DRMFrame2_iface;
   IDirect3DRMFrame3 IDirect3DRMFrame3_iface;
   LONG ref;
 +LPVOID parent;
   } IDirect3DRMFrameImpl;
 Parent is store as another frame interface pointer, right? Why void* here?

 Didn't read that at first time. I wanted to access parent as 
 LPDIRECT3DRMFRAME, LPDIRECT3DRMFRAME2 and maybe LPDIRECT3DRMFRAME3
 Store the object in the parent pointer and then you can easily return a
 pointer to all interfaces implemented by the parent in a type safe manner:
 IDirect3DRMFrameImpl *parent;
 
 bye
   michael
 

good idea, thx

-- 

Best Regards, André Hentschel




Re: [1/5] dinput: Added DI_SETTINGSNOTSAVED flag

2012-01-09 Thread Francois Gouget
On Mon, 9 Jan 2012, Lucas Fialho Zawacki wrote:

 From: Lucas Fialho Zawacki lfzawa...@gmail.com
 
 ---
  include/dinput.h |1 +
  1 files changed, 1 insertions(+), 0 deletions(-)
 
 diff --git a/include/dinput.h b/include/dinput.h
 index 353ec55..cf99ecc 100644
 --- a/include/dinput.h
 +++ b/include/dinput.h
 @@ -134,6 +134,7 @@ DECL_WINELIB_TYPE_AW(LPDIRECTINPUTDEVICE8)
  #define DI_DOWNLOADSKIPPED  ((HRESULT)0x0003)
  #define DI_EFFECTRESTARTED  ((HRESULT)0x0004)
  #define DI_TRUNCATED((HRESULT)0x0008)
 +#define DI_SETTINGSNOTSAVED ((HRESULT)0x000BL)
  #define DI_TRUNCATEDANDRESTARTED((HRESULT)0x000C)

I'm not sure the 'L' modifier is needed or makes sense (although the 
PSDK does have it). In anycase there's clearly an inconsistency in the 
above patch and we normally avoid the 'L' modifier nowadays, see for 
instance __MSABI_LONG() in include/ddeml.h.


-- 
Francois Gouget fgou...@free.fr  http://fgouget.free.fr/
  Good judgment comes from experience, and experience comes from bad judgment
   -- Barry LePatner




UTF-7

2012-01-09 Thread Alex Henrie
Hello,

I have been thinking about implementing UTF-7 support in
MultiByteToWideChar and WideCharToMultiByte. The guts of the code that
needs to be added have already been posted to bug 27388. What more
needs to be done? Should a libs/wine/utf7.c file be created for the
new functions, similar to libs/wine/utf8.c?

-Alex




Re: [2/5] dinput: SetActionMap saving simple configurations to an .ini file (try 2)

2012-01-09 Thread Vitaliy Margolen

On 01/09/2012 10:18 AM, Lucas Fialho Zawacki wrote:

From: Lucas Fialho Zawackilfzawa...@gmail.com

+static BOOL _write_private_profile_intW(const char *format, WCHAR* section, 
WCHAR* key, int value, WCHAR* file)

I don't think this is such a good idea to mix ASCII and WCHAR parameters.


+static WCHAR path[] = {
+
'%','C','o','m','m','o','n','P','r','o','g','r','a','m','F','i','l','e','s','%','\\',
+'D','i','r','e','c','t','X','\\',
+'D','i','r','e','c','t','I','n','p','u','t','\\',
+'U','s','e','r',' ','M','a','p','s','\0'};

Why do you think it should be there in the first place?


+expanded_path = HeapAlloc(GetProcessHeap(), 0, 
sizeof(WCHAR)*expanded_path_size);

No error checking.


+static HRESULT _save_mapping_settings(IDirectInputDevice8W *iface, 
LPDIACTIONFORMATW lpdiaf, LPCWSTR lpszUsername)
+{
+static WCHAR mapexists[] = {'M','a','p','E','x','i','s','t','s','\0'};
+static WCHAR numactions[] = {'N','u','m','A','c','t','i','o','n','\0'};

Should be static const WCHAR.


+IDirectInputDevice8_GetDeviceInfo(iface,didev);

No error checking.


+va_start(args, format);
+while (1)
+{
+buffer = HeapAlloc(GetProcessHeap(), 0, size);
+if (buffer == NULL)
+break;
+n = vsnprintfW(buffer, size, formatW, args);
+if (n == -1)
+size *= 2;
+else if (n= size)
+size = n + 1;
+else
+break;
+HeapFree(GetProcessHeap(), 0, buffer);
+}
+va_end(args);
You can't do this. It seems to be you have not tested it with initial buffer 
too small. You have to do va_start  va_end every time you pass args to 
another function.



+
+if (buffer == NULL) return NULL;
+ret = HeapReAlloc(GetProcessHeap(), 0, buffer, 
sizeof(WCHAR)*(strlenW(buffer)+1) );
+if (ret == NULL) ret = buffer;

Why reallocate? It's pointless.


+extern WCHAR* _get_mapping_path(const WCHAR *device, const WCHAR *username) 
DECLSPEC_HIDDEN;

Would you please drop leading underscore from all of your function names?

Vitaliy.




Re: [3/5] dinput: SetActionMap setting username

2012-01-09 Thread Vitaliy Margolen

On 01/09/2012 10:18 AM, Lucas Fialho Zawacki wrote:

From: Lucas Fialho Zawackilfzawa...@gmail.com

+/* Set username in device */
+HeapFree(GetProcessHeap(), 0, This-username);
+This-username = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR) * 
(lstrlenW(username) + 1));
+lstrcpyW(This-username, username);

No error checking if allocation fails.


+
+/* Free username */
+HeapFree(GetProcessHeap(), 0, This-username);
+

Comment is kind of redundant the property already called username.

Vitaliy.




Re: [4/5] dinput: Device username being assigned at creation time (try 2)

2012-01-09 Thread Vitaliy Margolen

On 01/09/2012 10:18 AM, Lucas Fialho Zawacki wrote:

From: Lucas Fialho Zawackilfzawa...@gmail.com


You leaking FindFile handle. Need to use FindClose() to close it.
This is on top of more unchecked returns from HappAlloc.

Vitaliy.




Re: [PATCH] programs/explorer: Fix explorer's command line parsing (try 2)

2012-01-09 Thread Vitaliy Margolen

On 01/09/2012 08:34 AM, Jay Yang wrote:

On 01/09/2012 09:46 AM, Vitaliy Margolen wrote:

On 01/08/2012 08:45 PM, Jay Yang wrote:



Some other issues - you will parse over parameters given to the program. Ex:
explorer /desktop=foo,800x600 program.exe /n /e



the /desktop command causes a the parsing to go back to the original command 
line and reparse it.
I can add a comment for this. So in this particular case, manage_desktop is 
called with
=foo,800x600 program.exe /n /e, which should be correct
That's the wrong way to do it. The /desktop string can be anywhere in the 
command line. And you not accounting for any sort of quotes.



You end up parsing something like this as a valid param:
/n,/e,/select,c:\\

Windows accepts this. If one types explorer /n,/e,/select,c:\ into the windows 
command line, it
opens My Computer with the c:\ drive selected. Incidentally this is not quite 
what wine does because
Interesting, Windows has it worse then I thought (what a surprise). Yeah 
that appears to work on native.



copy_path_root only tries to strip the last part of the path and the wine 
explorer currently doesn't
actually select anything, even with the select parameter. Should I fix this in 
this patch or another
patch?

Yes separate patch please.

Vitaliy




Re: Rethinking WineConf

2012-01-09 Thread Shachar Shemesh
On 01/09/2012 08:31 PM, Jeremy White wrote:
 Hi All,


 If you've been to a technical conference recently that you thought was
 well done, what did they do well?  Anything we could emulate?
I've gave you some of this feedback in person at WineConf in France.

First, as long as it is aimed at Wine hackers, that's who'll show up.
The stagnation in attendance is, therefor, more an indication of the
state of wine hackers than it is of the conference. What I'd suggest:

1. Split the days. First day aimed at hackers, second day at users. Have
a better defined schedule for that second day, so people would have an
idea what to expect.
2. For the hacker's day, I expected the free form to take on the form
of small working groups. For example, in France, I expected to have some
time where Aric and I could sit on a laptop together and actually hack
BiDi into a better working state. The conference didn't leave enough
room for such an activity.
3. Have the schedule and location ride another conference (similar to
the co-op we did with Samba in Germany). Either that, or schedule the
conference at a place that has a strong local LUG. The conference at
Germany had a great attendance, not only of Samba hackers, but also of
local Linux enthusiasts who took the opportunity to attend. Having a
non-Minnesota US conference might help, where there is an established
LUG that will be interested to tag along.
 Any other ideas, or suggestions?

On a practical note, I suggested to help organize a conference in
Jerusalem. I had a specific location in mind, which is extremely close
(easy walking distances) to the pubs and restaurants of the center of
the city, and it's a combination of hotel and youth hostel, so prices
can be expected to be cheap(er, at least in off-season). Israel at
large, and Jerusalem in particular, have established LUGs that will
probably contribute a lot of fresh eyeballs. Let me know if you want me
to find out more.

Shachar

-- 
Shachar Shemesh
Lingnu Open Source Consulting Ltd.
http://www.lingnu.com