Changeset efb98170ad2d…
Parent e3e4cac77219…
by
Changes to 10 files · Browse files at efb98170ad2d Showing diff from parent e3e4cac77219 Diff from another changeset...
|
|
@@ -143,7 +143,7 @@ ATLTRACE(L"GetCMenuTranslation: '%s'\n", (LPCWSTR)strSubKey);
HKEY hKey = 0;
- LONG lRes = RegOpenKeyExW(HKEY_CURRENT_USER, strSubKey, 0, KEY_READ, &hKey);
+ LONG lRes = ::RegOpenKeyExW(HKEY_CURRENT_USER, strSubKey, 0, KEY_READ, &hKey);
if (lRes == ERROR_SUCCESS && hKey)
{
@@ -156,7 +156,7 @@ }
if (hKey)
- RegCloseKey(hKey);
+ ::RegCloseKey(hKey);
}
void CTortoiseHgCmenuBase::InitMenuMaps(const CMenuDescription *pMenuDescs, int nCount)
@@ -231,7 +231,7 @@ ATLTRACE(" ***** InsertMenuItemWithIcon1: can't find '%s'\n", strIconName);
}
}
- InsertMenuItemW(hMenu, indexMenu, TRUE, &mii);
+ ::InsertMenuItemW(hMenu, indexMenu, TRUE, &mii);
ATLTRACE(L"InsertMenuItemWithIcon1('%s') finished\n", strMenuText);
}
@@ -280,7 +280,7 @@ }
}
- InsertMenuItemW(hMenu, indexMenu, TRUE, &mii);
+ ::InsertMenuItemW(hMenu, indexMenu, TRUE, &mii);
ATLTRACE(L"InsertMenuItemWithIcon2('%s') finished\n", (LPCWSTR)strMenuText);
}
@@ -375,7 +375,7 @@ mi.fMask = MIM_STYLE | MIM_APPLYTOSUBMENUS;
mi.dwStyle = MNS_CHECKORBMP;
- SetMenuInfo(hMenu, &mi);
+ ::SetMenuInfo(hMenu, &mi);
}
#define ResultFromShort(i) ResultFromScode(MAKE_SCODE(SEVERITY_SUCCESS, 0, (USHORT)(i)))
@@ -472,7 +472,7 @@ lpszEntries = NoRepoMenu;
// start building TortoiseHg menus and submenus
- InsertMenu(hMenu, indexMenu++, MF_SEPARATOR | MF_BYPOSITION, 0, NULL);
+ ::InsertMenu(hMenu, indexMenu++, MF_SEPARATOR | MF_BYPOSITION, 0, NULL);
CAtlList<CString> listEntries;
Tokenize(lpszEntries, listEntries, " ");
@@ -487,7 +487,7 @@ }
}
- const HMENU hSubMenu = CreatePopupMenu();
+ const HMENU hSubMenu = ::CreatePopupMenu();
if (hSubMenu)
{
UINT indexSubMenu = 0;
@@ -500,10 +500,8 @@ {
if (!bIsSeparator)
{
- InsertMenu(
- hSubMenu, indexSubMenu++,
- MF_SEPARATOR | MF_BYPOSITION, 0, NULL
- );
+ ::InsertMenu(hSubMenu, indexSubMenu++,
+ MF_SEPARATOR | MF_BYPOSITION, 0, NULL);
bIsSeparator = true;
}
}
@@ -518,7 +516,7 @@ }
}
if (bIsSeparator && indexSubMenu > 0)
- RemoveMenu(hSubMenu, indexSubMenu - 1, MF_BYPOSITION);
+ ::RemoveMenu(hSubMenu, indexSubMenu - 1, MF_BYPOSITION);
TweakMenuForVista(hSubMenu);
@@ -528,7 +526,7 @@ InsertSubMenuItemWithIcon2(hMenu, hSubMenu, indexMenu++, idCmd++,
TortoiseHgMenuEntryString, "hg.ico");
- InsertMenu(hMenu, indexMenu++, MF_SEPARATOR | MF_BYPOSITION, 0, NULL);
+ ::InsertMenu(hMenu, indexMenu++, MF_SEPARATOR | MF_BYPOSITION, 0, NULL);
CInitStatus::Check();
@@ -627,7 +625,7 @@ else if (uFlags == GCS_VERBW || uFlags == GCS_VERBA)
{
#if 0
- psz = iter->second.name;
+ psz = p->m_value.name;
#else
// bugfix: don't provide verbs ("rename" conflicted with rename of explorer)
psz = "";
@@ -722,14 +720,9 @@ DRAWITEMSTRUCT* lpdis = (DRAWITEMSTRUCT*)lParam;
if (!lpdis || (lpdis->CtlType != ODT_MENU) || !lpdis->itemData)
break; //not for a menu
- DrawIconEx(
- lpdis->hDC,
- lpdis->rcItem.left - 16,
- lpdis->rcItem.top
- + (lpdis->rcItem.bottom - lpdis->rcItem.top - 16) / 2,
- (HICON) lpdis->itemData, 16, 16,
- 0, 0, DI_NORMAL
- );
+ ::DrawIconEx(lpdis->hDC, lpdis->rcItem.left - 16,
+ lpdis->rcItem.top + (lpdis->rcItem.bottom - lpdis->rcItem.top - 16) / 2,
+ (HICON) lpdis->itemData, 16, 16, 0, 0, DI_NORMAL);
*pResult = TRUE;
}
break;
@@ -753,18 +746,18 @@ CString strHgCmd = strDir + "\\thgw.exe";
WIN32_FIND_DATAA data;
- HANDLE hFind = FindFirstFileA(strHgCmd, &data);
+ HANDLE hFind = ::FindFirstFile(strHgCmd, &data);
if (hFind == INVALID_HANDLE_VALUE)
{
strHgCmd = strDir + "\\hgtk.exe";
- hFind = FindFirstFileA(strHgCmd, &data);
+ hFind = ::FindFirstFile(strHgCmd, &data);
if (hFind == INVALID_HANDLE_VALUE)
strHgCmd = strDir + "\\thg.cmd";
else
- FindClose(hFind);
+ ::FindClose(hFind);
}
else
- FindClose(hFind);
+ ::FindClose(hFind);
strHgCmd = Quote(strHgCmd) + " --nofork " + strCmd;
@@ -804,7 +797,7 @@ }
ATLTRACE("RunDialog: temp file = %s\n", (LPCTSTR)strTempFile);
- HANDLE hTempFile = CreateFileA(strTempFile, GENERIC_WRITE, FILE_SHARE_READ, 0,
+ HANDLE hTempFile = ::CreateFile(strTempFile, GENERIC_WRITE, FILE_SHARE_READ, 0,
CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0);
if (hTempFile == INVALID_HANDLE_VALUE)
@@ -818,10 +811,10 @@ {
DWORD dwWritten;
ATLTRACE("RunDialog: temp file adding '%s'\n", (LPCTSTR)m_arrFiles[i]);
- WriteFile(hTempFile, (LPCTSTR)m_arrFiles[i], m_arrFiles[i].GetLength(), &dwWritten, 0);
- WriteFile(hTempFile, "\n", 1, &dwWritten, 0);
+ ::WriteFile(hTempFile, (LPCTSTR)m_arrFiles[i], m_arrFiles[i].GetLength(), &dwWritten, 0);
+ ::WriteFile(hTempFile, "\n", 1, &dwWritten, 0);
}
- CloseHandle(hTempFile);
+ ::CloseHandle(hTempFile);
strHgCmd += " --listfile " + Quote(strTempFile);
}
@@ -840,7 +833,7 @@ LPCTSTR lpszShellExId = "{728E8840-5878-4EA7-918F-281C2697ABB1}";
#endif
char szProductId[50];
- UINT msires = ::MsiGetProductCodeA(lpszShellExId, szProductId);
+ UINT msires = ::MsiGetProductCode(lpszShellExId, szProductId);
ATLTRACE("MSI shellexid: %s\n", lpszShellExId);
ATLTRACE("MSI msires: %d", msires);
ATLTRACE("MSI installed product id: %s\n", szProductId);
@@ -881,14 +874,14 @@ STGMEDIUM stg = { TYMED_HGLOBAL };
if (SUCCEEDED(pDataObj->GetData(&fmt, &stg)) && stg.hGlobal)
{
- HDROP hDrop = (HDROP) GlobalLock(stg.hGlobal);
+ HDROP hDrop = (HDROP)::GlobalLock(stg.hGlobal);
if (hDrop)
{
- UINT uNumFiles = DragQueryFile(hDrop, 0xFFFFFFFF, NULL, 0);
+ UINT uNumFiles = ::DragQueryFile(hDrop, 0xFFFFFFFF, NULL, 0);
ATLTRACE(" hDrop uNumFiles = %d\n", uNumFiles);
for (UINT i = 0; i < uNumFiles; ++i) {
- if (DragQueryFile(hDrop, i, szName, MAX_PATH) > 0)
+ if (::DragQueryFile(hDrop, i, szName, MAX_PATH) > 0)
{
ATLTRACE(" DragQueryFile [%d] = '%s'\n", i, szName);
m_arrFiles.Add(szName);
@@ -900,7 +893,7 @@ ATLTRACE(" hDrop is NULL\n");
}
- GlobalUnlock(stg.hGlobal);
+ ::GlobalUnlock(stg.hGlobal);
if (stg.pUnkForRelease)
{
IUnknown* relInterface = (IUnknown*) stg.pUnkForRelease;
@@ -916,7 +909,7 @@ // if a directory background
if (pIDFolder)
{
- SHGetPathFromIDList(pIDFolder, szName);
+ ::SHGetPathFromIDList(pIDFolder, szName);
ATLTRACE(" Folder '%s'\n", szName);
m_strFolder = szName;
}
|
@@ -61,7 +61,7 @@
// separator
if (idCmd != idCmdFirst)
- InsertMenu(hMenu, indexMenu++, MF_SEPARATOR|MF_BYPOSITION, 0, NULL);
+ ::InsertMenu(hMenu, indexMenu++, MF_SEPARATOR|MF_BYPOSITION, 0, NULL);
TweakMenuForVista(hMenu);
@@ -92,7 +92,7 @@ // if a directory background
if (pIDFolder)
{
- SHGetPathFromIDList(pIDFolder, szName);
+ ::SHGetPathFromIDList(pIDFolder, szName);
ATLTRACE(" Folder '%s'\n", szName);
m_strFolder = szName;
}
@@ -112,14 +112,14 @@ STGMEDIUM stg = { TYMED_HGLOBAL };
if (SUCCEEDED(pDataObj->GetData(&fmt, &stg)) && stg.hGlobal)
{
- HDROP hDrop = (HDROP) GlobalLock(stg.hGlobal);
+ HDROP hDrop = (HDROP)::GlobalLock(stg.hGlobal);
if (hDrop)
{
- UINT uNumFiles = DragQueryFile(hDrop, 0xFFFFFFFF, NULL, 0);
+ UINT uNumFiles = ::DragQueryFile(hDrop, 0xFFFFFFFF, NULL, 0);
ATLTRACE(" hDrop uNumFiles = %d\n", uNumFiles);
for (UINT i = 0; i < uNumFiles; ++i) {
- if (DragQueryFile(hDrop, i, szName, MAX_PATH) > 0)
+ if (::DragQueryFile(hDrop, i, szName, MAX_PATH) > 0)
{
ATLTRACE(" DragQueryFile [%d] = '%s'\n", i, szName);
if (GetHgRepoRoot(szName) != strRoot)
@@ -137,7 +137,7 @@ ATLTRACE(" hDrop is NULL\n");
}
- GlobalUnlock(stg.hGlobal);
+ ::GlobalUnlock(stg.hGlobal);
if (stg.pUnkForRelease)
{
IUnknown* relInterface = (IUnknown*) stg.pUnkForRelease;
|
@@ -143,14 +143,14 @@ {
static CCacheEntry ce;
- unsigned tc = GetTickCount();
+ unsigned tc = ::GetTickCount();
if (ce.strHgRoot != strHgRoot || (tc - ce.uTickCount) > 2000)
{
ce.strHgRoot.Empty();
ce.bReadFailed = (ce.ds.Read(strHgRoot, strCwd) == 0);
ce.strHgRoot = strHgRoot;
- ce.uTickCount = GetTickCount();
+ ce.uTickCount = ::GetTickCount();
}
return (ce.bReadFailed ? 0 : &ce.ds);
|
@@ -47,7 +47,7 @@ CString strPath = strHgRoot + (bUseKbfiles ? "\\.hg\\kilnbfiles\\dirstate"
: "\\.hg\\dirstate");
- unsigned tc = GetTickCount();
+ unsigned tc = ::GetTickCount();
bool bNewStat = false;
if (position == NULL)
@@ -112,9 +112,9 @@ }
bUnset = false;
- unsigned tc0 = GetTickCount();
+ unsigned tc0 = ::GetTickCount();
CAutoPtr<CDirstate> ds = CDirstate::Read(strPath, bUnset);
- unsigned tc1 = GetTickCount();
+ unsigned tc1 = ::GetTickCount();
bool bRequestTHgStatusUpdate = true;
|
|
|
@@ -27,7 +27,7 @@ {
if (CSysInfo::Instance().IsVistaOrLater())
{
- m_hUxTheme = LoadLibrary(_T("UXTHEME.DLL"));
+ m_hUxTheme = ::LoadLibrary(_T("UXTHEME.DLL"));
if (m_hUxTheme)
{
@@ -41,7 +41,7 @@CIconBitmapUtils::~CIconBitmapUtils()
{
if (m_hUxTheme)
- FreeLibrary(m_hUxTheme);
+ ::FreeLibrary(m_hUxTheme);
}
HBITMAP CIconBitmapUtils::IconToBitmap(HICON hIcon)
@@ -114,19 +114,19 @@ }
SIZE sizeIcon;
- sizeIcon.cx = GetSystemMetrics(SM_CXSMICON);
- sizeIcon.cy = GetSystemMetrics(SM_CYSMICON);
+ sizeIcon.cx = ::GetSystemMetrics(SM_CXSMICON);
+ sizeIcon.cy = ::GetSystemMetrics(SM_CYSMICON);
RECT rcIcon;
- SetRect(&rcIcon, 0, 0, sizeIcon.cx, sizeIcon.cy);
+ ::SetRect(&rcIcon, 0, 0, sizeIcon.cx, sizeIcon.cy);
HBITMAP hBitmap = NULL;
- HDC hDestDC = CreateCompatibleDC(NULL);
+ HDC hDestDC = ::CreateCompatibleDC(NULL);
if (hDestDC)
{
if (SUCCEEDED(Create32BitHBITMAP(hDestDC, &sizeIcon, NULL, &hBitmap)))
{
- HBITMAP hOldBitmap = (HBITMAP)SelectObject(hDestDC, hBitmap);
+ HBITMAP hOldBitmap = (HBITMAP)::SelectObject(hDestDC, hBitmap);
if (hOldBitmap)
{
BLENDFUNCTION bfAlpha = { AC_SRC_OVER, 0, 255, AC_SRC_ALPHA };
@@ -139,8 +139,8 @@ HPAINTBUFFER hPaintBuffer = m_pfnBeginBufferedPaint(hDestDC, &rcIcon, BPBF_DIB, &paintParams, &hBufferDC);
if (hPaintBuffer)
{
- if (DrawIconEx(hBufferDC, 0, 0, hIcon, sizeIcon.cx, sizeIcon.cy, 0, NULL, DI_NORMAL))
- //if (FillRect(hBufferDC, &rcIcon, (HBRUSH) (0x000000FF)) != 0)
+ if (::DrawIconEx(hBufferDC, 0, 0, hIcon, sizeIcon.cx, sizeIcon.cy, 0, NULL, DI_NORMAL))
+ //if (::FillRect(hBufferDC, &rcIcon, (HBRUSH) (0x000000FF)) != 0)
{
// If icon did not have an alpha channel we need to convert buffer to PARGB
ConvertBufferToPARGB32(hPaintBuffer, hDestDC, hIcon, sizeIcon);
@@ -149,11 +149,11 @@ m_pfnEndBufferedPaint(hPaintBuffer, TRUE);
}
- SelectObject(hDestDC, hOldBitmap);
+ ::SelectObject(hDestDC, hOldBitmap);
}
}
- DeleteDC(hDestDC);
+ ::DeleteDC(hDestDC);
}
return hBitmap;
@@ -164,7 +164,7 @@ *phBitmap = NULL;
BITMAPINFO bmi;
- SecureZeroMemory(&bmi, sizeof(BITMAPINFO));
+ ::SecureZeroMemory(&bmi, sizeof(BITMAPINFO));
bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
bmi.bmiHeader.biPlanes = 1;
bmi.bmiHeader.biCompression = BI_RGB;
@@ -173,13 +173,13 @@ bmi.bmiHeader.biHeight = pSize->cy;
bmi.bmiHeader.biBitCount = 32;
- HDC hUsedDC = hDC ? hDC : GetDC(NULL);
+ HDC hUsedDC = hDC ? hDC : ::GetDC(NULL);
if (hUsedDC)
{
- *phBitmap = CreateDIBSection(hUsedDC, &bmi, DIB_RGB_COLORS, ppvBits, NULL, 0);
+ *phBitmap = ::CreateDIBSection(hUsedDC, &bmi, DIB_RGB_COLORS, ppvBits, NULL, 0);
if (hDC != hUsedDC)
{
- ReleaseDC(NULL, hUsedDC);
+ ::ReleaseDC(NULL, hUsedDC);
}
}
return (NULL == *phBitmap) ? E_OUTOFMEMORY : S_OK;
@@ -196,15 +196,15 @@ if (!HasAlpha(pargb, sizeIcon, cxRow))
{
ICONINFO info;
- if (GetIconInfo(hIcon, &info))
+ if (::GetIconInfo(hIcon, &info))
{
if (info.hbmMask)
{
hr = ConvertToPARGB32(hDC, pargb, info.hbmMask, sizeIcon, cxRow);
}
- DeleteObject(info.hbmColor);
- DeleteObject(info.hbmMask);
+ ::DeleteObject(info.hbmColor);
+ ::DeleteObject(info.hbmMask);
}
}
}
@@ -234,7 +234,7 @@HRESULT CIconBitmapUtils::ConvertToPARGB32(HDC hDC, Gdiplus::ARGB *pargb, HBITMAP hBitmap, SIZE& sizeImage, int cxRow)
{
BITMAPINFO bmi;
- SecureZeroMemory(&bmi, sizeof(BITMAPINFO));
+ ::SecureZeroMemory(&bmi, sizeof(BITMAPINFO));
bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
bmi.bmiHeader.biPlanes = 1;
bmi.bmiHeader.biCompression = BI_RGB;
@@ -244,12 +244,13 @@ bmi.bmiHeader.biBitCount = 32;
HRESULT hr = E_OUTOFMEMORY;
- HANDLE hHeap = GetProcessHeap();
- void *pvBits = HeapAlloc(hHeap, 0, bmi.bmiHeader.biWidth * 4 * bmi.bmiHeader.biHeight);
+ HANDLE hHeap = ::GetProcessHeap();
+ void *pvBits = ::HeapAlloc(hHeap, 0, bmi.bmiHeader.biWidth * 4 * bmi.bmiHeader.biHeight);
if (pvBits)
{
hr = E_UNEXPECTED;
- if (GetDIBits(hDC, hBitmap, 0, bmi.bmiHeader.biHeight, pvBits, &bmi, DIB_RGB_COLORS) == bmi.bmiHeader.biHeight)
+ if (::GetDIBits(hDC, hBitmap, 0, bmi.bmiHeader.biHeight, pvBits, &bmi,
+ DIB_RGB_COLORS) == bmi.bmiHeader.biHeight)
{
ULONG cxDelta = cxRow - bmi.bmiHeader.biWidth;
Gdiplus::ARGB *pargbMask = static_cast<Gdiplus::ARGB *>(pvBits);
@@ -276,7 +277,7 @@ hr = S_OK;
}
- HeapFree(hHeap, 0, pvBits);
+ ::HeapFree(hHeap, 0, pvBits);
}
return hr;
|
@@ -6,16 +6,16 @@ LPCTSTR lpszSubKey = "Software\\TortoiseHg";
HKEY hKey = 0;
- LONG lRes = RegOpenKeyExA(HKEY_CURRENT_USER, lpszSubKey, 0, KEY_READ, &hKey);
+ LONG lRes = ::RegOpenKeyEx(HKEY_CURRENT_USER, lpszSubKey, 0, KEY_READ, &hKey);
if (lRes != ERROR_SUCCESS || hKey == 0)
return 0;
DWORD cbData = MAX_PATH;
LPTSTR lpszData = strRes.GetBuffer(cbData);
- lRes = RegQueryValueExA(hKey, strName, 0, 0, (LPBYTE)lpszData, &cbData);
+ lRes = ::RegQueryValueEx(hKey, strName, 0, 0, (LPBYTE)lpszData, &cbData);
strRes.ReleaseBuffer(cbData);
- RegCloseKey(hKey);
+ ::RegCloseKey(hKey);
return lRes == ERROR_SUCCESS;
}
|
@@ -21,9 +21,9 @@
CSysInfo::CSysInfo(void)
{
- SecureZeroMemory(&inf, sizeof(OSVERSIONINFOEX));
+ ::SecureZeroMemory(&inf, sizeof(OSVERSIONINFOEX));
inf.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
- GetVersionEx((OSVERSIONINFO *)&inf);
+ ::GetVersionEx((OSVERSIONINFO *)&inf);
}
const CSysInfo& CSysInfo::Instance()
|
@@ -22,7 +22,7 @@ {
DWORD dwSize = 260;
char szBuf[260];
- if (!::GetUserNameA(szBuf, &dwSize))
+ if (!::GetUserName(szBuf, &dwSize))
return "";
CString strRes = "\\\\.\\pipe\\TortoiseHgRpcServer-bc0c27107423-";
strRes += szBuf;
@@ -43,10 +43,10 @@ ATLTRACE("CTHgStatus:SendRequest: sending '%s' to %s\n",
(LPCTSTR)strRequest, (LPCTSTR)strPipeName);
- fSuccess = ::CallNamedPipeA(strPipeName, (void*)(LPCTSTR)strRequest,
+ fSuccess = ::CallNamedPipe(strPipeName, (void*)(LPCTSTR)strRequest,
strRequest.GetLength(), 0, 0, &cbRead, NMPWAIT_NOWAIT);
- DWORD dwErr = GetLastError();
+ DWORD dwErr = ::GetLastError();
if (fSuccess || dwErr == ERROR_MORE_DATA || dwErr == ERROR_PIPE_NOT_CONNECTED)
{
return 0;
|
@@ -15,7 +15,7 @@ TCHAR lpszValue[MAX_PATH] = "";
LONG lpcbLonger = MAX_PATH * sizeof(TCHAR);
- if (RegQueryValue(hKey, lpszKeyName, lpszValue, &lpcbLonger) != ERROR_SUCCESS)
+ if (::RegQueryValue(hKey, lpszKeyName, lpszValue, &lpcbLonger) != ERROR_SUCCESS)
return "";
return lpszValue;
@@ -36,7 +36,7 @@ STARTUPINFOA si;
memset(&si, 0, sizeof(STARTUPINFO));
- BOOL bRes = CreateProcessA(
+ BOOL bRes = ::CreateProcess(
NULL, // No module name, use command line
(LPTSTR)(LPCTSTR)strCommand,
NULL, // Process handle not inherited
@@ -54,8 +54,8 @@ return false;
}
- CloseHandle(pi.hProcess);
- CloseHandle(pi.hThread);
+ ::CloseHandle(pi.hProcess);
+ ::CloseHandle(pi.hThread);
return true;
}
@@ -64,11 +64,11 @@ char szTempDir[MAX_PATH + 1];
char szTempFile[MAX_PATH + 1];
- if (GetTempPath(MAX_PATH, szTempDir) == 0)
+ if (::GetTempPath(MAX_PATH, szTempDir) == 0)
{
ATLTRACE("GetTemporaryFile: Failed to find temporary path\n");
}
- else if (GetTempFileName(szTempDir, strPrefix, 0, szTempFile) != 0)
+ else if (::GetTempFileName(szTempDir, strPrefix, 0, szTempFile) != 0)
{
return szTempFile;
}
@@ -187,17 +187,15 @@// processes while we have it open
FILE* fopenReadRenameAllowed(LPCTSTR lpszPath)
{
- HANDLE fh = ::CreateFileA(
- lpszPath, GENERIC_READ,
+ HANDLE fh = ::CreateFile(lpszPath, GENERIC_READ,
FILE_SHARE_DELETE | FILE_SHARE_READ | FILE_SHARE_WRITE,
- 0, OPEN_EXISTING, 0, 0
- );
+ 0, OPEN_EXISTING, 0, 0);
if (fh == INVALID_HANDLE_VALUE)
return 0;
// get C runtime file descriptor from file handle
- int fd = ::_open_osfhandle((intptr_t)fh, _O_RDONLY);
+ int fd = _open_osfhandle((intptr_t)fh, _O_RDONLY);
if (fd == -1)
{
ATLTRACE("fopenReadRenameAllowed: _open_osfhandle failed\n");
@@ -206,11 +204,11 @@ }
// get C runtime FILE from file descriptor
- FILE* f = ::_fdopen(fd, "r");
+ FILE* f = _fdopen(fd, "r");
if (f == 0)
{
ATLTRACE("fopenReadRenameAllowed: _fdopen failed\n");
- ::_close(fd);
+ _close(fd);
return 0;
}
|
@@ -24,13 +24,13 @@ const LONGLONG llSecsBetweenEpochs = llDaysBetweenEpochs * 86400L;
const LONGLONG llDivisor = 10000000L;
- WIN32_FIND_DATAA data;
+ WIN32_FIND_DATA data;
HANDLE hFind;
- hFind = FindFirstFileA(lpszFile, &data);
+ hFind = ::FindFirstFile(lpszFile, &data);
if (hFind == INVALID_HANDLE_VALUE)
return -1;
- FindClose(hFind);
+ ::FindClose(hFind);
ullMTime = (((LONGLONG)data.ftLastWriteTime.dwHighDateTime << 32) +
data.ftLastWriteTime.dwLowDateTime);
|
Loading...