On Mon, Apr 8, 2013 at 3:53 PM, Hugh McMaster < hugh.mcmaster@masterindexing.com> wrote:
This file recreates most, if not all, of the source found in dlls/advapi32/registry.c in dlls/kernel32. It provides registry functionality.
Tested on Linux Mint 14 and Mac OS X 10.8 (Mountain Lion).
dlls/kernel32/advapi32_registry.c | 2928 +++++++++++++++++++++++++++++++++++++ 1 file changed, 2928 insertions(+) create mode 100644 dlls/kernel32/advapi32_registry.c
Why do you need this? (not to mention that you can't just duplicate it like that)
From: Nikolay Sivov [mailto:bunglehead@gmail.com] Sent: Monday, 8 April 2013 11:08 PM To: wine-devel; Hugh McMaster Subject: Re: [3/13] wineconsole and kernel32: set GetLargestConsoleWindowSize based on screen resolution
On Mon, Apr 8, 2013 at 3:53 PM, Hugh McMaster hugh.mcmaster@masterindexing.com wrote: This file recreates most, if not all, of the source found in dlls/advapi32/registry.c in dlls/kernel32. It provides registry functionality.
Why do you need this?
If I remember correctly, there were several function dependencies for the registry implementation I worked on. I'm not sure of the exact number, but will work this out.
What should I do then, though? Should I isolate the functions I need into a separate file? Or should the dlls/advapi32/registry.c be linked into the dlls/kernel32/Makefile.in?
(not to mention that you can't just duplicate it like that)
I'm not sure what you mean. The source remains correctly attributed as in the original.
On Mon, Apr 8, 2013 at 4:47 PM, Hugh McMaster < hugh.mcmaster@masterindexing.com> wrote:
From: Nikolay Sivov [mailto:bunglehead@gmail.com] Sent: Monday, 8 April 2013 11:08 PM To: wine-devel; Hugh McMaster Subject: Re: [3/13] wineconsole and kernel32: set GetLargestConsoleWindowSize based on screen resolution
On Mon, Apr 8, 2013 at 3:53 PM, Hugh McMaster <
hugh.mcmaster@masterindexing.com> wrote:
This file recreates most, if not all, of the source found in
dlls/advapi32/registry.c in dlls/kernel32. It provides registry functionality.
Why do you need this?
If I remember correctly, there were several function dependencies for the registry implementation I worked on. I'm not sure of the exact number, but will work this out.
What should I do then, though? Should I isolate the functions I need into a separate file? Or should the dlls/advapi32/registry.c be linked into the dlls/kernel32/Makefile.in?
If you need to access registry from kernel32 you'll need to use ntdll calls directly.
(not to mention that you can't just duplicate it like that)
I'm not sure what you mean. The source remains correctly attributed as in the original.
This functionality belongs to advapi32. Do you really need anything more than ntdll calls provide?
Le 08/04/2013 16:03, Nikolay Sivov a écrit :
On Mon, Apr 8, 2013 at 4:47 PM, Hugh McMaster <hugh.mcmaster@masterindexing.com mailto:hugh.mcmaster@masterindexing.com> wrote:
From: Nikolay Sivov [mailto:bunglehead@gmail.com <mailto:bunglehead@gmail.com>] Sent: Monday, 8 April 2013 11:08 PM To: wine-devel; Hugh McMaster Subject: Re: [3/13] wineconsole and kernel32: set GetLargestConsoleWindowSize based on screen resolution >On Mon, Apr 8, 2013 at 3:53 PM, Hugh McMaster <hugh.mcmaster@masterindexing.com <mailto:hugh.mcmaster@masterindexing.com>> wrote: >This file recreates most, if not all, of the source found in dlls/advapi32/registry.c in dlls/kernel32. It provides registry functionality. >>Why do you need this? If I remember correctly, there were several function dependencies for the registry implementation I worked on. I'm not sure of the exact number, but will work this out. What should I do then, though? Should I isolate the functions I need into a separate file? Or should the dlls/advapi32/registry.c be linked into the dlls/kernel32/Makefile.in?
If you need to access registry from kernel32 you'll need to use ntdll calls directly.
>>(not to mention that you can't just duplicate it like that) I'm not sure what you mean. The source remains correctly attributed as in the original.
This functionality belongs to advapi32. Do you really need anything more than ntdll calls provide?
and on top of that, using registry as a way to exchange information between wineconsole and kernel is not the right thing to do the correct way is to: - enhance the wine server protocol to grab max win size in kernel32 from wine server - enhance wineconsole to set the max wine size into wine server (and to recompute it when there's a screen resize event)
A+
Eric Pouech wrote:
Le 08/04/2013 16:03, Nikolay Sivov a écrit :
If you need to access registry from kernel32 you'll need to use ntdll calls directly. This functionality belongs to advapi32. Do you really need anything more than ntdll calls provide?
and on top of that, using registry as a way to exchange information between wineconsole and kernel is not the right thing to do the correct way is to:
- enhance the wine server protocol to grab max win size in kernel32 from wine server
- enhance wineconsole to set the max wine size into wine server (and to recompute it when there's a screen resize event)
Now I'm starting to understand why very few people have attempted to fix this issue.
There was an attempt to make such a patch a long time ago. I might have a look at that and see how it goes.
Eric Pouech wrote:
Le 08/04/2013 16:03, Nikolay Sivov a écrit :
If you need to access registry from kernel32 you'll need to use ntdll calls directly. This functionality belongs to advapi32. Do you really need anything more than ntdll calls provide?
and on top of that, using registry as a way to exchange information between wineconsole and kernel is not the right thing to do the correct way is to:
- enhance the wine server protocol to grab max win size in kernel32
from wine server
- enhance wineconsole to set the max wine size into wine server (and to
recompute it when there's a screen resize event)
This is just the beginning, but do you mean something along the lines of this code?
SERVER_START_REQ( get_desktop_workarea ) { if(!wine_server_call_err( req )) { int screen_width = reply->workarea.right; int screen_height = reply->workarea.bottom; } } SERVER_END_REQ;
Eric Pouech wrote:
to exchange information between wineconsole and kernel is not the right thing to do the correct way is to:
- enhance the wine server protocol to grab max win size in kernel32
from wine server
I've been able to achieve this.
/*********************************************************************** * GetLargestConsoleWindowSize_helper */ COORD GetLargestConsoleWindowSize_helper(HANDLE hConsoleOutput) { int screen_width = 0, screen_height = 0; COORD fontsize, max_console;
SERVER_START_REQ( get_desktop_workarea ) { if(!wine_server_call_err( req )) { screen_width = reply->screen_x; screen_height = reply->screen_y; } } SERVER_END_REQ;
fontsize = GetConsoleFontSize(hConsoleOutput, 0);
max_console.X = (screen_width / fontsize.X) - 6; max_console.Y = (screen_height / fontsize.Y) - 5;
if (max_console.X < 0 || max_console.Y < 0) { max_console.X = 80; max_console.Y = 25; } return max_console; }
- enhance wineconsole to set the max wine size into wine server
I'm not really sure how to do this. I thought this code might work in programs/wineconsole/wineconsole.c:
RECT workarea; /* Send desktop workarea to server */ SystemParametersInfoA(SPI_GETWORKAREA, 0, &workarea, 0);
SERVER_START_REQ( get_desktop_workarea ) { if(!wine_server_call_err( req )) { req->spi_workarea = workarea; } } SERVER_END_REQ;
Unfortunately, while Wine compiles perfectly with the other changes to the server (see attached files), no proper values are returned (only zero). By setting hardcoded constants in server/window.c, I have tested GetLargestConsoleWindowSize, where all functions work as expected.
Any advice on sending data to the server would be appreciated.
From: Nikolay Sivov Sent: Tuesday, 9 April 2013 12:03 AM To: Hugh McMaster; wine-devel Subject: Re: [3/13] wineconsole and kernel32: set GetLargestConsoleWindowSize based on screen resolution
If you need to access registry from kernel32 you'll need to use ntdll calls directly. Do you really need anything more than ntdll calls provide?
Actually, no. It looks like ntdll is able to do everything I need.
From: Nikolay Sivov [mailto:bunglehead@gmail.com] Sent: Monday, 8 April 2013 11:08 PM To: wine-devel; Hugh McMaster Subject: Re: [3/13] wineconsole and kernel32: set GetLargestConsoleWindowSize based on screen resolution
On Mon, Apr 8, 2013 at 3:53 PM, Hugh McMaster hugh.mcmaster@masterindexing.com wrote: This file recreates most, if not all, of the source found in dlls/advapi32/registry.c in dlls/kernel32. It provides registry functionality.
Why do you need this? (not to mention that you can't just duplicate it like that)
Actually, let me check on this. It doesn't make sense that there would be wineconsole dependencies for a completely separate DLL.