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

olek_w1

Registered User.
Local time
Today, 03:53
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

  • conversion to 64 bits help.zip
    345.9 KB · Views: 114

Galaxiom

Super Moderator
Staff member
Local time
Today, 11:53
Joined
Jan 20, 2009
Messages
12,856
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.
 

olek_w1

Registered User.
Local time
Today, 03:53
Joined
Jun 4, 2014
Messages
17
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

  • gdi_dib_test64-bit_working.zip
    42.1 KB · Views: 149

Users who are viewing this thread

Top Bottom