Thema: Delphi Probleme mit Bass_Vis

Einzelnen Beitrag anzeigen

BassFan
(Gast)

n/a Beiträge
 
#22

Re: Probleme mit Bass_Vis

  Alt 8. Jul 2006, 16:13
Habe das Projekt nochmal analysiert!
Was definitiv fehlt.

WinampIPC die const:

#define IPC_GETINIFILE 334 // returns a pointer to winamp.ini
#define IPC_GETINIDIRECTORY 335 // returns a pointer to the directory to put config files in (if you dont want to use winamp.ini)


Übersetzt:
Delphi-Quellcode:
  IPC_GETINIFILE = 334;
IPC_GETINIDIRECTORY = 335;
Mein Problem nun das übersetzen des C++ Schnipsel.

Code:
case IPC_GETINIFILE:
         {
            static char szWinampInipath[ MAX_PATH ] = "";
            if( *szWinampInipath == '\0' )
            {
               GetModuleFileNameA( NULL, szWinampInipath, MAX_PATH - 1 );
               char * szWalk = szWinampInipath + strlen( szWinampInipath ) - 1;
               while( ( szWalk > szWinampInipath ) && ( *szWalk != '.' ) ) szWalk--;
               szWalk++;
               strcpy( szWalk, "ini" );
            }
            return ( LRESULT )szWinampInipath;
         }

case IPC_GETINIDIRECTORY:
         {
            // TODO: trailing slash or not???
            static char szPluginInipath[ MAX_PATH ] = "";
            if( *szPluginInipath == '\0' )
            {
               GetModuleFileNameA( NULL, szPluginInipath, MAX_PATH - 1 );
               char * szWalk = szPluginInipath + strlen( szPluginInipath ) - 1;
               while( ( szWalk > szPluginInipath ) && ( *szWalk != '\\' ) ) szWalk--;
               szWalk++;
               strcpy( szWalk, TEXT( "Plugins" ) );
            }
            return ( LRESULT )szPluginInipath;
         }
Würde mich freuen wenn es jemand übersetzen könnte.
Dann komme ich hoffentlich etwas weiter

Grüße
  Mit Zitat antworten Zitat