Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows x64 support #10

Open
martindevans opened this issue Sep 30, 2015 · 4 comments
Open

Windows x64 support #10

martindevans opened this issue Sep 30, 2015 · 4 comments

Comments

@martindevans
Copy link
Owner

Currently the DLL loader on windows does not load the 64 bit dependencies when loaded into a 64 bit process.

This code always throws when the process is compiled as x64:

var ptr = LoadLibrary(path);
if (ptr == IntPtr.Zero)
    throw new DllNotFoundException(string.Format("Failed to load DLL '{0}'. See https://github.com/martindevans/SupersonicSound#installation-instructions", path));

Even when it is being pointed at 64 bit DLLs. Loader has been modified to throw a NotImplementedException when loaded in a 64 bit process until this is resolved.

@martindevans
Copy link
Owner Author

This is probably because the "WIN64" symbol which the primitive FMOD C# wrapper depends upon is never defined!

@christopherpross
Copy link

Hello,
I read a blog article, where the author discribe the problem, maybe it can help here?
https://mysteriousspace.com/2015/05/31/fmod-in-c-its-a-pain-to-set-up-heres-how-i-did-it/

It would be very nice, if I can use your wrapper also in 64 bit windows...

@galead
Copy link

galead commented Apr 18, 2019

ConsoleTest project runs perfectly and plays sounds under x64 if you make few minor changes:

  1. Copy fmod64.dll and fmodstudio64.dll to the "Dependencies\x86_64" folder. I just modified CopyFromFModInstall.bat and used it.
  2. Added WIN64 symbol to SupersonicSound project settings.
  3. I set it up in the PlatformTarget project settings: AnyCPU, unchecked "Prefer 32-bit".
  4. Commented out the line
    //throw new NotImplementedException("Loading DLLs for x64 not
    in Native.cs file.

@martindevans
Copy link
Owner Author

Nice! Would you like to make a Pull Request with these changes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants