Visual Basic 6.0 includes a tool called "API Text Viewer" that automatically generates method prototypes for win32 api methods. These are generated for visual basic so they can't be directly used in C# but converting from the VB syntax to the C# syntax is often easier than converting directly from the native prototype.
e.g., the native signature for GetUserObjectInformation() is:
the VB prototype:
the C# prototype, at least for nIndex=2 (which gets the name of the object):
A StringBuilder works here because when nIndex is 2 pvInfo will return a string. Remember to initialize it with a max capacity equal to nLength (e.g., new StringBuilder(300, 300)).