Thread: LP*

  1. #1
    Registered User
    Join Date
    May 2006
    Posts
    630

    LP*

    What does LP* in front of typedef mean? Long pointer?
    For instance:
    OVERLAPPED -> LPOVERLAPPED
    DWORD -> LPDWORD

  2. #2
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    Yep, exactly. As opposed to SP for short pointer. The distinction was necessary in 16-bit Windows. Nowadays they're all the same.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  3. #3
    Registered User
    Join Date
    May 2006
    Posts
    630
    So you can just (better) use *DWORD instead of LPDWORD?

  4. #4
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    They are equivalent, yes. Whether you prefer one or the other is a matter of taste. I prefer the proper pointer over the typedef. I've seen people (including me) forgetting that LPDWORD is a pointer too often.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  5. #5
    Registered User
    Join Date
    May 2006
    Posts
    630
    Thank you.

Popular pages Recent additions subscribe to a feed