Board index » delphi » Data type conversion

Data type conversion

What is the proper way to convert a DWORD to a LONG?
( this is assuming that the value is not greater than that allowed for a
LONG in Win 32)

Thanks in advance.

 

Re:Data type conversion


DWORD dwordval = 0x12345678UL;
long longval = (long) dwordval;

.  Ed

Re:Data type conversion


Thanks again Ed.

That was what I was doing - it was another problem in my code - solved it
:-)

Sylvio

"Ed Mulroy (TeamB)" <e...@mulroy.org> wrote in message
news:3c21e7c2_2@dnews...

Quote
> DWORD dwordval = 0x12345678UL;
> long longval = (long) dwordval;

> .  Ed

Other Threads