git-svn-id: svn://db.shs.com.ru/pip@355 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5

This commit is contained in:
2017-04-14 12:34:45 +00:00
parent be1f348da6
commit d07c71e97d
18 changed files with 66 additions and 58 deletions

View File

@@ -42,7 +42,7 @@ PIStringList PISystemInfo::mountRoots() {
char letters[1024];
DWORD ll = GetLogicalDriveStrings(1023, letters);
PIString clet;
for (int i = 0; i < ll; ++i) {
for (uint i = 0; i < ll; ++i) {
if (letters[i] == '\0') {
if (clet.size_s() > 2) ret << clet.cutRight(1);
clet.clear();
@@ -90,7 +90,7 @@ PIVector<PISystemInfo::MountInfo> PISystemInfo::mountInfo() {
char letters[1024], volname[1024], volfs[1024];
DWORD ll = GetLogicalDriveStrings(1023, letters);
PIString clet;
for (int i = 0; i < ll; ++i) {
for (DWORD i = 0; i < ll; ++i) {
if (letters[i] == '\0') {
if (GetVolumeInformation(clet.data(), volname, 1023, 0, 0, 0, volfs, 1023)) {
m.mount_point = clet;

View File

@@ -152,10 +152,10 @@ void PISystemMonitor::run() {
THREADENTRY32 thread;
thread.dwSize = sizeof(THREADENTRY32);
if (Thread32First(snap, &thread) == TRUE) {
if (thread.th32OwnerProcessID == pID_)
if (thread.th32OwnerProcessID == DWORD(pID_))
++thcnt;
while (Thread32Next(snap, &thread) == TRUE) {
if (thread.th32OwnerProcessID == pID_)
if (thread.th32OwnerProcessID == DWORD(pID_))
++thcnt;
}
}