Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

Search Results for "PathCombine" in [All]

shlwapi

.

This is similar, but not identical, to PathCombine and [Path.Combine]. For example, appending "C:\foo" with "\bar" yields "C:\foo\bar" rather than "C:\bar" or "\bar", respectively.

.

static extern string PathCombine([Out] StringBuilder lpszDest, string lpszDir, string lpszFile);

.

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

.

Declare Function PathCombine Lib "shlwapi.dll" Alias "PathCombineA" (ByVal szDest As String, ByVal lpszDir As String, ByVal lpszFile As String) As Long

.

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

.

    static extern string PathCombine([Out] StringBuilder lpszDest, string lpszDir, string lpszFile);

.

        return PathCombine(sb,basePath,relativePath);

.
Documentation

 
Access PInvoke.net directly from VS: