Cosmetic changes to code.

This commit is contained in:
Birunthan Mohanathas
2011-03-29 19:21:57 +00:00
parent 5882f12c49
commit a92bdd9b18
65 changed files with 1642 additions and 1642 deletions

View File

@ -61,7 +61,7 @@ float getHighestTemp();
/*
This function is called when the measure is initialized.
The function must return the maximum value that can be measured.
The function must return the maximum value that can be measured.
The return value can also be 0, which means that Rainmeter will
track the maximum value automatically. The parameters for this
function are:
@ -73,10 +73,10 @@ float getHighestTemp();
*/
UINT Initialize(HMODULE instance, LPCTSTR iniFile, LPCTSTR section, UINT id)
{
/*
Read our own settings from the ini-file
/*
Read our own settings from the ini-file
The ReadConfigString can be used for this purpose. Plugins
can also read the config some other way (e.g. with
can also read the config some other way (e.g. with
GetPrivateProfileInt, but in that case the variables
do not work.
*/
@ -100,7 +100,7 @@ UINT Initialize(HMODULE instance, LPCTSTR iniFile, LPCTSTR section, UINT id)
}
}
}
return 0;
}

View File

@ -17,34 +17,34 @@ bool CSharedMemClient::ReadSharedMem(PCORE_TEMP_SHARED_DATA i_SharedData)
HANDLE hdlMutex;
hdlMutex = CreateMutex(NULL,FALSE,CORE_TEMP_MUTEX_OBJECT);
if (hdlMutex == NULL)
{
if (hdlMutex == NULL)
{
return false;
}
WaitForSingleObject(hdlMutex, INFINITE);
}
WaitForSingleObject(hdlMutex, INFINITE);
hdlMemory = OpenFileMapping(
FILE_MAP_READ, // Read only permission.
TRUE,
FILE_MAP_READ, // Read only permission.
TRUE,
CORE_TEMP_MAPPING_OBJECT); // "CoreTempMappingObject"
if (hdlMemory == NULL)
{
ReleaseMutex(hdlMutex);
if (hdlMemory == NULL)
{
ReleaseMutex(hdlMutex);
CloseHandle(hdlMutex);
return false;
}
}
pSharedData = (PCORE_TEMP_SHARED_DATA)MapViewOfFile(hdlMemory, FILE_MAP_READ, 0, 0, 0);
if (pSharedData == NULL)
if (pSharedData == NULL)
{
CloseHandle(hdlMemory);
hdlMemory = NULL;
ReleaseMutex(hdlMutex);
ReleaseMutex(hdlMutex);
CloseHandle(hdlMutex);
return false;
}
}
__try
{
@ -59,7 +59,7 @@ bool CSharedMemClient::ReadSharedMem(PCORE_TEMP_SHARED_DATA i_SharedData)
UnmapViewOfFile(pSharedData);
CloseHandle(hdlMemory);
ReleaseMutex(hdlMutex);
ReleaseMutex(hdlMutex);
CloseHandle(hdlMutex);
return bRet;