lopez1de
10-07-2008, 10:04 AM
Hi,
I'm lost in C code again. I think this is really easy to answer, but after hours of testing I can't get it running.
I tried to read tags from mp3's with the free bass mod "TAGS". You will find the dll and the source here: http://www.un4seen.com/filez/3/tags.zip
I declared the following:
#define TAGS_VERSION 14;
#declare TAGS_Read "tags.dll" TAGS_Read 2 1;
#declare TAGS_GetVersion "tags.dll" TAGS_GetVersion 0 1;
#declare TAGS_GetLastErrorDesc "tags.dll" TAGS_GetLastErrorDesc 0 1;
All three functions are returning a LONG value.
TAGS_GetVersion - returns version (14)
TAGS_Read - returns the pointer to a string which is holding the returned tags
TAGS_GetLastErrorDesc - returns a pointer to the error message string
If I try to get a tag (song title) I get a pointer back.
BASS_Init( - 1, 44100, NULL, 0, NULL);
s2$ = BASS_StreamCreateFile(false, file$, 0, 0, NULL);
BASS_ChannelSetAttributes(s2$, -1, 90, -1);
BASS_ChannelPlay(s2$, true);
tags$ = TAGS_Read(s2$, "%TITL");
But I'm not able to convert tags$ to a readable string. My question is: How I'm able to get the string vom the returned pointer.
I tried to use
ShowMessage(@tags$);
and
ShowMessage(char(tags$));
but I only got exceptions.
Is someone able to help me out?
thanks in advance (again) ;)
I'm lost in C code again. I think this is really easy to answer, but after hours of testing I can't get it running.
I tried to read tags from mp3's with the free bass mod "TAGS". You will find the dll and the source here: http://www.un4seen.com/filez/3/tags.zip
I declared the following:
#define TAGS_VERSION 14;
#declare TAGS_Read "tags.dll" TAGS_Read 2 1;
#declare TAGS_GetVersion "tags.dll" TAGS_GetVersion 0 1;
#declare TAGS_GetLastErrorDesc "tags.dll" TAGS_GetLastErrorDesc 0 1;
All three functions are returning a LONG value.
TAGS_GetVersion - returns version (14)
TAGS_Read - returns the pointer to a string which is holding the returned tags
TAGS_GetLastErrorDesc - returns a pointer to the error message string
If I try to get a tag (song title) I get a pointer back.
BASS_Init( - 1, 44100, NULL, 0, NULL);
s2$ = BASS_StreamCreateFile(false, file$, 0, 0, NULL);
BASS_ChannelSetAttributes(s2$, -1, 90, -1);
BASS_ChannelPlay(s2$, true);
tags$ = TAGS_Read(s2$, "%TITL");
But I'm not able to convert tags$ to a readable string. My question is: How I'm able to get the string vom the returned pointer.
I tried to use
ShowMessage(@tags$);
and
ShowMessage(char(tags$));
but I only got exceptions.
Is someone able to help me out?
thanks in advance (again) ;)