[Mono-list] Re: unicode wrapper

Serge serge@wildwestsoftware.com
Sun, 7 Apr 2002 04:23:36 +0300


> Why can't you just link the non-recompiled
> mono with unicows.lib and have the original
> CreateFileW resolve through unicows.dll?

I don't know, really :-)

> What happens when you link directly?

Nothing. It does not.
I tried to do so, but ld just ignores symbols exported from the library.
With MS link it works by placing unicows.lib before any other libraries in
list, so symbols from unicows override corresponding symbols from say
kernel32.
Note that in this case you cannot use dll for linkage, you must use library
file, because it contains some code that is linked statically, and performs
delay loading of DLL.
Wrapper is not the best solution, since it adds some overhead and wastes
memory, so if someone will investigate the issue that would be great.

> Is the thread2 failure because of your call to DisableThreadLibraryCalls

No, it is not. That's just to ensure that dll entry code won't be invoked
for each thread. Notice that we don't have any initialization code (not even
process-level) so we don't need these calls.
Actual failure happens in Monitor::Pulse ->
(icall)Monitor_test_synchronized:
object->synchronisation->tid is 0.


Sergey