Unlock locked files (similar to Unlocker and WhoLockMe)
This code allows you to close the process(es) that keep a file locked, by simply specifying the locked file.
This is similar to what Unlocker, ForceDel, WhoLockMe and UnlockIt do. I'm not taking credit for this code,
because I downloaded it myself from a Chinese website here and only removed the unnecessary code and
created the sample project. All credits go to the original author.
Have fun with it.
Last edited by Chris001; Dec 24th, 2007 at 02:27 PM.
Re: Unlock locked files (similar to Unlocker and WhoLockMe)
Originally Posted by amna_shahzad
I want to do the reverse of this function.i want to get current file name in current wmplayer.exe proccess
I think what you're looking for is "Now Playing" feature. I think the only way for you to get the current playing song is by tracing the Window Handles using FindWindow and then get the text. Try using some sort of Window Spy tool to see if you can locate some specific component of Media Player GUI and then try getting the window text using hWnd of that component.
Alternative is to find if there is any API that returns current playing song details. I did search quickly, but didn't find any appropriate results. Perhaps a better try with proper search phrase may yield something useful.