Prev: calling unmanaged Windows APi
Next: Reading emails from distribution group and extract attachment
From: Tony Johansson on 29 Apr 2010 17:22 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
|
Pages: 1 Prev: calling unmanaged Windows APi Next: Reading emails from distribution group and extract attachment |