1. 问题描述
用 IDA 打开libcurl.dll 可以在导入表看到对 GetTickCount64的引用,在 xp 的kernel32.dll中没有 GetTickCount64,
所以会出现 无法定位 GetTickCount64的问题
2. 解决方法
下载源码,自己编译libcurl.dll
https://curl.haxx.se/download/curl-7.50.3.tar.gz
2.2 打开 Visual Studio 2015 x64 x86 兼容工具命令提示符
注释掉以下文件中和 GetTickCount64有关的代码
{CURL_SRC}\lib\timeval.c
struct timeval curlx_tvnow(void)
** GetTickCount() is available on _all_ Windows versions from W95 up
** to nowadays. Returns milliseconds elapsed since last system boot,
** increases monotonically and wraps once 49.7 days have elapsed.
struct timeval now;
<span style="color:#ff0000;">//#if !defined(_WIN32_WINNT) || !defined(_WIN32_WINNT_VISTA) || \
(_WIN32_WINNT < _WIN32_WINNT_VISTA)</span>
DWORD milliseconds = GetTickCount();
now.tv_sec = milliseconds / 1000;
now.tv_usec = (milliseconds % 1000) * 1000;
<span style="color:#ff0000;">/*#else
ULONGLONG milliseconds = GetTickCount64();
now.tv_sec = (long) (milliseconds / 1000);
now.tv_usec = (long) (milliseconds % 1000) * 1000;
#endif*/</span>
return now;
}
{CURL_SRC}\src\tool_util.c
struct timeval tool_tvnow(void)
** GetTickCount() is available on _all_ Windows versions from W95 up
** to nowadays. Returns milliseconds elapsed since last system boot,
** increases monotonically and wraps once 49.7 days have elapsed.
** GetTickCount64() is available on Windows version from Windows Vista
** and Windows Server 2008 up to nowadays. The resolution of the
** function is limited to the resolution of the system timer, which
** is typically in the range of 10 milliseconds to 16 milliseconds.
struct timeval now;
<span style="color:#ff0000;">/*#if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0600)
ULONGLONG milliseconds = GetTickCount64();
#else*/</span>
DWORD milliseconds = GetTickCount();
<span style="color:#ff0000;">//#endif</span>
now.tv_sec = (long)(milliseconds / 1000);
now.tv_usec = (milliseconds % 1000) * 1000;
return now;
为了让vs2015编译的程序能在xp下运行,,需要修改{CURL_SRC}\winbuild\MakefileBuild.vc
CFLAGS = /I. /I ../lib /I../include /nologo /W3 /EHsc /DWIN32 /FD /c /DBUILDING_LIBCURL <span style="color:#ff0000;">/D_USING_V110_SDK71_</span>
CURL_CFLAGS = /I../lib /I../include /nologo /W3 /EHsc /DWIN32 /FD /c <span style="color:#ff0000;">/D_USING_V110_SDK71_</span>
CURL_LFLAGS = /nologo /out:$(DIRDIST)\bin\$(PROGRAM_NAME) <span style="color:#ff0000;">/subsystem:console,"5.01"</span> /machine:$(MACHINE)
在 Visual Studio 2015 x64 x86 兼容工具命令提示符下输入命令;
nmake /f Makefile.vc mode=dll MACHINE=x86 ENABLE_WINSSL=no ENABLE_IDN=no ENABLE_SSPI=no
编译成功后在 {CURL_SRC}\builds 目录生成目标文件.
1. 问题描述用 IDA 打开libcurl.dll 可以在导入表看到对 GetTickCount64的引用,在 xp 的kernel32.dll中没有 GetTickCount64,所以会出现 无法定位 GetTickCount64的问题2. 解决方法下载源码,自己编译libcurl.dll 编译环境:Win7 64位系统 + vs2015
编写的应用软件在XP系统环境工作时提示“无法定位程序输入点GetTickCount64 在动态链接库kernel32.dll上”。
解决办法既是在头文件添加如下代码:
#ifdef _WIN32_WINNT
#undef _WIN32_WINNT
#endif
#define _WIN32_WINNT 0x0600
即可解决问题。
参考链接:
“无法定位程序输入点GetTickCoun...
ULONGLONG lastTick =
GetTickCount64();
Sleep(2000);
ULONGLONG nowTick =
GetTickCount64();
if(lastTick-nowTick>3500)
//永远不会走这里
}else
//会一直走这是
//要改成这样
if (nowTick >= lastTick + 3500){
else{
GetTickCount64API 要求在Vista/2008以上系统使用
一下方法使用API 高精度计数器 和 GetTickCount 等多种方式实现GetTickCount64的功能
struct _tagGlobalTickCount_t
//API ULONGLONG WINAPI GetTickCount64(void);
typedef ULONGLONG (WI
转载自:http://blog.csdn.net/keljony/article/details/44017775
由于某些原因项目1中用到的boost库从boost_1_39升级到boost_1_55,升级完成后将程序放在xp下测试,提示找不到GetTickCount64()函数,整合工程却没有发现哪调用了此函数,最后在boost官网上早有人提到了这个问题。
branches/rel
1.问题背景
项目中有一项功能:根据dll文件里面定义的规则对txt文件进行相应的解析。
项目是在win7,64位环境下的一个c#项目,功能完成后在win7下运行正常,但在xp环境(sp3)下却出现如下问题:
2.解决方案
在网上查阅了很多资料,但有些方案并不适合于c#的项目,最终在不懈努力下终于找到了突破口。
如果是c/c++的项目可以参考这个解决方案:
https://www.cnblogs...
要下载libcurl.dll文件,可以先到Curl官网上选择适合自己操作系统版本的curl文件进行下载。针对W10 64位系统,可以在curl官网上选择64位Windows版本进行下载。将下载的文件解压后,可以在bin文件夹中找到libcurl.dll文件。如果下载的curl文件中没有提供libcurl.dll文件,可以在网上通过搜索“libcurl.dll下载”找到合适的资源进行下载。但需要注意的是,下载的dll文件可能存在安全风险,需根据个人需求谨慎选择。
下载libcurl.dll文件的目的可能是为某个软件或应用添加网络功能,要确保将文件放在正确的位置。将文件复制到Windows\System32文件夹下即可,这个文件夹通常包含系统的重要dll文件,可确保应用程序可以正确地访问libcurl.dll文件。
总之,在下载和使用dll文件时,一定要注意安全,确保文件来源可靠,并按照正确的步骤进行下载和使用,以免对计算机系统造成损害。