XP下LoadLibrary为何为 错误 1400? 无效的窗口句柄??

void_main_void 2016-02-16 03:01:42
XP下 LoadLibrary 为何为 错误 1400? 无效的窗口句柄??
...全文
153 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
赵4老师 2016-02-17
  • 打赏
  • 举报
回复
在64位Windows下: 64位exe和dll在目录c:\windows\system32目录下; 32位exe和dll在目录c:\windows\syswow64目录下; 所以要注意: 在win64位系统下注册32位ocx或dll需要将32位ocx或dll拷贝到c:\windows\syswow64\目录下。 且注册要用c:\windows\syswow64\regsvr32 xxxxxxx.ocx或dll
void_main_void 2016-02-17
  • 打赏
  • 举报
回复
引用 5 楼 paschen 的回复:
GetLastError
GetLastErr 返回值 1400.. 用那啥错误工具说就是 无效窗口句柄啊。。
paschen 2016-02-17
  • 打赏
  • 举报
回复
GetLastError
void_main_void 2016-02-17
  • 打赏
  • 举报
回复
引用 2 楼 baidu_33932448 的回复:
窗口句柄没传过去。要不就是看你在那里load了。如果对话框没有创建或者init完成。那是没有句柄的。
引用 3 楼 oyljerry 的回复:
你是否拿到了正确的句柄。
一定得要加载完窗口才能正常LoadLibrary吗?。。。 因为是在XP下【某些】(具体不明)的机器上可能会出现。。 句柄返回为NULL。
void_main_void 2016-02-17
  • 打赏
  • 举报
回复
引用 7 楼 zhao4zhong1 的回复:
在64位Windows下: 64位exe和dll在目录c:\windows\system32目录下; 32位exe和dll在目录c:\windows\syswow64目录下; 所以要注意: 在win64位系统下注册32位ocx或dll需要将32位ocx或dll拷贝到c:\windows\syswow64\目录下。 且注册要用c:\windows\syswow64\regsvr32 xxxxxxx.ocx或dll
不对,。。突然想起 是否是 缺少其他调用DLL。。 恩。。 如果出现了1400 很有可能是缺少了其他的DLL。用Depends看下是否会使用其他的DLL。
oyljerry 2016-02-16
  • 打赏
  • 举报
回复
你是否拿到了正确的句柄。
  • 打赏
  • 举报
回复
窗口句柄没传过去。要不就是看你在那里load了。如果对话框没有创建或者init完成。那是没有句柄的。
赵4老师 2016-02-16
  • 打赏
  • 举报
回复
LoadLibrary The LoadLibrary function maps the specified executable module into the address space of the calling process. HINSTANCE LoadLibrary( LPCTSTR lpLibFileName // address of filename of executable module ); Parameters lpLibFileName Pointer to a null-terminated string that names the executable module (either a .DLL or .EXE file). The name specified is the filename of the module and is not related to the name stored in the library module itself, as specified by the LIBRARY keyword in the module-definition (.DEF) file. If the string specifies a path but the file does not exist in the specified directory, the function fails. When specifying a path, be sure to use backslashes (\), not forward slashes (/). If the string does not specify a path, the function uses a standard search strategy to find the file. See the Remarks for more information. Return Values If the function succeeds, the return value is a handle to the module. If the function fails, the return value is NULL. To get extended error information, call GetLastError.

16,471

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC相关问题讨论
社区管理员
  • 基础类社区
  • Web++
  • encoderlee
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……

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