我正在研究在Windows CE7上编写安全控制器的可能性。生产dongle的公司并没有明确声明支持Windows,但是根据他们的销售人员,应该支持Windows。dongle使用一个导入库(.lib),它引用具有我想要使用的函数的.dll。通过查看.dll的dumpbin /headers头信息,我可以看到.dll是为x86 (14c)编译的,子系统是Windows GUI。作为参考,我在Windows设备上使用的.dlls是为拇指(1c2,ARM afaik)编译的,并且有子系统Windows CE GUI。
下面是dumpbin命令的缩短输出。
Microsoft (R) COFF/PE Dumper Version 9.00.30729.01
Copyright (C) Microsoft Corporation. All rights reserved.
Dump of file <name removed>.dll
PE signature found
File Type: DLL
FILE HEADER VALUES
14C machine (x86)
5 number of sections
502875ED time date stamp Mon Aug 13 12:35:09 2012
0 file pointer to symbol table
0 number of symbols
E0 size of optional header
210E characteristics
Executable
Line numbers stripped
Symbols stripped
32 bit word machine
DLL
OPTIONAL HEADER VALUES
10B magic # (PE32)
6.00 linker version
A000 size of code
C000 size of initialized data
0 size of uninitialized data
4EA2 entry point (10004EA2)
1000 base of code
B000 base of data
10000000 image base (10000000 to 10016FFF)
1000 section alignment
1000 file alignment
4.00 operating system version
0.00 image version
4.00 subsystem version
0 Win32 version
17000 size of image
1000 size of headers
1A38F checksum
2 subsystem (Windows GUI)
0 DLL characteristics
100000 size of stack reserve
1000 size of stack commit
100000 size of heap reserve
1000 size of heap commit
0 loader flags
10 number of directories
BED0 [ D9] RVA [size] of Export Directory
B770 [ 50] RVA [size] of Import Directory
14000 [ 7C8] RVA [size] of Resource Directory
0 [ 0] RVA [size] of Exception Directory
12000 [ 17D0] RVA [size] of Certificates Directory
15000 [ 990] RVA [size] of Base Relocation Directory
0 [ 0] RVA [size] of Debug Directory
0 [ 0] RVA [size] of Architecture Directory
0 [ 0] RVA [size] of Global Pointer Directory
0 [ 0] RVA [size] of Thread Storage Directory
0 [ 0] RVA [size] of Load Configuration Directory
0 [ 0] RVA [size] of Bound Import Directory
B000 [ 144] RVA [size] of Import Address Table Directory
0 [ 0] RVA [size] of Delay Import Directory
0 [ 0] RVA [size] of COM Descriptor Directory
0 [ 0] RVA [size] of Reserved Directory这是我第一次像这样分析dlls和lib,所以我对它们不太熟悉。
如果为
之外,是否有可能让dll在Windows上运行?
发布于 2020-08-07 06:48:28
我联系了供应商,看起来销售人员给我转发了一套错误的DLL。实际上,它们有一组针对Windows CE6编译的DLL。我测试过了,它看起来很有效。为了直接回答我的问题,我是以@Peter的评论为基础的。您不能在Windows上使用x86-DLL,因为Windows不理解x86-机器代码。相反的情况也是一样。理论上,您可以实现某种类型的仿真层来完成转换,但最简单的选择仍然是要求供应商为Windows重新编译。
https://stackoverflow.com/questions/63293305
复制相似问题