[Mono-dev] Please Miguel de Icaza or other help-me MonoBasic+FMOD

Kornél Pál kornelpal at gmail.com
Tue Apr 17 19:05:41 EDT 2007


VB.NET compiler uses VBByRefStr when you use Declare and String. You should
either use DllImportAttribute instead of Declare or you can override
VBByRefStr by a MarshalAsAttribute.

To the top of you code:
Imports System.Runtime.InteropServices

In place of your existing declarations:
Public Declare Function FMOD_System_CreateStreamEx Lib "fmodex" Alias _
"FMOD_System_CreateStream" (ByVal FmodSystem As Integer, _
<MarshalAs(UnmanagedType.LPStr)> ByVal Name_or_data As String, ByVal Mode _
As FMOD_MODE, ByVal exinfo As Integer, ByRef Sound As Integer) As _
FMOD_RESULT

Public Declare Function FMOD_System_CreateSoundEx Lib "fmodex" Alias _
"FMOD_System_CreateSound" (ByVal FmodSystem As Integer, _
<MarshalAs(UnmanagedType.LPStr)> ByVal Name_or_data As String, ByVal Mode _
As FMOD_MODE, ByVal exinfo As Integer, ByRef Sound As Integer) As _
FMOD_RESULT

This will make you code work with Mono on Windows. But note that you code 
will not be platform independent (so you still will be unable to run it on 
Linux) because it uses a DLL that requires Windows.

Kornél

----- Original Message ----- 
From: "LB Audio Uchoa NET" <lbaudio at uchoanet.com.br>
To: "Miguel de Icaza" <miguel at novell.com>
Cc: <mono-devel-list at lists.ximian.com>
Sent: Wednesday, April 18, 2007 12:43 AM
Subject: Re: [Mono-dev] Please Miguel de Icaza or other help-me
MonoBasic+FMOD


> And as I can do?
> Can you feel an example?
>
> Lindomar
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list




More information about the Mono-devel-list mailing list