Old 19th January 2007, 23:09   #41
Join Date: Sep 2006
Posts: 89
FindWindow is used internally in Bind method. Path is optional parameter. But I guess C# doesn't have optional parameters so you can simply specify an empty string for a path parameter if Winamp is already running.
First thing Bind method does is it tries to find a winamp window (using FindWindow). If it does not find one, it uses a specified path to lauch Winamp.
New version of WACC will be released in next couple of days.
Tardymo is offline   Reply With Quote
Old 13th December 2008, 17:59   #42
Junior Member
Join Date: Dec 2008
Posts: 6
Re: Solution: Get FileName from external app/dll

Originally posted by HeikoSS

function GetWinampFilename: String;
var Text, tempStr: String;
hwndWinamp, TempHandle : THandle;
dat2: array[0..500] of Char;
TrackPos: Integer;
temp, MPointer: Cardinal;
hwndWinamp:= FindWindow('Winamp v1.x',nil);
TrackPos:= SendMessage(hwndWinamp,WM_USER,0 , 125);
MPointer:= SendMessage(hwndWinamp,WM_USER,TrackPos , 211);
hwndWinamp:= OpenProcess(PROCESS_ALL_ACCESS,False,TempHandle);
ReadProcessMemory(hwndWinamp, Pointer(MPointer), @dat2,500,temp);
tempStr:= dat2; // ;-)
Result:= tempStr;

I thought I was pretty able to convert this to C#, but I can't get it to work. Any C# people that know for a fact they can rewrite this to C#?
Sipps is offline   Reply With Quote
Old 14th December 2008, 09:27   #43
Junior Member
Join Date: Jan 2007
Location: Caen, France
Posts: 4
using WACC

i've coded some C# interaction with Winamp and i've used the WACC .NET library.

you can find this lib here :
WACC Library

With that, it's very simple to have path of current playing song in Winamp :

PHP Code:
String currentSongPath cWinamp.Playlist.GetItemPath(cWinamp.Playlist.Position
hope it can help.

fdeshayes is offline   Reply With Quote
Old 30th December 2009, 19:59   #44
Junior Member
Join Date: Dec 2009
Posts: 11
thanks fdeshayes
babazula2 is offline   Reply With Quote
Go Back   Winamp & Shoutcast Forums > Developer Center > Winamp Development

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump