I'm currently using the Windows MulDiv function to do what I need but apparently, it only works for 32 bit systems.
I'm trying to convert the size points from the screen to any given printer.
It'll run on a 64 bit system.
Here's the code using MulDiv
Code:
long nPts = MulDiv(12, GetDeviceCaps(resource->dc, LOGPIXELSY), 72)
72 points = 1 inch.
This gives me the height of the screen's 12 points as the printer sees it.
This only works for 32 bit systems.
I need the same function, but for 64 bit computers.
From what I gather, the problem is 64bit * 64bit = 128bit which could produce an overflow.
I found a MulDiv64 library but can't make it compile. It compiles the files but if my code tries to call MulDiv64 it throws a compile error 'external symbol MulDiv64 unresolved'.
I'm compiling a php7 extension, written in c. I'm using VC 2015 and a php compile nmake.
If I could just make the MulDiv64 library work that might suffice.
Help would be greatly appreciated.