From: Tony Johansson on
Hi!

Here I have some code from an example from MSDN.
What I don't fully understand here is how is it possible to pass an object
of type StringBuilder and receive this parameter in the
windows API as an LPTSTR ?

Documentation for Win32 GetShortPathName() API Function
// DWORD GetShortPathName(
// LPCTSTR lpszLongPath, // file for which to get short path
// LPTSTR lpszShortPath, // short path name (output)
// DWORD cchBuffer // size of output buffer
// );

[DllImport("Kernel32", CharSet = CharSet.Auto)]
static extern Int32 GetShortPathName(
String path, // input string
StringBuilder shortPath, // output string
Int32 shortPathLength); // StringBuilder.Capacity

//Tony