开发者

How can I expose a constant defined in unmanaged code to managed code?

I have a C++ DLL which has a constant defined as such:

#define GPC_EPSILON (DBL_EPSILON)

Is there any way to expose this GPC_EPSI开发者_运维技巧LON to the managed DLL via interop so that I can get this value from the .NET DLL?


No.

Constants in #define's are replaced by the pre-processor before compilation. They are not exposed as variables.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜