low-order word 
Author Message
 low-order word

if I have
DWORD* volum;
how do I get the low-order word of this location and the high-order
word?

thanks
Niklas



Mon, 31 Jul 2000 03:00:00 GMT  
 low-order word

Hi Niklas,

You could define a union in a structure and fill it with a DWORD* and
obtain the 2 WORD's.

Quote:

> if I have
> DWORD* volum;
> how do I get the low-order word of this location and the high-order
> word?

> thanks
> Niklas

--
Rob Goudvis




Mon, 31 Jul 2000 03:00:00 GMT  
 low-order word

I'm assuming you want the value of volum and not what it's pointing too..

WORD loword = (WORD)volum;
WORD hiword = (WORD)(volum>>16);

--
VC++ 5.0sr3  WinNT 4.0sr3
Douglas Peterson
Software Engineer
Telex Communications, Inc
(For E-mail reply, remove the *'s)

Quote:

>if I have
>DWORD* volum;
>how do I get the low-order word of this location and the high-order
>word?

>thanks
>Niklas



Mon, 31 Jul 2000 03:00:00 GMT  
 low-order word

Quote:
> if I have
> DWORD* volum;
> how do I get the low-order word of this location and the high-order
> word?

> thanks
> Niklas

There are 2 Windows macros for this: LOWORD( *volum); and HIWORD( *volum);
If you mean the pointer that would be LOWORD(DWORD(volum)); and
HIWORD(DWORD(volum));
That's not clear ;o)

cU
--

                        http://djuga.home.ml.org
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Retriever 1.0 is out:   http://retriever.home.ml.org

Shareware image viewer, thumbnailer & database
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

cU
--

                        http://djuga.home.ml.org
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Retriever 1.0 is out:   http://retriever.home.ml.org

Shareware image viewer, thumbnailer & database
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



Mon, 31 Jul 2000 03:00:00 GMT  
 low-order word

How about
HIWORD(*volum) and LOWORD(*volum)
I'd give them a try.

Quote:

>if I have
>DWORD* volum;
>how do I get the low-order word of this location and the high-order
>word?

>thanks
>Niklas



Tue, 01 Aug 2000 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. GetAddressProc, Low and Hi-order words

2. High order/low order problem

3. Writting low-order or high-order bytes

4. Separate low and high order ints

5. Upper and lower case words

6. Simple Low/High-word question

7. High-order word...

8. byte order and bit order

9. Load order and DLL entry order of implicitly linked DLLs, Environment variables

10. Socket Program(Host Order/Network Order)

11. WORD Automation via C#:BuiltInProperties in Word

12. Using Word components on non-Word computer

 

 
Powered by phpBB® Forum Software