Excel 2013 64位:无法从工作表调用DLL(参数传递不正确) [英] Excel 2013 64 bit: can not call DLL from worksheet (arguments are passed incorrectly)

查看:149
本文介绍了Excel 2013 64位:无法从工作表调用DLL(参数传递不正确)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有64位DLL,功能如下

I have 64 bit DLL with function like this

double __stdcall f(double x);

和这样的XLA文件

Public Declare PtrSafe Function f Lib "x.dll" (ByVal x As Double) As Double

我可以通过这个可怕的构造从工作表调用函数f

I can call function f from worksheet by this terrible construction

Public Function ws_f(ByVal x As Double) As Double
ws_f = f(x)
End Function

但是如果我直接调用function f从工作表参数传递不正确。为什么?

But if I call function f directly from worksheet arguments are passed incorrectly. W H Y ?

Excel xxxx 32位工作正常

Excel xxxx 32 bit works fine

Excel 2010 64位工作正常

Excel 2010 64 bit works fine also

我读过

https://social.msdn.microsoft.com/Forums/office/en-US/1725b84e-39bc-497c-bf55-d1825f4ab84b/c-function-in-excel-2010 -64位不 - 不工作作为一种工作表函数,但是-作品 - 阱中VBA引用= HTTP://social.msdn.microsoft.com/Forums/office/en-US / 1725b84e-39bc-497c-bf55-d1825f4ab84b / C函数功能于Excel的2010-64位不 - 不工作作为一种工作表函数,但是-作品 - 阱中的VBA?引用= HTTP://social.msdn.microsoft.com/Forums/office/en-US/1725b84e-39bc-497c-bf55-d1825f4ab84b/c-function-in-excel-2010-64-bit-does-not-work -as-A-工作表功能,但是-作品 - 阱中VBA引用= HTTP://social.msdn.microsoft.com/Forums/office/en-US/1725b84e-39bc-497c-bf55-d1825f4ab84b /c-function-in-excel-2010-64-bit-does-not-work-as-a-worksheet-function-but-works-well-in-vba?referrer=http://social.msdn.microsoft .COM /论坛/办公室/ EN-US / 1725b84e-39bc-497c-bf55-d1825f4ab84b / C函数功能于Excel中-2010-64-bit-does-not-work-as-a-worksheet-function-but-works-well-in-vba?forum = exceldev

https://social.msdn.microsoft.com/Forums/office/en-US/1725b84e-39bc-497c-bf55-d1825f4ab84b/c-function-in-excel-2010-64-bit-does-not-work-as-a-worksheet-function-but-works-well-in-vba?referrer=http://social.msdn.microsoft.com/Forums/office/en-US/1725b84e-39bc-497c-bf55-d1825f4ab84b/c-function-in-excel-2010-64-bit-does-not-work-as-a-worksheet-function-but-works-well-in-vba?referrer=http://social.msdn.microsoft.com/Forums/office/en-US/1725b84e-39bc-497c-bf55-d1825f4ab84b/c-function-in-excel-2010-64-bit-does-not-work-as-a-worksheet-function-but-works-well-in-vba?referrer=http://social.msdn.microsoft.com/Forums/office/en-US/1725b84e-39bc-497c-bf55-d1825f4ab84b/c-function-in-excel-2010-64-bit-does-not-work-as-a-worksheet-function-but-works-well-in-vba?referrer=http://social.msdn.microsoft.com/Forums/office/en-US/1725b84e-39bc-497c-bf55-d1825f4ab84b/c-function-in-excel-2010-64-bit-does-not-work-as-a-worksheet-function-but-works-well-in-vba?forum=exceldev

and cry-WHY MS无法解决这个问题?

and cry - W H Y MS can not fix this?

真的很难将所有函数包装在DLL中或迁移到XLL - 简单告诉我用DLL做什么来修复这个奇怪的错误 - 可能是一些compiller参数魔术?

It is realy hard to wrap all function in DLL or migrate to XLL - simple tell me what can I do with DLL to fix this strange error - may be some compiller parameters magic?

推荐答案

嗨АлександрГусев,

Hi Александр Гусев,

由于问题很复杂,我建议您联系Microsoft支持人员以提出事件,以便我们的工程师能够与他密切合作以确定根本原因并尽快解决此问题。

如果支持工程师确定问题是由错误引起的,则服务请求将是免费的,并且您不会被收取费用。 

Since the issue is complex, I suggest you contacting Microsoft support to raise an incident so that our engineer could work closely with him to identify the root cause and resolve this issue as soon as possible.
If the support engineer determines that the issue is the result of a bug the service request will be a no-charge case and you won't be charged. 

请访问以下链接,查看可以更好地满足您需求的各种付费支持选项。 



https://msdn.microsoft.com/subscriptions/bb266240.aspx



感谢您的理解。

Please visit the below link to see the various paid support options that are available to better meet your needs. 

https://msdn.microsoft.com/subscriptions/bb266240.aspx

Thanks for your understanding.


这篇关于Excel 2013 64位:无法从工作表调用DLL(参数传递不正确)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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