Hi list.
A friend of mine and myself, have been exploring expanding a (currently, 32bit only) winelib app to support 64bit plugins in wine (64). The app is called FSThost, which is used to host win32 VST instruments and effects (.dll) as a standalone app in Gnu/linux. Webpage: http://sourceforge.net/projects/fsthost/
We currently have a example/test app in the source code, which compile as test64.exe / test.exe.so ... you then use the exeutable 'foo'. ~ in this case 'foo' could be /path/to/your/64bitVSTplugin. Currently, the code fails to load the 64bit dll. We are not sure exactly why it is failing, but suspect a couple of reasons. this is where we at at;
1) LoadLibrary - OK
2) GetProcAddress (get address of VSTPluginMain function from DLL library) - OK
3) Initialize plugin - i.e. call VSTPluginMain function from library - FAIL.
Potential reasons:
- Vestige mismatch
- Wine GetProcAddress on 64 bit platform
My friend thought someone more familiar with Wine / WinAPI could take a look on this 64bit DLL and at least confirm that address returned by GetProcAddress is correct. (or give us good tips and/or adive). Since, i am already subbed (to wine-devel), i thought i would see if any one was interested in having a look and/or giving us some pointers, tips, etc.
Here's an example (with WINEDEBUG="+relay'), full ouput: http://pastebin.com/5b5srr2a
A little snippet:
0042:Call ntdll.RtlEncodePointer(002c4620) ret=18002d9aa
0042:Ret ntdll.RtlEncodePointer() retval=c90b263e5a54eb02 ret=18002d9aa
0042:Ret PE DLL (proc=0x18002f27c,module=0x180000000 L"Automaton.dll",reason=PROCESS_ATTACH,res=(nil)) retval=1
0042:Ret KERNEL32.LoadLibraryA() retval=180000000 ret=7f77bb394167
0042:Call KERNEL32.GetProcAddress(180000000,7f77bb3950b0 "VSTPluginMain") ret=7f77bb394182
0042:Ret KERNEL32.GetProcAddress() retval=180012900 ret=7f77bb394182
Revive plugin: Automaton
0042:Call KERNEL32.UnhandledExceptionFilter(0023e7f0) ret=7f77bbf1fc1a
wine: Unhandled page fault on read access to 0x0000022f at address 0x22f (thread 0042), starting debugger...
fixme:dbghelp:elf_search_auxv can't find symbol in module
fixme:dbghelp:elf_search_auxv can't find symbol in module
fixme:dbghelp:elf_search_auxv can't find symbol in module
(goto pastebin for the rest / just scroll to bottom of page)
If you want to take a look and/or test the code yourself (you need latest code): svn checkout svn://svn.code.sf.net/p/fsthost/code/trunk fsthost-code
the source tree is small (like 2 seconds to download). Makefile64 is used to compile the test app (test.c). (just use 'make -f makefile64' from /src dir). alternatively, on sourceforge you can view the test64 app / source code online / here; http://sourceforge.net/p/fsthost/code/154/
(there are several commits following this one, but i believe this one is the most relevant.
then to run it (from source dircetory); './test64.exe /path/to/64bitVSTplugin
You can get a 'tester' 64bit VST (.dll) to load into test64.exe from here: http://kunz.corrupt.ch/products/tal-elek7ro
anyway, any of your insights, help, tips, comments, etc would be both appreciated and helpful.
thanks.
Jordan