|
|||||||
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Oct 2003
Posts: 9
|
Solution: Using API functions restricted for plugins in outofproc app
HeikoSS showed a method to read string pointers from an external app.
(http://forums.winamp.com/showthread....rnal+app%2Fdll) Thus API's restricted for plugins like IPC_GETPLAYLISTFILE can be used also by outofprocess apps. Other API's like IPC_SETSKIN or IPC_GETSKIN expect a stringbuffer in winamp memoryspace to read or return data. HowTo setup a stringbuffer in external memory? A solution: Steal a string pointer, save its data, 'misuse' it for expected stringbuffer, restore the data after use. IPC_GETINIFILE is the ideal candidate to steal its returned pointer to winamp.ini file. Code in VB: A module containing functions,which can be used in- or outofprocess (handy for debugging plugin in VB IDE). HeikoSS's method is packaged in a common GetWinampString function. GetSkinFont is an example how to use it. IPC_GETINIFILE,IPC_GETPLAYLISTFILE,IPC_GETPLAYLISTTITLE etc can be implemented alike. My hack wraps in a StolenPointer property and a WriteWinampString function. SetSkin is an example, if API reads string data.Similiar IPC's are IPC_EXECPLUG,IPC_MBOPEN,IPC_CHANGECURRENTFILE. GetSkinDir as an example, if API returns string data.Similiar IPC is IPC_GETMBURL. Notice the different SendMessage declarations for in/outofproc. Code tested with Winamp 2.91,Win2000,VB6 .no harm noticed on winamp or other plugins 3(& a lot more) questions: Is there any 'official' way to place a string in external memory? HowTo deal with structs in a similiar fashion? Why is returned fontsize 30% larger than actual? (sngCorr in GetSkinFont) |
|
|
|
|
|
#2 | |
|
Junior Member
Join Date: Oct 2003
Posts: 9
|
Quote:
Winamp returns pixels, VB StdFont is in points,stupid me. Updated GetSkinFont in module: |
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|