向后兼容性问题 [英] Backward Compatability issue

查看:139
本文介绍了向后兼容性问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好专家,
使用VC9.0创建了一个DLL,并尝试在VC6.0/VC8.0中使用该DLL.但是它没有按预期工作.以这样的方式进行编程:编译器不对方法名称进行任何名称修饰.我也使用"Dependency Walker"验证了DLL函数的名称.

我想了解分步过程,如何确保我的DLL在所有目标计算机(VC6.0,VC7.0和VC8.0)上都能正常运行

谢谢,
Sankar.

Hello Experts,
Created a DLL using VC9.0 and trying to make use of that DLL in VC6.0/VC8.0. But it doesn''t work as expected. Programmed in such a way that the compiler doesn''t do any name decoration for the method names. I verified the DLL function names using "Dependency Walker" also.

I would like to know the step by step procedure, how to make sure that my DLL works in all target machines (VC6.0, VC7.0 & VC8.0)

Thanks,
Sankar.

推荐答案

KarstenK,
我知道静态和动态链接DLL.但是这里的问题是它在以下情况下不起作用,

1)使用VC9.0创建DLL,使得它不会对函数名称进行任何名称修饰.

2)尝试在VC8.0或VC6.0中使用该DLL.我尝试了两种链接DLL的方式,但是都行不通.相同的DLL在使用VC9.0构建的应用程序中也可以正常工作.

问候,
Sankar.
Hi KarstenK,
I am aware of linking a DLL statically and dynamically. But the problem here is it doesn''t work in the following scenario,

1) Created a DLL using VC9.0 in such a way that it doesn''t do any name decoration to function names.

2) Tried to make use of that DLL in VC8.0 or VC6.0. I tried both of ways of linking a DLL, But it doesn''t work. The same DLL works fine with an application built using VC9.0.

Regards,
Sankar.


您需要静态链接并使用未修饰的名称.

并使用GetProcAddress在LoadLibary之后获取指向该函数的指针.

玩得很开心...;-)
you need to link staticly and use undecorated names.

And use GetProcAddress to get a pointer to the function after LoadLibary.

Have a lot of fun... ;-)


这篇关于向后兼容性问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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