Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8374239
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T14:52:42+00:00 2026-06-09T14:52:42+00:00

I apologise if it is a basic or silly question. What is the difference

  • 0

I apologise if it is a basic or silly question. What is the difference between char* and LPSTR. where the sizeof both gives 4 bytes in my compiler. Can someone explain me in detail. thanks..

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T14:52:44+00:00Added an answer on June 9, 2026 at 2:52 pm

    LPSTR is a Windows type, meant to be be the same regardless of what platform you were compiling on. It’s a long pointer to a string.

    Back in the days of segmented architecture (the old 64K segments, not the newer selector-based segmented memory), where you had tiny, small, medium, large and huge memory models, it was important that the Windows type was always the same, regardless of what type of pointer char * was.

    So, if you complied with different compilers where the underlying types were different, the windows.h header file would define LPSTR to compensate for that.

    For example, Borland C may have had a sixteen-bit char * and LPSTR may have had to be defined as far char * for it. In a compiler where char * was already a long/far pointer, LPSTR would have just used that instead.

    Nowadays, with 32+ bit flat models, there is probably no real need for such shenanigans, though it may still happen with things like thunking between 64-bit and 32-bit code. Still, the types defined back then are still with us and still very much in use.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I apologise for asking just a basic question, however I cannot find the cause
I apologize if this question is too basic, but I just can't figure out
This may seem like a fairly basic question, for which I apologise in advance.
First of all, I would like to apologise if my question is very basic
ok, this may be a very basic question and I apologise if it is,
Apologies for so basic a question, but I can't find an answer anywhere. When
Possible Duplicate: efficient word indexing in python Apologies for the basic question, how can
Apologies if this is a very basic question, but I am preparing to create
This, I'm sure is a pretty basic question about JavaScript, so apologies in advance.
I apologise if the question is so stupid but I am new in linux

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.