Hi,
I try to get info from a dll file.
According to .h file:
/* BASS_VST_GetParamCount() returns the number of editable parameters for
* the VST plugin. If the plugin has no editable parameters, 0 is returned.
*/
BASS_VSTSCOPE int BASS_VSTDEF(BASS_VST_GetParamCount)
(DWORD vstHandle);
I can get that by (I got vstHandle earlier):
Declare Function BASS_VST_GetParamCount Lib "bass_vst.dll" (vstHandle As Integer) as Integer
System.DebugLog ("BASS_VST_GetParamCount: " + BASS_VST_GetParamCount(vstHandle).tostring) //it's 5
Now I want the sructure, according to .h file:
/* Get some common information about an editable parameter to a
* BASS_VST_PARAMINFO structure.
*
* paramIndex must be smaller than BASS_VST_GetParamCount().
*/
typedef struct
{
char name[16]; /* examples: Time, Gain, RoomType */
char unit[16]; /* examples: sec, dB, type */
char display[16]; /* the current value in a readable format, examples: 0.5, -3, PLATE */
float defaultValue; /* the default value - this is the value used by the VST plugin just after creation */
} BASS_VST_PARAM_INFO;
BASS_VSTSCOPE BOOL BASS_VSTDEF(BASS_VST_GetParamInfo)
(DWORD vstHandle, int paramIndex, BASS_VST_PARAM_INFO* ret);
I made a ‘param info’ struceture:
Then:
Declare Function BASS_VST_GetParamInfo Lib "bass_vst.dll" (vstHandle As Integer, paramIndex As Integer, BASS_VST_PARAM_INFO As param_info) As param_info
Dim x as param_info
x = BASS_VST_GetParamInfo(vstHandle, 0, x)
System.DebugLog ("param_info name: " + x.name)
No error but I not get any data. What is wrong?
Also, I saw another method somewhere declare the function as ptr but I can’t follow that.
As always I’m looking for the simplest solution