开发者

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

开发者 https://www.devze.com 2023-01-09 23:00 出处:网络
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 th

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

精彩评论

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