简体   繁体   中英

Expose Unmanaged Code's Constant to Manage Dll

I have a C++ dll which has a GPC_EPSILON constant defined as such

#define GPC_EPSILON (DBL_EPSILON)

Is there anyway to expose this GPC_EPSILON to managed dll via interop, so that I can set this value from .Net dll?

No.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM