Hi Guys
I am trying to stream mp3s from internet using FMOD 3.75 engine, for NeoPlayer I recently submitted at VBforum.
http://www.vbforums.com/showthread.php?t=642683
Fmod sends information about streaming data through call back function as as shown (C++ Decalaration)

FSOUND_METADATACALLBACK
Callback to receive a new piece of metadata from an internet stream
signed char F_CALLBACKAPI FSOUND_METADATACALLBACK(
char *name,
char *value,
void *userdata
);
Parameters
name Pointer to the name of the piece of metadata (null-terminated ASCII string)
value Pointer to the metadata (null-terminated ASCII string)
userdata Userdata that was specified in FSOUND_Stream_Net_SetMetadataCallback
Return ValueCurrently ignored


CPP Code for callback function
Code:
signed char F_CALLBACKAPI metacallback(char *name, char *value, void *userdata)
{
    if (!strcmp("ARTIST", name))
    {
        strcpy(artist, value);
        return TRUE;
    }

    if (!strcmp("TITLE", name))
    {
        strcpy(title, value);
        metanum++;
        return TRUE;
    }

    return TRUE;
}
//EVERYTHING WORKS FINE IN CPP (no error ever occurred)

My VB Code
1 Code:
  1. Private Declare Function ConvCStringToVBString Lib "kernel32" Alias "lstrcpyA" (ByVal lpsz As String, ByVal pt As Long) As Long  
  2.  
  3. Public Function GetStringFromPointer(ByVal lpString As Long) As String
  4.       Dim NullCharPos As Long
  5.       Dim szBuffer As String
  6.       szBuffer = String(255, 0)
  7.       ‘ I have tried increasing size of buffer even then it crashes sometimes
  8.       ConvCStringToVBString szBuffer, lpString
  9.       ' Look for the null char ending the C string
  10.       NullCharPos = InStr(szBuffer, vbNullChar)
  11.       GetStringFromPointer = Left(szBuffer, NullCharPos - 1)
  12.  
  13. End Function

But in VB application crashes many times, (it works many times as well), Kindly help me ...Please correct the VBcode, I think Icould't use pointers in VB properly.
Regards to all