You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-07 03:22:57 +03:00
Reformat all code to coding standard
This commit is contained in:
@@ -14,35 +14,41 @@
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
MA 02110-1301, USA. */
|
||||
|
||||
#include "idbregistry.h"
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#define NOMINMAX
|
||||
#include <windows.h>
|
||||
#include <string>
|
||||
using namespace std;
|
||||
|
||||
const string IDBreadRegistry(const string& name, bool returnShortName)
|
||||
{
|
||||
HKEY hkResult;
|
||||
LONG lResult;
|
||||
lResult = RegOpenKeyEx(HKEY_LOCAL_MACHINE, "Software\\Calpont\\InfiniDB", 0, KEY_READ, &hkResult);
|
||||
if (lResult != ERROR_SUCCESS)
|
||||
return string();
|
||||
DWORD cbData = 1024;
|
||||
TCHAR CfnameBuf[1024];
|
||||
lResult = RegQueryValueEx(hkResult, name.c_str(), 0, 0, (LPBYTE)CfnameBuf, &cbData);
|
||||
CloseHandle(hkResult);
|
||||
if (lResult != ERROR_SUCCESS)
|
||||
return string();
|
||||
if (!returnShortName)
|
||||
return string(CfnameBuf);
|
||||
|
||||
cbData = 1024;
|
||||
TCHAR snbuffer[1024];
|
||||
lResult = GetShortPathName(CfnameBuf, snbuffer, cbData);
|
||||
if (lResult == 0 || lResult > 1024)
|
||||
return string();
|
||||
return string(snbuffer);
|
||||
}
|
||||
|
||||
#include "idbregistry.h"
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#define NOMINMAX
|
||||
#include <windows.h>
|
||||
#include <string>
|
||||
using namespace std;
|
||||
|
||||
const string IDBreadRegistry(const string& name, bool returnShortName)
|
||||
{
|
||||
HKEY hkResult;
|
||||
LONG lResult;
|
||||
lResult = RegOpenKeyEx(HKEY_LOCAL_MACHINE, "Software\\Calpont\\InfiniDB", 0, KEY_READ, &hkResult);
|
||||
|
||||
if (lResult != ERROR_SUCCESS)
|
||||
return string();
|
||||
|
||||
DWORD cbData = 1024;
|
||||
TCHAR CfnameBuf[1024];
|
||||
lResult = RegQueryValueEx(hkResult, name.c_str(), 0, 0, (LPBYTE)CfnameBuf, &cbData);
|
||||
CloseHandle(hkResult);
|
||||
|
||||
if (lResult != ERROR_SUCCESS)
|
||||
return string();
|
||||
|
||||
if (!returnShortName)
|
||||
return string(CfnameBuf);
|
||||
|
||||
cbData = 1024;
|
||||
TCHAR snbuffer[1024];
|
||||
lResult = GetShortPathName(CfnameBuf, snbuffer, cbData);
|
||||
|
||||
if (lResult == 0 || lResult > 1024)
|
||||
return string();
|
||||
|
||||
return string(snbuffer);
|
||||
}
|
||||
|
Reference in New Issue
Block a user