[CONNECT .NET] Get value of MicroStation global variable

MicroStation CONNECT continues to use public global variables.  The one that interests me at the moment is mgds_modes. It's defined in header file MicroStation.r.h and declared extern in dloadlib.h.

With C++, I can use such a variable simply by including those header files and linking with the appropriate library.  How do I use a C++ global variable when writing a .NET AddIn?