[Mono-list] SWF question
Mark Gimelfarb
mark@dawebber.com
Wed, 12 Nov 2003 11:43:00 -0600
Hello all!
I have been compiling several example programs from the Wine sample page on the
Mono Wiki under WinXP XP1 w/ Mono 0.28 dist. One of the examples, CheckBox,
fails to run, although it compiles nicely. A blank window comes up widgets get
initialized and then it quits. The error in the console window states:
<snip>
** (swf-checkbox.exe:3068): WARNING **: Failed to load function wine_get_unix_fi
le_name from kernel32.dll
</snip>
while looking at
mcs/class/System.Windows.Forms/System.Windows.Forms/win32functions.cs,
I've noticed that when _get_unix_file_name() gets called, it checks to see
whether it's running under Unix by testing for the file separator for the
target platform. This piece of code seems to do "the right thing", and I know
that there is a better way to do it (there is a FIXME comment above it), but I
think that this boolean is to blame for the reaason that wine_get_unix_file_name
() get called at all under Windows, when it shouldn't. I also don't understand,
why a checkbox would want to call such function even under Linux, but looking
at CheckBox.cs, I think that it gets called during Control Style inits or
winControlProcMask calls by one of the lower-lever Win32 API functions. I would
love to be able to debug this issue and make a patch, but unfortunately, I have
not been able to either get the mono debugger working under Windoze, nor
compile SWF libraries under VS.NET for debugging.
Further on, in ctor for the Win32 class the following code exists:
<snip>
[DllImport ("libwinnt.dll.so", EntryPoint="PROCESS_InitWine")]
extern static void PROCESS_InitWine (int argc, string [] args);
[DllImport ("libwinnt.dll.so", EntryPoint="LoadLibraryA")]
extern static void NTDLL_LoadLibraryA (string s);
</snip>
Such declarations will of course, fail under windows and produce warnings on
the console.
I would love to hear whether I'm totally wrong, or whether this makes any
sense. If it does, and I can help fix this, I would love to be able to help.
Regards,
Mark.