本文整理汇总了C++中IsWow64函数的典型用法代码示例。如果您正苦于以下问题:C++ IsWow64函数的具体用法?C++ IsWow64怎么用?C++ IsWow64使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了IsWow64函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: Main_ShowMountTab
static BOOL Main_ShowMountTab(void)
{
HKEY hk;
BOOL bShow = FALSE;
BOOL bSuccess = FALSE;
if (RegOpenKeyEx (HKEY_CURRENT_USER, AFSREG_USER_OPENAFS_SUBKEY, 0,
(IsWow64()?KEY_WOW64_64KEY:0)|KEY_QUERY_VALUE, &hk) == 0)
{
DWORD dwSize = sizeof(bShow);
DWORD dwType = REG_DWORD;
bSuccess = (RegQueryValueEx (hk, TEXT("ShowMountTab"), NULL, &dwType, (PBYTE)&bShow, &dwSize) == 0);
RegCloseKey (hk);
}
if (!bSuccess &&
RegOpenKeyEx (HKEY_LOCAL_MACHINE, AFSREG_CLT_OPENAFS_SUBKEY, 0,
(IsWow64()?KEY_WOW64_64KEY:0)|KEY_QUERY_VALUE, &hk) == 0)
{
DWORD dwSize = sizeof(bShow);
DWORD dwType = REG_DWORD;
bSuccess = (RegQueryValueEx (hk, TEXT("ShowMountTab"), NULL, &dwType, (PBYTE)&bShow, &dwSize) == 0);
RegCloseKey (hk);
}
return bShow;
}
开发者ID:snktagarwal,项目名称:openafs,代码行数:27,代码来源:window.cpp
示例2: Main_OnCheckTerminate
void Main_OnCheckTerminate (void)
{
HKEY hk;
BOOL bSuccess = FALSE;
if (RegOpenKeyEx (HKEY_CURRENT_USER, AFSREG_USER_OPENAFS_SUBKEY, 0,
(IsWow64()?KEY_WOW64_64KEY:0)|KEY_QUERY_VALUE, &hk) == 0)
{
DWORD dwSize = sizeof(g.fStartup);
DWORD dwType = REG_DWORD;
bSuccess = (RegQueryValueEx (hk, TEXT("ShowTrayIcon"), NULL, &dwType, (PBYTE)&g.fStartup, &dwSize) == 0);
RegCloseKey (hk);
}
if (bSuccess &&
RegOpenKeyEx (HKEY_LOCAL_MACHINE, AFSREG_CLT_OPENAFS_SUBKEY, 0,
(IsWow64()?KEY_WOW64_64KEY:0)|KEY_QUERY_VALUE, &hk) == 0)
{
DWORD dwSize = sizeof(g.fStartup);
DWORD dwType = REG_DWORD;
RegQueryValueEx (hk, TEXT("ShowTrayIcon"), NULL, &dwType, (PBYTE)&g.fStartup, &dwSize);
RegCloseKey (hk);
}
Shortcut_FixStartup (cszSHORTCUT_NAME, g.fStartup);
if (!g.fStartup)
Quit();
}
开发者ID:snktagarwal,项目名称:openafs,代码行数:29,代码来源:window.cpp
示例3: RegOpenKeyAlt
long
RegOpenKeyAlt(HKEY key, /* [in] open key from which to start */
const char *subKeyName, /* [in] sub key path */
DWORD mode, /* [in] desired access */
int create, /* [in] if set, creates key(s) on path */
HKEY *resultKeyP, /* [out] open key handle */
DWORD *resultKeyDispP) /* [out] open key disposition */
{
long status;
DWORD keyDisp = REG_OPENED_EXISTING_KEY;
if (key == AFSREG_NULL_KEY) {
/* No starting key; first path component must be predefined key.
* NOTE: predefined keys are always open (i.e., don't need opening).
*/
const char *tokenP = subKeyName + strspn(subKeyName, "\\");
size_t tokenSz = strcspn(tokenP, "\\");
if (!strncmp(tokenP, "HKEY_LOCAL_MACHINE", tokenSz))
key = HKEY_LOCAL_MACHINE;
else if (!strncmp(tokenP, "HKEY_CURRENT_USER", tokenSz))
key = HKEY_CURRENT_USER;
else if (!strncmp(tokenP, "HKEY_CURRENT_CONFIG", tokenSz))
key = HKEY_CURRENT_CONFIG;
else if (!strncmp(tokenP, "HKEY_USERS", tokenSz))
key = HKEY_USERS;
else if (!strncmp(tokenP, "HKEY_CLASSES_ROOT", tokenSz))
key = HKEY_CLASSES_ROOT;
else if (!strncmp(tokenP, "HKEY_PERFORMANCE_DATA", tokenSz))
key = HKEY_PERFORMANCE_DATA;
else if (!strncmp(tokenP, "HKEY_DYN_DATA", tokenSz))
key = HKEY_DYN_DATA;
else {
return ERROR_INVALID_PARAMETER;
}
subKeyName = tokenP + tokenSz + 1;
}
/* open (and possibly create) sub key */
if (create) {
status = RegCreateKeyEx(key, subKeyName,
(DWORD)0, "AFS", REG_OPTION_NON_VOLATILE,
(IsWow64()?KEY_WOW64_64KEY:0)|mode, NULL, resultKeyP, &keyDisp);
} else {
status = RegOpenKeyEx(key, subKeyName, (DWORD)0, (IsWow64()?KEY_WOW64_64KEY:0)|mode, resultKeyP);
}
if (resultKeyDispP) {
*resultKeyDispP = keyDisp;
}
return status;
}
开发者ID:bagdxk,项目名称:openafs,代码行数:54,代码来源:afsreg.c
示例4: GetWindowsDirectory
CString ConnectionLimit::WriteConnections(DWORD conns)
{
PVOID oldValue = NULL;
TCHAR windir[MAX_PATH];
GetWindowsDirectory(windir, MAX_PATH);
CString patchedFiles;
for(int i=0; i<3; ++i)
{
CString path(windir);
switch(i)
{
case 0:
path+=DIR_LOC;
break;
case 1:
path+=DIR_LOC_1;
break;
case 2:
path+=DIR_LOC_2;
break;
}
int id = GetBuildID(path);
CFile file;
DWORD dwOffset = 0;
dwOffset = GetOffset(path);
bool wasPatched = true;
if(IsWow64())
{
MyWow64DisableWow64FsRedirection(&oldValue);
}
if(file.Open(path,CFile::modeReadWrite))
{
if(IsWow64())
{
MyWow64RevertWow64FsRedirection(oldValue);
}
if(dwOffset)
{
file.Seek(dwOffset,CFile::begin);
file.Write(&conns, sizeof(conns));
file.Close();
DWORD checkSum = ComputeCheckSum(path);
patchedFiles+=path;
patchedFiles+="\n";
}
}
int err = GetLastError();
}
return patchedFiles;
}
开发者ID:christau,项目名称:xp-AntiSpy,代码行数:52,代码来源:ConnectionLimitNG.cpp
示例5: WinMain
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR pCmdLine,
int nCmdShow)
{
INT_PTR CALLBACK DialogProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
g_instance_handle = hInstance;
g_unicode_system = ::GetVersion() < DWORD(0x80000000);
if (!g_unicode_system)
{
::MessageBox(0, _T("Windows 9x/Me is not supported by this version of ExifPro. Please use ExifPro version 1.0."), g_INSTALLER, MB_ICONERROR | MB_OK);
return 0;
}
g_IsWindows64 = IsWow64();
::CoInitialize(nullptr);
::DialogBox(hInstance, MAKEINTRESOURCE(IDD_SETUP), nullptr, DialogProc);
::CoUninitialize();
return 0;
}
开发者ID:mikekov,项目名称:ExifPro,代码行数:26,代码来源:SetupApp.cpp
示例6: fs_utils_InitMountRoot
void fs_utils_InitMountRoot()
{
HKEY parmKey;
char mountRoot[MAX_PATH+1];
char *pmount=mountRoot;
DWORD len=sizeof(mountRoot)-1;
printf("int mountroot \n");
if ((RegOpenKeyExA(HKEY_LOCAL_MACHINE, AFSREG_CLT_SVC_PARAM_SUBKEY, 0,
(IsWow64()?KEY_WOW64_64KEY:0)|KEY_QUERY_VALUE, &parmKey)!= ERROR_SUCCESS)
|| (RegQueryValueExA(parmKey, "Mountroot", NULL, NULL,(LPBYTE)(mountRoot), &len)!= ERROR_SUCCESS)
|| (len==sizeof(mountRoot)-1)
)
strcpy(mountRoot, "\\afs");
RegCloseKey(parmKey);
mountRoot[len]=0; /*safety see ms-help://MS.MSDNQTR.2002OCT.1033/sysinfo/base/regqueryvalueex.htm*/
cm_mount_root=malloc(len+1);
cm_slash_mount_root=malloc(len+2);
cm_back_slash_mount_root=malloc(len+2);
if ((*pmount=='/') || (*pmount='\\'))
pmount++;
strcpy(cm_mount_root,pmount);
strcpy(cm_slash_mount_root+1,pmount);
cm_slash_mount_root[0]='/';
strcpy(cm_back_slash_mount_root+1,pmount);
cm_back_slash_mount_root[0]='\\';
}
开发者ID:chanke,项目名称:openafs-osd,代码行数:26,代码来源:fs_utils.c
示例7: EnableAutomation
CShellExt::CShellExt()
{
HKEY NPKey;
EnableAutomation();
nCMRefCount++;
HRESULT hr;
UINT code;
DWORD ShellOption,LSPsize,LSPtype;
m_overlayObject = 0;
hr = SHGetMalloc(&m_pAlloc);
m_bIsOverlayEnabled=FALSE;
if (FAILED(hr))
m_pAlloc = NULL;
RegOpenKeyEx(HKEY_LOCAL_MACHINE, AFSREG_CLT_SVC_PARAM_SUBKEY,0, (IsWow64()?KEY_WOW64_64KEY:0)|KEY_QUERY_VALUE, &NPKey);
LSPsize=sizeof(ShellOption);
code=RegQueryValueEx(NPKey, _T("ShellOption"), NULL,
&LSPtype, (LPBYTE)&ShellOption, &LSPsize);
RegCloseKey (NPKey);
m_bIsOverlayEnabled=((code==0) && (LSPtype==REG_DWORD) && ((ShellOption & OVERLAYENABLED)!=0));
INITCOMMONCONTROLSEX used = {
sizeof(INITCOMMONCONTROLSEX),
ICC_DATE_CLASSES | ICC_WIN95_CLASSES | ICC_BAR_CLASSES | ICC_USEREX_CLASSES
};
InitCommonControlsEx(&used);
TRACE("Create CShellExt, Ref count %d/n",nCMRefCount);
}
开发者ID:bagdxk,项目名称:openafs,代码行数:28,代码来源:shell_ext.cpp
示例8: OnlyXpAnd2003OsVersionCheck
bool OnlyXpAnd2003OsVersionCheck()
{
OSVERSIONINFOEX os;
if (IsWow64())
{
MessageBoxA(NULL,"Not Support 64bit","test",NULL);
return false;
}
os.dwOSVersionInfoSize=sizeof(os);
if(!GetVersionEx((OSVERSIONINFO *)&os))
{
MessageBoxA(NULL,"check os version fail",NULL,NULL);
return false;
}
//ver5.1 or 5.2
if (!(os.dwMajorVersion==5&&(os.dwMinorVersion==1||os.dwMinorVersion==2))
)
{
MessageBoxA(NULL,"this feature is only applied for xp or 2003",NULL,NULL);
return false;
}
return true;
}
开发者ID:wtxpwh,项目名称:cyber-interceptor,代码行数:28,代码来源:CommFun.cpp
示例9: Windows_Is_WOW64
void Windows_Is_WOW64(sLONG_PTR *pResult, PackagePtr pParams)
{
C_LONGINT returnValue;
returnValue.setIntValue(IsWow64());
returnValue.setReturn(pResult);
}
开发者ID:UNIVERSAL-IT-SYSTEMS,项目名称:4d-plugin-get-windows-version,代码行数:7,代码来源:4DPlugin.cpp
示例10: delInfomationKeybyWinAPI
bool delInfomationKeybyWinAPI()
{
TCHAR cadKey[MAX_PATH];
_tcscpy(cadKey, _T("Software\\Autodesk\\AutoCAD\\R18.0\\ACAD-8001:804\\InfoCenter"));
DWORD dwAccess = KEY_ALL_ACCESS;
//判断是否64位
if(IsWow64() == TRUE)
{
dwAccess |= KEY_WOW64_64KEY;
}
CRegistry reg;
bool ret = reg.Open( cadKey, HKEY_CURRENT_USER, dwAccess);
if(ret)
{
ret = false;
if(reg.Count()>0)
{
int n = reg.Count();
for(int i=0;i<n;i++)
{
CRegEntry* entry = reg.GetAt(i);
if(QString::compare(_T("InfoCenterOn"), entry->lpszName, Qt::CaseInsensitive) == 0)
{
*entry = 1;
ret = true; break;
}
}
}
}
reg.Close();
return ret;
}
开发者ID:yuechuanbingzhi163,项目名称:GDES,代码行数:35,代码来源:CADHelper.cpp
示例11: writeTestKeybyWinAPI
bool writeTestKeybyWinAPI(QString& cadPath)
{
TCHAR cadKey[MAX_PATH];
_tcscpy(cadKey, _T("Software\\Autodesk\\AutoCAD\\R18.0\\ACAD-8001:804\\Applications\\test"));
DWORD dwAccess = KEY_ALL_ACCESS;
//判断是否64位
if(IsWow64() == TRUE)
{
dwAccess |= KEY_WOW64_64KEY;
}
CRegistry reg;
bool ret = reg.Open( cadKey, HKEY_LOCAL_MACHINE, dwAccess);
if(ret)
{
//if(reg.Count()>0)
//{
reg[_T("LOADCTRLS")] = (DWORD)2;
cadPath.append("\\VVLoader.arx");
reg[_T("LOADER")] = cadPath.toStdString();
//}
}
reg.Close();
return ret;
}
开发者ID:yuechuanbingzhi163,项目名称:GDES,代码行数:27,代码来源:CADHelper.cpp
示例12: IsW64
BOOL IsW64()
{
#ifdef _WIN64
return TRUE;
#endif
return IsWow64();
}
开发者ID:Tphive,项目名称:mpc-be,代码行数:8,代码来源:SysVersion.cpp
示例13:
bool Check64::isRunning64Bit()
{
if (IsWow64()) {
return true;
}
return false;
}
开发者ID:iBeacons,项目名称:NTUMEMSOpenVPN,代码行数:8,代码来源:check64.cpp
示例14: defined
bool SelfTest::Is64OS()
{
#if defined(_M_X64) || defined(x86_64)
return true;
#else
return IsWow64() == true;
#endif
}
开发者ID:JetBrains,项目名称:runAs,代码行数:8,代码来源:SelfTest.cpp
示例15: getUserAgent
std::string getUserAgent()
{
std::stringstream userAgent;
// ASEPRITE name and version
userAgent << PACKAGE << "/" << VERSION << " (";
#if _WIN32
// ----------------------------------------------------------------------
// Windows
OSVERSIONINFOEX osv;
osv.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
::GetVersionEx((OSVERSIONINFO*)&osv);
userAgent << "Windows";
switch (osv.wProductType) {
case VER_NT_DOMAIN_CONTROLLER:
case VER_NT_SERVER:
userAgent << " Server";
break;
case VER_NT_WORKSTATION:
userAgent << " NT";
break;
}
userAgent << " " << osv.dwMajorVersion << "." << osv.dwMinorVersion;
if (osv.wServicePackMajor > 0)
userAgent << " SP" << osv.wServicePackMajor;
if (IsWow64())
userAgent << "; WOW64";
#elif __APPLE__
// ----------------------------------------------------------------------
// Mac OS X
int major, minor, bugFix;
getMacOSXVersion(&major, &minor, &bugFix);
userAgent << "Mac OS X " << major << "." << minor << "." << bugFix;
#else
// ----------------------------------------------------------------------
// Unix like
struct utsname utsn;
uname(&utsn);
userAgent << utsn.sysname << " " << utsn.release;
#endif
userAgent << ")";
return userAgent.str();
}
开发者ID:1007650105,项目名称:aseprite,代码行数:58,代码来源:user_agent.cpp
示例16: InitDriverInfo
DWORD InitDriverInfo()
{
OSVERSIONINFO osvi;
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
GetVersionEx(&osvi);
switch(osvi.dwPlatformId)
{
case VER_PLATFORM_WIN32s:
gDriverType = OLS_DRIVER_TYPE_UNKNOWN;
return OLS_DLL_UNSUPPORTED_PLATFORM;
break;
case VER_PLATFORM_WIN32_WINDOWS:
_tcscpy_s(gDriverFileName, MAX_PATH, OLS_DRIVER_FILE_NAME_WIN_9X);
gDriverType = OLS_DRIVER_TYPE_WIN_9X;
return OLS_DLL_NO_ERROR;
break;
case VER_PLATFORM_WIN32_NT:
#ifdef _WIN64
#ifdef _M_X64
_tcscpy_s(gDriverFileName, MAX_PATH, OLS_DRIVER_FILE_NAME_WIN_NT_X64);
gDriverType = OLS_DRIVER_TYPE_WIN_NT_X64;
#else // IA64
_tcscpy_s(gDriverFileName, MAX_PATH, OLS_DRIVER_FILE_NAME_WIN_NT_IA64);
gDriverType = OLS_DRIVER_TYPE_WIN_NT_IA64;
return OLS_DLL_UNSUPPORTED_PLATFORM;
#endif
#else
if(IsWow64())
{
if(IsX64())
{
_tcscpy_s(gDriverFileName, MAX_PATH, OLS_DRIVER_FILE_NAME_WIN_NT_X64);
gDriverType = OLS_DRIVER_TYPE_WIN_NT_X64;
}
else
{
_tcscpy_s(gDriverFileName, MAX_PATH, OLS_DRIVER_FILE_NAME_WIN_NT_IA64);
gDriverType = OLS_DRIVER_TYPE_WIN_NT_IA64;
return OLS_DLL_UNSUPPORTED_PLATFORM;
}
}
else
{
_tcscpy_s(gDriverFileName, MAX_PATH, OLS_DRIVER_FILE_NAME_WIN_NT);
gDriverType = OLS_DRIVER_TYPE_WIN_NT;
}
#endif
return OLS_DLL_NO_ERROR;
break;
default:
gDriverType = OLS_DRIVER_TYPE_UNKNOWN;
return OLS_DLL_UNKNOWN_ERROR;
break;
}
}
开发者ID:wyrover,项目名称:book-code,代码行数:56,代码来源:OlsDll.cpp
示例17: main
int main( void )
{
IsWow64();
getchar();
IsWow64_TA();
getchar();
RegRedirectionTest();
FsRedirectionTest();
return 0;
}
开发者ID:340211173,项目名称:LookDrvCode,代码行数:10,代码来源:main.c
示例18: SaveRemind
void SaveRemind (size_t iCreds)
{
HKEY hk;
if (RegCreateKeyEx (HKEY_CURRENT_USER, AFSREG_USER_OPENAFS_SUBKEY "\\Reminders", 0, NULL, 0,
(IsWow64()?KEY_WOW64_64KEY:0)|KEY_WRITE, NULL, &hk, NULL) == 0)
{
DWORD dwValue = g.aCreds[ iCreds ].fRemind;
RegSetValueEx (hk, g.aCreds[ iCreds ].szCell, NULL, REG_DWORD, (PBYTE)&dwValue, sizeof(DWORD));
RegCloseKey (hk);
}
}
开发者ID:chanke,项目名称:openafs-osd,代码行数:11,代码来源:misc.cpp
示例19: wcscpy
int ConnectionLimit::GetBuildID(LPCTSTR file)
{
DWORD dwLen, dwUseless;
LPTSTR lpVI;
TCHAR path[MAX_PATH];
wcscpy(path,file);
PVOID pOldValue = NULL;
if (IsWow64())
{
int ret = MyWow64DisableWow64FsRedirection(&pOldValue);
}
dwLen = GetFileVersionInfoSize(path, &dwUseless);
if (dwLen==0)
return 0;
lpVI = (LPTSTR) malloc(dwLen);
int buildNo=0;
if (lpVI)
{
DWORD dwBufSize;
VS_FIXEDFILEINFO* lpFFI;
BOOL bRet = FALSE;
GetFileVersionInfo(path, NULL, dwLen, lpVI);
if (VerQueryValue(lpVI, _T("\\"),(LPVOID*) &lpFFI, (UINT*) &dwBufSize))
{
buildNo = LOWORD(lpFFI->dwProductVersionLS);
}
else
return 0;
free(lpVI);
}
if (IsWow64())
{
MyWow64RevertWow64FsRedirection(pOldValue);
}
return buildNo;
}
开发者ID:christau,项目名称:xp-AntiSpy,代码行数:41,代码来源:ConnectionLimitNG.cpp
示例20: _T
int ConnectionLimit::GetMaxConnections(LPCTSTR path)
{
if(CAntiSpySettings::GetSuiteType() == CAntiSpySettings::SUITE_TYPE::WINDOWS_VISTA)
{
CString val = CAntiSpySettings::GetRegKeyValue(HKEY_LOCAL_MACHINE, _T("SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters"),_T("TcpNumConnections"),REG_DWORD);
if(val.IsEmpty())
return 0;
int conns = _wtoi(val);
}
else
{
PVOID oldValue = NULL;
DWORD conns = 0;
int id = GetBuildID(path);
CFile file;
DWORD dwOffset = 0;
dwOffset = GetOffset(path);
if(IsWow64())
{
if(MyWow64DisableWow64FsRedirection(&oldValue) != TRUE)
return -1;
}
if(!file.Open(path, CFile::modeRead))
{
MyWow64RevertWow64FsRedirection(oldValue);
return -1;
}
if(IsWow64())
{
MyWow64RevertWow64FsRedirection(oldValue);
}
if(dwOffset)
{
file.Seek(dwOffset, CFile::begin);
file.Read(&conns,sizeof(conns));
}
file.Close();
return conns;
}
}
开发者ID:christau,项目名称:xp-AntiSpy,代码行数:40,代码来源:ConnectionLimitNG.cpp
注:本文中的IsWow64函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论