Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Zortech C++ Language Reference - _farptr_tolong http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
                              _farptr_tolong

   Usage
   #include <dos.h>
   long _farptr_tolong(void far *ptr);

   Description
   _farptr_tolong  converts  from a far pointer to a long  which  is  the
   address that the far pointer represents.

   Example
   #include <stdio.h>
   #include <dos.h>
   main()
   {
   void far *pin;
   long value;
        pin = MK_FP(0xB754,0x0013);
        value = _farptr_tolong(pin);
        printf("Converting %lp to a long should be 0xB7553,"
                  "\nit actually is 0x%lX\n",pin,value);
   }
   Return Value
   _farptr_tolong returns the long.


Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson