I\'m importing WinApi functions, writing callbacks etc. (example) in C# and always wonder:
LRESULT as last result ? W
That's an example for hungarian notation:
L in both LPARAM and LRESULT means "long", designating a 32-bit intw in WPARAM means "word" (which used to be 16-bit int but is now also a 32 bit int — at least when targeting a 32-bit architecture)The remainder of the type names / aliases is supposed to hint at their meaning, i.e. LRESULT containing some kind of result value, LPARAM and WPARAM being used for parameter variables.
The actual meaning of the wParam and lParam parameters' content depends on the particular message being sent; they are just generic buckets for message parameters. So it's quite likely that you won't be able to circumvent unsafe type casts.