D1: Trying to update Juno Library to 1.076
jicman
jicman at gmail.com
Fri Aug 23 16:38:07 UTC 2019
On Friday, 23 August 2019 at 16:19:10 UTC, Mike Parker wrote:
> On Friday, 23 August 2019 at 16:09:16 UTC, jicman wrote:
>
>>> }
>>
>> That looks like D2 code. I am trying to compile D1 code. I
>> think the linker is not getting something right.
>
> You might try declaring the offending functions as
> extern(Windows) function pointers and then loading them from
> the appropriate DLLs via LoadLibrary/GetProcAddress. I had to
> do that with some Win32 functions I used back before we got
> support for COFF and the Windows SDK because, for whatever
> reason, they were missing from the OMF libs that ship with DMD.
I think you may be up to something, here. I actually have
declared them as extern(Window), ie.
<D1code>
extern(Windows):
void VariantInit(ref VARIANT pvarg);
int VariantClear(ref VARIANT pvarg);
int VariantCopy(ref VARIANT pvargDest, ref VARIANT pvargSrc);
int VarCmp(ref VARIANT pvarLeft, ref VARIANT pvarRight, uint
lcid, uint dwFlags);
int VarAdd(ref VARIANT pvarLeft, ref VARIANT pvarRight, out
VARIANT pvarResult);
int VarAnd(ref VARIANT pvarLeft, ref VARIANT pvarRight, out
VARIANT pvarResult);
int VarCat(ref VARIANT pvarLeft, ref VARIANT pvarRight, out
VARIANT pvarResult);
int VarDiv(ref VARIANT pvarLeft, ref VARIANT pvarRight, out
VARIANT pvarResult);
int VarMod(ref VARIANT pvarLeft, ref VARIANT pvarRight, out
VARIANT pvarResult);
int VarMul(ref VARIANT pvarLeft, ref VARIANT pvarRight, out
VARIANT pvarResult);
int VarOr(ref VARIANT pvarLeft, ref VARIANT pvarRight, out
VARIANT pvarResult);
int VarSub(ref VARIANT pvarLeft, ref VARIANT pvarRight, out
VARIANT pvarResult);
int VarXor(ref VARIANT pvarLeft, ref VARIANT pvarRight, out
VARIANT pvarResult);
</D1code>
So you have some sample piece of code that can guide me through
loading the DLL using LoadLibrary/GetProcAddress? I have not
done that. But, as you can see, VarAdd, VarAnd, ..., VarXor, are
loading ok. The only one in this one is VarCmp. It could be
that it may be missing from the list, as you say.
More information about the Digitalmars-d-learn
mailing list