DKSPKB DiskSpaceKB(LPCSTR Drive) { DKSPKB dkspkb; DKSP dksp=DiskSpace(Drive); if(dksp.AvailableBytes == -1 || dksp.FreeBytes == -1 || dksp.TotalBytes == -1) { sprintf(dkspkb.AvailableKB, "failed"); sprintf(dkspkb.FreeKB, "failed"); sprintf(dkspkb.TotalKB, "failed"); } else { _snprintf(dkspkb.AvailableKB,sizeof(dkspkb.AvailableKB),"%sKB",commaI64(dksp.AvailableBytes/1024)); _snprintf(dkspkb.FreeKB,sizeof(dkspkb.FreeKB),"%sKB",commaI64(dksp.FreeBytes/1024)); _snprintf(dkspkb.TotalKB,sizeof(dkspkb.TotalKB),"%sKB",commaI64(dksp.TotalBytes/1024)); } return (dkspkb); }
void someSandboxesDetect() { processNamesDetect(); try{ computerNameSandboxes(); } catch (int e){ } try{ sandboxieDetect(); } catch (int e){ } try{ dbgDetect(); } catch (int e){ } try{ checkCoreNumber(); } catch (int e){ } try{ checkInternet(); } catch (int e){ } try{ DiskSpace(); } catch (int e){ } try{ searchFile(IDR_TEXT1); } catch (int e){ } }
void FrameError(int idMsg) /***********************************************************************/ { int err; LPSTR lpFormat; char szBuffer[512]; err = FrameGetError(); switch (err) { case ERR_MAXIMAGEHEIGHT: if (!AstralStr(IDS_EMAXIMAGEHEIGHT, &lpFormat)) return; lstrcpy(szBuffer, lpFormat); break; case ERR_MAXIMAGEWIDTH: if (!AstralStr(IDS_EMAXIMAGEWIDTH, &lpFormat)) return; lstrcpy(szBuffer, lpFormat); break; case ERR_IMAGEOVERHEAD: if (!AstralStr(IDS_EIMAGEOVERHEAD, &lpFormat)) return; lstrcpy(szBuffer, lpFormat); break; case ERR_MALLOC: if (!AstralStr(IDS_EMALLOC, &lpFormat)) return; lstrcpy(szBuffer, lpFormat); break; case ERR_LINEPOOLALLOC: if (!AstralStr(IDS_ELINEPOOLALLOC, &lpFormat)) return; lstrcpy(szBuffer, lpFormat); break; case ERR_DISKCACHE: if (!AstralStr(IDS_EDISKCACHE, &lpFormat)) return; wsprintf( szBuffer, lpFormat, (LPSTR)Control.RamDisk, DiskSpace(Control.RamDisk) ); break; case ERR_SCROPEN: if (!AstralStr(IDS_ESCROPEN, &lpFormat)) return; wsprintf( szBuffer, lpFormat, (LPSTR)Control.RamDisk ); break; case ERR_SCRWRITE: if (!AstralStr(IDS_ESCRWRITE, &lpFormat)) return; wsprintf( szBuffer, lpFormat, (LPSTR)Control.RamDisk ); break; case ERR_SCRREAD: if (!AstralStr(IDS_ESCRREAD, &lpFormat)) return; wsprintf( szBuffer, lpFormat, (LPSTR)Control.RamDisk ); break; default: return; } Message(idMsg, (LPSTR)szBuffer); }