LPSTR

hello guys!

i’m not so good in english… so don’t wonder ^^

well…

i want to learn how to program with OpenGL.

i started with some Win32 applications… i made a simply window which doesnt screens anything…

well… my question is:

what is the type LPSTR in the WinMain function?

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nShowCmd)
{
return 0;
}

and what is the last parameter for? “int nShowCmd”

please explain what LPSTR is doing exactly and what is “int nShowCmd” for?

:rolleyes:

See this documentation

If you want to program with OpenGL I can advise you not to use the Windows native library, at least not now. Use glut, this is the best to start.

Originally posted by $nooc:
what is the type LPSTR in the WinMain function?
LPSTR stands for Long Pointer to STRing. It is same as char* in ISO/ANSI C/C++. More precisely, it should be called “far pointer” not long pointer.

Originally posted by songho:
[quote]Originally posted by $nooc:
what is the type LPSTR in the WinMain function?
LPSTR stands for Long Pointer to STRing. It is same as char* in ISO/ANSI C/C++. More precisely, it should be called “far pointer” not long pointer.
[/QUOTE]Hopefully will it be helpful for him now, more than 6 months later :slight_smile: