How can i display a byte as a string?
example:
struct BASS_PLUGINFORM
{
UNSIGNED INT ctype; // channel type
Byte *name; // format description
Byte *exts; // file extension filter (*.ext1;*.ext2;etc...)
}
struct BASS_PLUGININFO
{
UNSIGNED INT version; // version (same form as BASS_GetVersion)
UNSIGNED INT formatc; // number of formats
BASS_PLUGINFORM formats; // the array of formats
}
BASS_PLUGININFO *info = BASS_PluginGetInfo(plugin);
int a;
for (a=0; a<info->formatc; a++)
{ // display the array of formats...
messagebox(this,info->formats[a].*exts,"test");
}
UNSIGNED INT ctype; // channel type
String *name; // format description
String *exts; // file extension filter (*.ext1;*.ext2;etc...)
Would be the easier way. A pointer is always the same size, its only how you use it that would be different. You could also use type casting.
messagebox(this,info->formats[a].*(string)exts,"test");
Paul.
thanx Paul,
i had already tryed that but not this way, so it was crashing at the start of the loop
now it return the 2 plugins infos but crash after ;)
Technically you should check for NULL as well, since they are pointers.
if( info && info->formats[a].exts)
messagebox(this,info->formats[a].*exts,"test");
I don't see where 'info' is defined and am questionable about how they are storing the array. But start with that.
thats what i was thinking but its seems checking for null doesnt resolve it .. into investigating further.