Windblossom
Mar 3rd, 2007, 02:42 PM
Hi, I'm currently converting some code from C#.NET to VB.NET
I'm having a problem with converting this code:
private const string mmdll = "winmm.dll";
[DllImport(mmdll)]
public static extern int waveOutGetNumDevs();
[DllImport(mmdll)]
public static extern int waveOutPrepareHeader(IntPtr hWaveOut, ref WaveHdr lpWaveOutHdr, int uSize);
This got converted to VB.NET:
Private Const mmdll As String = "winmm.dll"
<DllImport(mmdll)>
Public Shared Function waveOutGetNumDevs() As Integer
End Function
<DllImport(mmdll)>
Public Shared Function waveOutPrepareHeader(ByVal hWaveOut As IntPtr, ByRef lpWaveOutHdr As WaveHdr, ByVal uSize As Integer) As Integer
End Function
But I get an error on <DllImport(mmdll)>:
"Attribute Specifier is not a complete statement. Use a line continuation to apply the attribute to the following statement"
Please advice
I'm having a problem with converting this code:
private const string mmdll = "winmm.dll";
[DllImport(mmdll)]
public static extern int waveOutGetNumDevs();
[DllImport(mmdll)]
public static extern int waveOutPrepareHeader(IntPtr hWaveOut, ref WaveHdr lpWaveOutHdr, int uSize);
This got converted to VB.NET:
Private Const mmdll As String = "winmm.dll"
<DllImport(mmdll)>
Public Shared Function waveOutGetNumDevs() As Integer
End Function
<DllImport(mmdll)>
Public Shared Function waveOutPrepareHeader(ByVal hWaveOut As IntPtr, ByRef lpWaveOutHdr As WaveHdr, ByVal uSize As Integer) As Integer
End Function
But I get an error on <DllImport(mmdll)>:
"Attribute Specifier is not a complete statement. Use a line continuation to apply the attribute to the following statement"
Please advice