代码拉取完成,页面将自动刷新
同步操作将从 openGauss/openGauss-connector-odbc 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
/*------
* Module: xalibname.c
*
* Description:
* This module gets the (path) name of xalib.
*
*-------
*/
#ifdef _HANDLE_ENLIST_IN_DTC_
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0400
#endif /* _WIN32_WINNT */
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
extern HMODULE s_hModule;
static char xalibpath[_MAX_PATH] = "";
static char xalibname[_MAX_FNAME] = "";
static const char * const PGMFILES = "Program Files";
static const char * const PGMFILESX86 = "Program Files (x86)";
typedef BOOL (WINAPI *LPFN_ISWOW64PROCESS) (HANDLE, PBOOL);
LPFN_ISWOW64PROCESS fnIsWow64Process;
BOOL IsWow64()
{
static BOOL bCalled = FALSE;
static BOOL bIsWow64 = FALSE;
if (bCalled)
return bIsWow64;
fnIsWow64Process = (LPFN_ISWOW64PROCESS) GetProcAddress(
GetModuleHandle("kernel32"), "IsWow64Process");
if (NULL != fnIsWow64Process)
{
if (!fnIsWow64Process(GetCurrentProcess(), &bIsWow64))
{
//handle error
}
}
bCalled = TRUE;
return bIsWow64;
}
const char *GetXaLibName(void)
{
char dllpath[_MAX_PATH], drive[_MAX_DRIVE], dir[_MAX_DIR],
fname[_MAX_FNAME], ext[_MAX_EXT];
if (!xalibpath[0])
{
size_t pgmflen = strlen(PGMFILESX86);
char *ptr;
GetModuleFileName(s_hModule, dllpath, sizeof(dllpath));
/* In Windows XP SP2, the dllname should be specified */
/* instead of the dll path name, because it looks up */
/* the HKLM\Microfost\MSDTC\XADLL\(dllname) registry */
/* entry for security reason. */
_splitpath(dllpath, drive, dir, fname, ext);
strncpy(xalibname, "pgxalib.dll", sizeof(xalibname));
if (IsWow64())
{
if ('\\' == *dir &&
0 == _strnicmp(dir + 1, PGMFILESX86, pgmflen))
{
ptr = dir + 1 + pgmflen;
if ('\\' == *ptr)
_snprintf(xalibpath, sizeof(xalibpath), "%s\\%s%s%s", drive, PGMFILES, ptr, xalibname);
}
}
else
_snprintf(xalibpath, sizeof(xalibpath), "%s%s%s", drive, dir, xalibname);
}
return xalibname;
}
const char *GetXaLibPath(void)
{
GetXaLibName();
return xalibpath;
}
#endif /* _HANDLE_ENLIST_IN_DTC_ */
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。