静态库中的__fastcall函数,无法从托管代码调用? [英] __fastcall functions in a static lib, cant be called from managed code ??

查看:64
本文介绍了静态库中的__fastcall函数,无法从托管代码调用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这个巨大的库,它是静态的,它全部用__fastcall编译

时尚。

我无法调用任何这些函数来自winforms ......

即使在主要课程中做一个包装,我仍然无法称之为....

如何克服这个问题?

I have this giant library, it''s static and it''s all compiled in __fastcall
fashion.
I can not call any of those functions from winforms...
even doing a wrapper off the main class, I still cant call it....
how do I overcome this issue ?

推荐答案

怎么样


[DllImport(" test.dll",CallingConvention = CallingConvention.FastCall)]


-

cody


免费工具,游戏和幽默
http://www.deutronium.de.vu || http://www.deutronium.tk

" andrea卡托 '' " <交流**** @ dataflight.com> schrieb im Newsbeitrag

新闻:u0 ************** @ tk2msftngp13.phx.gbl ...
What about

[DllImport("test.dll", CallingConvention=CallingConvention.FastCall)]

--
cody

Freeware Tools, Games and Humour
http://www.deutronium.de.vu || http://www.deutronium.tk
"andrea catto''" <ac****@dataflight.com> schrieb im Newsbeitrag
news:u0**************@tk2msftngp13.phx.gbl...
我有这个巨大的图书馆,它是静态的,它全部用__fastcall
方式编译。
我不能从winforms调用任何这些函数......
甚至在主类上做一个包装器,我仍然不能称之为....
我如何克服这个问题?
I have this giant library, it''s static and it''s all compiled in __fastcall
fashion.
I can not call any of those functions from winforms...
even doing a wrapper off the main class, I still cant call it....
how do I overcome this issue ?



我听到你了,

问题是。

对于我们大多数转型期的开发人员来说都有很多代码/遗产.....


我们我们不鼓励他们迁移,因为有太多的事情要做。

迁移/迁移!!!


就我听到的而言我可以透明地和IJW一起顺利地进行这种转换,但在我的情况下,它只是营销嗡嗡声...它更像是IJDW (它只是不起作用)。


在我当前的程序中,

我只需#include mylib.h,将static.lib添加到项目

设置中,我最后调用该死的函数。

" cody" <无**************** @ gmx.net>在留言中写道

news:OU ************** @ tk2msftngp13.phx.gbl ...
I hear you,
the problem is.
for most of us developers in transition with a bunch of code/legacy.....

we are not encouraged to migrate because there''s WAY too much to do to
migrate/migrane !!!

as far as I heard it''s possible to do this transition smoothly and
transparently, with IJW, but in my case it''s just marketing buzz... it''s
more like IJDW (it just doesn''t work).

in my current programs,
I only need to #include "mylib.h", add the static.lib to the project
settings and I finally call the damn function.
"cody" <no****************@gmx.net> wrote in message
news:OU**************@tk2msftngp13.phx.gbl...
怎么样?br / >
[DllImport(" test.dll",CallingConvention = CallingConvention.FastCall)]

-
cody

免费软件工具,游戏和幽默
http://www.deutronium.de.vu || http://www.deutronium.tk
andrea catto''" ; <交流**** @ dataflight.com> schrieb im Newsbeitrag
新闻:u0 ************** @ tk2msftngp13.phx.gbl ...
What about

[DllImport("test.dll", CallingConvention=CallingConvention.FastCall)]

--
cody

Freeware Tools, Games and Humour
http://www.deutronium.de.vu || http://www.deutronium.tk
"andrea catto''" <ac****@dataflight.com> schrieb im Newsbeitrag
news:u0**************@tk2msftngp13.phx.gbl...
我有这个巨大的图书馆,它'' s静态,它全部用
__fastcall方式编译。
我不能从winforms调用任何这些函数......
即使在主类上做一个包装,我仍然无法叫它....
如何克服这个问题?
I have this giant library, it''s static and it''s all compiled in __fastcall fashion.
I can not call any of those functions from winforms...
even doing a wrapper off the main class, I still cant call it....
how do I overcome this issue ?




快速调用CLR不支持调用约定。如果您有图书馆的b $ b源代码,最简单的方法是使用

不同的调用约定重新编译它。


Ronald Laeremans

Visual C ++团队


" andrea catto''" <交流**** @ dataflight.com>在留言中写道

新闻:%2 **************** @ TK2MSFTNGP09.phx.gbl ...
The fastcall calling convention is not supported by the CLR. If you have
source for the library the easiest thing to do is to recompile it with a
different calling convention.

Ronald Laeremans
Visual C++ team

"andrea catto''" <ac****@dataflight.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
我听到了你,
问题是。
对于我们大多数转型期的开发人员来说都有一堆代码/遗产......

我们不鼓励迁移,因为那里'对于
迁移/迁移来说太过分了!

据我所知,IJW可以透明地和/或透明地进行这种过渡,但在我的情况下,它只是营销嗡嗡声...它更像是IJDW(它只是不起作用)。

在我目前的程序中,<我只需要#include" mylib.h",将static.lib添加到项目
设置中,我最后调用该死的函数。

" cody" <无**************** @ gmx.net>在消息中写道
新闻:OU ************** @ tk2msftngp13.phx.gbl ...
I hear you,
the problem is.
for most of us developers in transition with a bunch of code/legacy.....

we are not encouraged to migrate because there''s WAY too much to do to
migrate/migrane !!!

as far as I heard it''s possible to do this transition smoothly and
transparently, with IJW, but in my case it''s just marketing buzz... it''s
more like IJDW (it just doesn''t work).

in my current programs,
I only need to #include "mylib.h", add the static.lib to the project
settings and I finally call the damn function.
"cody" <no****************@gmx.net> wrote in message
news:OU**************@tk2msftngp13.phx.gbl...
怎么样
[DllImport(" test.dll",CallingConvention = CallingConvention.FastCall)]

-
cody

免费工具,游戏和幽默 http://www.deutronium.de.vu || http://www.deutronium.tk
andrea catto''" ; <交流**** @ dataflight.com> schrieb im Newsbeitrag
新闻:u0 ************** @ tk2msftngp13.phx.gbl ...
What about

[DllImport("test.dll", CallingConvention=CallingConvention.FastCall)]

--
cody

Freeware Tools, Games and Humour
http://www.deutronium.de.vu || http://www.deutronium.tk
"andrea catto''" <ac****@dataflight.com> schrieb im Newsbeitrag
news:u0**************@tk2msftngp13.phx.gbl...
>我有这个巨大的库,它是静态的,它都是在__fastcall>中编译的。时尚。
>我无法通过winforms调用任何这些功能......
>即使是在主课上做包装,我仍然不能称之为....
>我该如何克服这个问题?
>
>
> I have this giant library, it''s static and it''s all compiled in __fastcall > fashion.
> I can not call any of those functions from winforms...
> even doing a wrapper off the main class, I still cant call it....
> how do I overcome this issue ?
>
>




这篇关于静态库中的__fastcall函数,无法从托管代码调用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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