View Full Version : playlists and titles and pointers, oh my
20th February 2002, 17:00
I have been working on a plugin that is sort of like those found that write html to a file, such as Do Something by OddSock. I have however found it limiting so decided to write my own. The thing is, is I code in VB, which has been fine with every other api call but a couple, those that return a pointer, that I can only access from inside a plugin. My request is simple to me anyway. Can you create another api call that returns the string value of the value, not the pointer pointing to the value? This would be helpful as I can find no way to get visual basic to read the string unless the length is specified, and dont have the know-how to write a c++ dll to do it for me, when this is the only part holding me back, all else is taken care of, but I cant get ID3 information unless I have the filename, and cant get the current playlist titles without that API call, which gives me a pointer that I cant use. Any other viable solutions would be greatly appreciated, thank you. :)
20th February 2002, 19:07
delphi is coded like pascal like basic, but full objectorentated.
i had the code of the visal module plugin to write a dll.
a trial version you can get from http://www.borland.com/delphi/ or if you are student you can get a cheap student version.
i hope this is hepful for you.
21st February 2002, 13:25
That doesnt solve the real issue that those api calls are returning a pointer that I cant read. I've got 200k worth of code that I dont feel like converting to delphi, which I would have to learn to convert it in the first place. I'm not asking them to change the api call, because I've checked out c++ source that relies on that call just the way it is, the better solution is just to copy out the code for that api call and and instead of returning the pointer, return the string itself, can you guys do that? :weird:
If someone out there has the source in c++ to write a single interface dll that I can call to convert it for me, I would do that also, thnx in advance :up: :D
23rd February 2002, 12:38
I am currently wrapping up (finishing) a project which provides the FULL WINAMP API to Visual Basic (as plugin or not as plugin, check the details about WM_USER messages which can only be used within plugins).
This API consists of a Winamp Plugin and an ActiveX dll which you will use in your projects. I have even incorporated TCP network support to allow remote control of Winamp across a local network.
This project will be released later this weekend (rough beta1 form) and will be maintained until completed (my discression).
My purpose for designing this API was simple, I want to use a laptop mounted in my truck to playback MP3 files but I need to control winamp from the passenger compartment using my Compaq iPaq. There are applications available to do this but none which I was happy with and none which allow you to change the playlist (I have added this functionality to the Winamp_API_VB).
I will post a download URL for this SDK when release B1 is ready (expected sat night/sun morning).
You can direct comments or questions to email@example.com
ALSO: I am looking for a C++ developer to help with a structure conversion, I have written a full VB code plugin (no C++ plugin thunk) (and yes you can export functions from a VB dll if you know how) but I am having an awful time with the plugin structure itself.
Hope this helps,
27th February 2002, 12:36
I have found one vb plugin to access the api up in the Plug-Ins section in winamp, but it is severely lacking in new features seeing as they stopped work on it many months ago. I have hacked together most of what I need, mainly the cgi written in vb (took awhile to find that bit). The last part I am lacking isnt the queue, but now it's getting the time of the currently playing song, and the ability to change the playlist without stopping the currently playing song, that appears to be beyond the api, but I could be wrong, seeing as one can do it with the playlist window manually. While I'm ranting for wants and neat features, I saw this in the other thread, is there a very, fast way to get the song length of all the songs in the playlist? Also, to pcdoc, I need to make sure you have the api to get the recently played list! the plugin I am using now appears to be before this feature was accessible to the api, this hinders a good portion of my web page as I was planning on being able to go back and requeue songs in the recently played list, say if you missed the song and wish to hear it again. for those that would like to see this work in progress, my main home page is EFNX's Gatewy (http://efnx.ath.cx) , look down at the bottom, also, this page of mine is being rewritten to be just my radio page: Radio GouRou (http://radio.efnx.ath.cx). Email me at GouRou (SuperSpyGouRou@hotmail.com) if you would like the source code or just to ask some questions more make a few comments, thank you everyone for your help. I have a couple more API requests for the Winamp team, but those will be a couple days in coming..thnx ppl :D :up:
7th March 2002, 03:20
VB Gen Plugin Tip!!
I dont know where to put this answer, but I hope the moderator puts it somewhere useful. to get the String value from a pointer returned by winamp in Visual Basic, use the CopyMemory api to copy the memory pointed at by the pointer to a byte array, here:
Declare Sub CopyMemory Lib "kernel32" _
Alias "RtlMoveMemory" (lpvDest As Any, _
lpvSource As Any, ByVal cbCopy As Long)
set the destination to a Byte() Array, not a string, setting to a string returns another pointer to the value of where the string is stored and it errors out, setting it to a long returns the pointer to a new place in memory, equally useless. use ByVal for the source since your sending a pointer, not the string itself, dont use byval on the byte array, as your not using a pointer variable, to get the data back out, use chrW() in a loop for each element of the Byte() Array. any questions to this, just post and I'll try to answer for you.
15th April 2007, 07:50
The whole Byte array approach did not work for me.
Can you please post some example code on how you got it to work? Thanks.
vBulletin® v3.8.6, Copyright ©2000-2013, Jelsoft Enterprises Ltd.