support code for HANDLE tables
mike at codeweavers.com
Fri Jul 9 10:56:15 CDT 2004
There are two client side handle table implementations in Wine that you
might be interested in. One is in wininet.dll (dlls/wininet/internet.c)
and the other is in msi.dll (dlls/msi/handle.c).
They are pretty small, but the major flaw is that although the handle
tables themselves are thread safe, the handles are not.
Wine uses pointers as handles in a number of cases that cause trouble
(eg. directory handles), but I'm not sure that having common code for
all handles would be easy or desirable.
The code in rsabase is called by code in advapi32.dll, which also uses
the same method of casting pointers to make handles. Since Windows
programs will almost never call to rsabase directly, if you want to fix
handles, it's probably better to fix the advapi32 handle code first.
I think, however, that it's probably more important to have an
implementation of rsabase that does the cryptography correctly before
fixing the handles problem. The handles can be fixed when we find an
application that depends upon crypto handles working like real handles.
Michael Jung wrote:
> I'm currently playing around with the rsabase.dll implementation. Since this
> is the first time I'm writing wine code, I've got some questions: Is there
> support code for managing HANDLE tables? Or does every dll implementation
> provide it's own functions for doing this? Or do HANDLEs of each and every
> kind have to be administered by wineserver? The current CVS version of
> rsabase just casts between pointers and HCRYPTPROVs. Is this just a quick and
> dirty hack or common practice?
> Greetings and thanks,
More information about the wine-devel