BCB5写的程序,在NT4, WIN95下面不能运行

老魏2006 2001-12-14 01:51:34
BCB写的一个DLL,使用了ATL,编译后,发现引用了一个API函数:GetLongPathNameA。但是该函数在Win95, NT4下面没有实现,所以,DLL不能在NT4, 95运行(初始化错误),该怎么解决这个问题?
谢谢!
...全文
114 11 打赏 收藏 转发到动态 举报
写回复
用AI写文章
11 条回复
切换为时间正序
请发表友善的回复…
发表回复
lama 2001-12-20
  • 打赏
  • 举报
回复
我在win98 和win XP下编译的,在win95下出现同样的问题,有时么好办法吗?
比如在win95下安装一些运行库?
老魏2006 2001-12-17
  • 打赏
  • 举报
回复
没有人知道吗?
gxgxfish0813 2001-12-17
  • 打赏
  • 举报
回复
感觉
老魏2006 2001-12-17
  • 打赏
  • 举报
回复
谢谢NowCan,我去试一试。
NowCan 2001-12-17
  • 打赏
  • 举报
回复
你是不是在win2000下编译的?
试试在WinNT下编译看看。
老魏2006 2001-12-16
  • 打赏
  • 举报
回复
这些内容我都知道。我在自己的程序里面,并没有调用GetLongPathName,可能是ATL或者BCB自己调用了。我现在想只知道的,就是怎么避免这个问题。

to eyestrong(国王与小鸟):
GetLongPathNameA是GetLongPathName的Ansi形式。
still_me 2001-12-15
  • 打赏
  • 举报
回复
好好研究!
eyestrong 2001-12-15
  • 打赏
  • 举报
回复
DWORD GetLongPathName(
LPCTSTR lpszShortPath, // file name
LPTSTR lpszLongPath, // path buffer
DWORD cchBuffer // size of path buffer
);

Return Values
If the function succeeds, the return value is the length of the string copied to the lpszLongPath parameter, in TCHARs. This length does not include the terminating null character.

If lpszLongPath is too small, the function returns the size, in TCHARs, of the buffer required to hold the long path.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

这是MSDN中对这个函数的解释(部分)。它可以用在win2000下,但函数名是GetLongPathName,而不是GetLongPathNameA。:(

kingfish 2001-12-15
  • 打赏
  • 举报
回复
MSDN:
Windows NT: Requires version 5.0 or later.
GaoYang 2001-12-14
  • 打赏
  • 举报
回复
有意思,回去试试看。
老魏2006 2001-12-14
  • 打赏
  • 举报
回复
谢谢!

13,824

社区成员

发帖
与我相关
我的任务
社区描述
C++ Builder相关内容讨论区
社区管理员
  • 基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧