I'm not using VS 2019, but rather MinGW. However, I don't get the same error as you.
You shouldn't have to worry about far pointers.
I had to do a few things to get that to compile:
1.
1 2 3
|
#define EXPORT __declspec(dllexport)
const int GwDA_DEFAULT_INCR = 1;
using GwBoolean = bool;
|
(you probably don't need to do (1.), I'm just letting you know what I did)
2. change
static void *far da_invalid;
to just
static void * da_invalid;
3. Define the base class before the derived class.
4. I also defined some dummy functions that you have only declared to make the compiler happy
I would suggest making a minimal, compileable reproducible example for your issue.
http://sscce.org/
https://stackoverflow.com/help/minimal-reproducible-example
Then again, maybe someone else is more familiar with legacy C++ code.
What I will say is that those are kinda some ugly casts. You're taking the address of a (char*), then casting it to some arbitrary (T*) type, then dereferencing it. I mean, that might work, but I would assume it's undefined behavior.