19 Jun '13 - 03:01 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Reply  |  Print  
Author Topic: [BassMidi] BASS_MIDI_FontGetPreset to a VB string  (Read 1025 times)
Art60
Posts: 135


« on: 23 Oct '08 - 20:47 »
Reply with quoteQuote

Hi,

got a small problem,

When I call BASS_MIDI_FontGetPreset, it returns a 8 digits number in my tests, I'd like it to tell me "Piano" instead ;-)

Did anyone write the exact syntax to make this function work in VisualBasic (VB6) ?

Thx in advance !
Logged
Ian @ un4seen
Administrator
Posts: 15363


« Reply #1 on: 24 Oct '08 - 12:31 »
Reply with quoteQuote

The VBStrFromAnsiPtr function should do the trick, something like this...

Dim preset As String
preset = VBStrFromAnsiPtr(BASS_MIDI_FontGetPreset(...))
Logged
Art60
Posts: 135


« Reply #2 on: 24 Oct '08 - 14:17 »
Reply with quoteQuote

The VBStrFromAnsiPtr function should do the trick, something like this...
Dim preset As String
preset = VBStrFromAnsiPtr(BASS_MIDI_FontGetPreset(...))

I didn't read it, it was in your bassmidi.txt file though:
Quote
For the BASS functions that return strings (char*), VB users should use the VBStrFromAnsiPtr function to convert the returned pointer into a VB string.

Shame on me  Embarrassed !

Thanks again Ian, you're always there to help, even in VB ! congratulations!

Best regards from France
Art.
Logged
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.18 | SMF © 2013, Simple Machines