Board index » delphi » *Converting 32-bit ptrs to 16-bit?

*Converting 32-bit ptrs to 16-bit?

Is it possible to convert a 32-bit pointer to a 16-bit one?
The reason I ask: My project consists of two parts: a 32-bit Delphi
program and a 16-bit DLL made in Delphi. The 16-bit DLL is behind the
scenes and is never seen by the user. I'm using DDE to send stuff from the
32-bit program to the 16-bit DLL. But what I need to do is send a pointer
(which points to some chunks of data used by the programs) from the 32-bit
program to the 16-bit DLL. Since 32-bit pointers are in a different
format, the 16-bit DLL can't read them. Is there a routine that can
convert one to the other?
-Please respond to my email address.-

 

Re:*Converting 32-bit ptrs to 16-bit?


Quote
GTABSoft2 wrote:

> Is it possible to convert a 32-bit pointer to a 16-bit one?

Yes. The easiest (but slowest) is to use WM_COPYDATA.
An alternative is to allocate using GlobalAlloc and send the
handle over.

M.

--
Martin Larsson, author of several unknown utilities for DOS and Windows.
mailto:martin.lars...@delfi-data.msmail.telemax.no
http://www.delfidata.no/users/~martin
X.400:G=martin;S=larsson;O=delfi-data;P=msmail;A=telemax;C=no

Other Threads