BOOL PathFindOnPath( LPTSTR pszFile, LPCTSTR *ppszOtherDirs );
I am calling this API from managed C++. My pszFile is in a System.String.
What is the easiest way to pass this as LPTSTR? (Considering its an inout parameter)
I have tried pin_ptr and interior_ptr but neither seems to be accepted by the compiler.
You need to marshal across a (pre-allocated) StringBuilder instead of a String reference. For details, see this MSDN article on Marshaling.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With