Valhalla Legends Archive

Programming => General Programming => Topic started by: Etheran on January 07, 2003, 01:07 AM

Title: LP
Post by: Etheran on January 07, 2003, 01:07 AM
I am very new to the windows api and I'm wondering what lp stands for (e.g. lpsz).  I've made the assumption that it stands for long pointer (lpsz would be long pointer string zero) but I'm not sure.  I can't seem to find any confirmation so I'm using these forums. ;)
Title: Re: LP
Post by: Eibro on January 07, 2003, 01:57 AM
Yep, you're correct.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnw98bk/html/variablenameshungariannotation.asp
Title: Re: LP
Post by: Yoni on January 07, 2003, 04:13 AM
Yes. The notation is left over from 16-bit programming, where you had near and far pointers.
Title: Re: LP
Post by: WolfSage on January 08, 2003, 01:12 PM
You newb Eth....   ;D
Title: Re: LP
Post by: Etheran on January 08, 2003, 07:00 PM
hush!
Title: Re: LP
Post by: Zakath on January 08, 2003, 07:01 PM
Wolf, that wasn't nice. ::)

I bet you didn't know that either!

If you look carefully through the API, you'll still occasionally see something declared as a FAR pointer. This is redundant at this point, but as Yoni said, is a holdover from the time when products still had to be written for 16-bit Windows.

Normally, all pointers now on a standard windows machine are 4 bytes.
Title: Re: LP
Post by: Etheran on January 08, 2003, 07:05 PM
win32.hlp is very informative.  I wouldn't have been able to make a window with asm without it! ;D
Title: Re: LP
Post by: WolfSage on January 09, 2003, 12:14 PM
I new it meant long pointer. But that's it.  ;)
Title: Re: LP
Post by: Etheran on January 09, 2003, 01:28 PM
near and far have to do with memory segments?
Title: Re: LP
Post by: Eibro on January 09, 2003, 04:10 PM
near pointer = 16 bit = 65536 address limitation
far pointer = 32* bit = 2^32 address limitation
Title: Re: LP
Post by: Grok on January 10, 2003, 08:59 AM
Quotenear pointer = 16 bit = 65536 address limitation
far pointer = 32* bit = 2^32 address limitation

What would a 64-bit implmentation be?

far far pointer = galaxy^long^long = ago
Title: Re: LP
Post by: Mesiah / haiseM on January 10, 2003, 09:57 AM
lol

(sorry just had to post that, delete this if u want)
Title: Re: LP
Post by: Arta on January 10, 2003, 01:30 PM
lol :)
Title: Re: LP
Post by: Banana fanna fo fanna on January 10, 2003, 01:48 PM
How about a FFAR pointer - fuckin far pointer.