Help convert 32-bit to 64-bit code (gdi32 calls)

olek_w1

Registered User.
Local time
Today, 21:19
Joined
Jun 4, 2014
Messages
17
Dear Exprets,

I'm currently working on conversion from 32-bits to 64-bits.

I'm using Declare statment to some Gdi32 functions. I've dowloaded from microsoft site file which contains all proper made 64-bit declare statments (containing ptrsafe and longptr types) I've convert all statment in my file according this, but it is not gonna work.

Kindly please, can you take a look (in attachment I've put original 32-bit version of file and already converted by me file for 64-bit version - which is not working. I also attach text file containing all proper declare statment for most of usefull windows system libraries.

Kidly please help.
 

Attachments

I'm currently working on conversion from 32-bits to 64-bits..

Do you have a good reason for this change? Even Microsoft recommends installing 32 bit Office on 64 bit machines unless the extra capacities of 64 bit addressing are needed.
 
Hello,

Un update.

Ploblem solved

I'v found that in case of 64-bit applications use of LenB instead of Len
makes a difference.....

is function GetObjectA as argument number two (nCount) is necessary to put
number of bytes of information to be written to the buffer.
In 64-bit access It is necessary to use LenB to settle size of the object.



Public Declare PtrSafe Function apiGetObject Lib "gdi32" _
Alias "GetObjectA" _
(ByVal hObject As LongPtr, ByVal nCount As Long, _
lpObject As Any) As Long
 

Attachments

Users who are viewing this thread

Back
Top Bottom