在64位系统中的C#PInvoking user32.dll中 [英] C# PInvoking user32.dll on a 64 bit system

查看:889
本文介绍了在64位系统中的C#PInvoking user32.dll中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是错误的的PInvoke user32.dll中的64位Windows,从64位应用程序?我这样做成功了很多次,从未发生过的错误,但它似乎是矛盾的。我应该找user64.dll呢?

Is it wrong to pinvoke user32.dll on 64 bit Windows, from a 64 bit app? I've done this successfully a number of times and never had an error, but it seems contradictory. Should I look for user64.dll instead?

推荐答案

名称 user32.dll中是一种误导。这是64位版本的 user32.dll中你打电话的。 64位版本位于%WINDIR%\ SYSTEM32 \ user32.dll中

The name user32.dll is misleading. It's the 64 bit version of user32.dll you're calling. The 64 bit version is located at %windir%\System32\user32.dll.

一个32位版本是为了与32位应用程序的兼容性。它位于%WINDIR%\ Syswow64资料\ user32.dll中。您可以使用 DUMPBIN 工具检查他们:

A 32-bit version is included for compatibility with 32-bit applications. It's located at %windir%\SysWOW64\user32.dll. You can inspect them using the dumpbin utility:

SYSTEM32 \ user32.dll中:

System32\user32.dll:

FILE HEADER VALUES
        8664 machine (x64)

Syswow64资料\ user32.dll中:

SysWOW64\user32.dll:

FILE HEADER VALUES
         14C machine (x86)

这篇关于在64位系统中的C#PInvoking user32.dll中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆