* Started.
*
* 28-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>)
- * Remove all hardcode string to En.rc
+ * Remove all hardcode string to En.rc
*/
-#include "precomp.h"
+#include <precomp.h>
#include "resource.h"
#ifdef INCLUDE_CMD_FREE
if (_tcslen (szDisk) < 2 || szDisk[1] != _T(':'))
{
- LoadString(GetModuleHandle(NULL), STRING_FREE_ERROR1, szMsg, RC_STRING_MAX_SIZE);
+ LoadString(CMD_ModuleHandle, STRING_FREE_ERROR1, szMsg, RC_STRING_MAX_SIZE);
ConErrPrintf(szMsg);
return;
}
if (!GetVolumeInformation (szRootPath, szVolume, 64, &dwSerial,
NULL, NULL, NULL, 0))
{
- LoadString(GetModuleHandle(NULL), STRING_FREE_ERROR1, szMsg, RC_STRING_MAX_SIZE);
+ LoadString(CMD_ModuleHandle, STRING_FREE_ERROR1, szMsg, RC_STRING_MAX_SIZE);
ConErrPrintf(_T("%s %s:\n"), szMsg, szDrive);
return;
}
if (szVolume[0] == _T('\0'))
{
-
- LoadString(GetModuleHandle(NULL), STRING_FREE_ERROR2, szMsg, RC_STRING_MAX_SIZE);
+
+ LoadString(CMD_ModuleHandle, STRING_FREE_ERROR2, szMsg, RC_STRING_MAX_SIZE);
_tcscpy (szVolume, szMsg);
}
if (!GetDiskFreeSpace (szRootPath, &dwSecPerCl,
&dwBytPerSec, &dwFreeCl, &dwTotCl))
{
- LoadString(GetModuleHandle(NULL), STRING_FREE_ERROR1, szMsg, RC_STRING_MAX_SIZE);
+ LoadString(CMD_ModuleHandle, STRING_FREE_ERROR1, szMsg, RC_STRING_MAX_SIZE);
ConErrPrintf (_T("%s %s:\n"), szMsg, szDrive);
return;
}
uliSize.QuadPart = dwSecPerCl * dwBytPerSec * dwFreeCl;
ConvertULargeInteger (uliSize, szFree, 40);
-
- LoadString(GetModuleHandle(NULL), STRING_FREE_HELP1, szMsg, RC_STRING_MAX_SIZE);
+
+ LoadString(CMD_ModuleHandle, STRING_FREE_HELP1, szMsg, RC_STRING_MAX_SIZE);
ConOutPrintf(szMsg, szDrive, szVolume, szSerial, szTotal, szUsed, szFree);
}
INT CommandFree (LPTSTR cmd, LPTSTR param)
{
- TCHAR szMsg[RC_STRING_MAX_SIZE];
LPTSTR szParam;
TCHAR szDefPath[MAX_PATH];
INT argc, i;
if (!_tcsncmp (param, _T("/?"), 2))
{
- LoadString(GetModuleHandle(NULL), STRING_FREE_HELP2, szMsg, RC_STRING_MAX_SIZE);
- ConOutPuts(szMsg);
+ ConOutResPaging(TRUE,STRING_FREE_HELP2);
return 0;
}