For 32 bit systems I can use the function, MulDiv to convert the screen resolution to the printer (or any device) resolution.
For my purposes, I need to convert my computer screen's points to my printer's points. In this case I use the printer's Y resolution to get the height I need.
The function is as follows:
Code:
MulDiv(longPoints, GetDeviceCaps(resource->dc, LOGPIXELSY), 72)
NOTE that 72 points = 1 inch.
This works for a 32 bit system, but not for a 64 bit system.
I need something like a MulDiv64 function that will do the same job but for 64 bit systems.
I've read suggestions to use '64 bit math'.
I found a library for MulDiv64.
My compiler sees and compiles these files just fine if my code never calls MulDiv64.
I get a compile time error (unresolved external symbol MulDiv64 referenced) when my code calls MulDiv64.
Code:
int64_t nRtn = MulDiv64(12, 300, 72);
I'm compiling in VS 2015 using php compiler files & nmake.
This is a php extension for printing documents.
If I could just get help making the MulDiv64 library work that might suffice.