CString -> RString

This commit is contained in:
Chris Danford
2006-01-22 01:00:06 +00:00
parent 870ed267fc
commit 7f821e8cfc
578 changed files with 3943 additions and 3946 deletions
@@ -10,7 +10,7 @@
#pragma comment(lib, "version.lib")
#endif
bool GetFileVersion( CString sFile, CString &sOut )
bool GetFileVersion( RString sFile, RString &sOut )
{
do {
/* Cast away const to work around header bug in VC6. */
@@ -19,7 +19,7 @@ bool GetFileVersion( CString sFile, CString &sOut )
if( !iSize )
break;
CString VersionBuffer( iSize, ' ' );
RString VersionBuffer( iSize, ' ' );
/* Also VC6: */
if( !GetFileVersionInfo( const_cast<char *>(sFile.c_str()), NULL, iSize, VersionBuffer.GetBuf() ) )
break;
@@ -37,13 +37,13 @@ bool GetFileVersion( CString sFile, CString &sOut )
char *str;
UINT len;
CString sRes = ssprintf( "\\StringFileInfo\\%04x%04x\\FileVersion",
RString sRes = ssprintf( "\\StringFileInfo\\%04x%04x\\FileVersion",
iTrans[0], iTrans[1] );
if( !VerQueryValue( (void *) VersionBuffer.c_str(), (char *) sRes.c_str(),
(void **) &str, &len ) || len < 1)
break;
sOut = CString( str, len-1 );
sOut = RString( str, len-1 );
} while(0);
/* Get the size and date. */
@@ -60,7 +60,7 @@ bool GetFileVersion( CString sFile, CString &sOut )
return true;
}
CString FindSystemFile( CString sFile )
RString FindSystemFile( RString sFile )
{
char szWindowsPath[MAX_PATH];
GetWindowsDirectory( szWindowsPath, MAX_PATH );
@@ -77,18 +77,18 @@ CString FindSystemFile( CString sFile )
for( int i = 0; szPaths[i]; ++i )
{
CString sPath = ssprintf( "%s%s%s", szWindowsPath, szPaths[i], sFile.c_str() );
RString sPath = ssprintf( "%s%s%s", szWindowsPath, szPaths[i], sFile.c_str() );
struct stat buf;
if( !stat(sPath, &buf) )
return sPath;
}
return CString();
return RString();
}
/* Get the full path of the process running in iProcessID. On error, false is
* returned and an error message is placed in sName. */
bool GetProcessFileName( uint32_t iProcessID, CString &sName )
bool GetProcessFileName( uint32_t iProcessID, RString &sName )
{
/* This method works in everything except for NT4, and only uses kernel32.lib functions. */
do {