Every time I see code calling into say kernel32.dll or User32.dll the snippet always, even on MSDN, requires the developer to hard code any required constants (WM_SETREDRAW = 11 for example) into the routine. Since these constants never change by definition and have one standard definition always, why doesn't .net provide them somewhere? I feel like we all end up creating our own libraries of constants and standard Windows dll calls as we need them. It seems like this duplication of effort is wasteful and prone to error.
Perhaps I haven't looked hard enough and they are all in there somewhere, if so could someone please provide their location?