Desktop Functions: Smart Device Functions:
|
PathCombine (shlwapi)
C# Signature:
[DllImport("shlwapi.dll", CharSet=CharSet.Auto)] VB.NET Signature
Declare Unicode Function PathCombine Lib "shlwapi.dll" Alias "PathCombineW" (<MarshalAs(UnmanagedType.LPTStr)> PathOut As System.Text.StringBuilder, <MarshalAs(UnmanagedType.LPTStr)> PathIn As String, <MarshalAs(UnmanagedType.LPTStr)> More As String) As IntPtr VB Signature:
Declare Function PathCombine Lib "shlwapi.dll" Alias "PathCombineA" (ByVal szDest As String, ByVal lpszDir As String, ByVal lpszFile As String) As Long Notes:This is similar, but not identical, to PathAppend and Path.Combine. For example, combining "C:\foo" with "\bar" yields "C:\bar" rather than "C:\foo\bar" or "\bar" respectively. Current signature is incorrect, because return value is string and CLR trying to release the same string twice (return value and lpszDest). I have unxpected crashes. I think that type of return value should change to IntPtr. This page contains some discussion about this problem: http://objectmix.com/dotnet/747522-p-invoke-signature-pathcombine.html Tips & Tricks:Please add some! Sample Code:
[DllImport("shlwapi.dll", CharSet = CharSet.Auto)] Alternative Managed API:Please edit this page!Do you have...
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more). |
|