[DllImport("shlwapi.dll", BestFitMapping = false, CharSet = CharSet.Unicode, ExactSpelling = true, SetLastError = false, ThrowOnUnmappableChar = true)]
public static extern int SHLoadIndirectString(string pszSource, StringBuilder pszOutBuf, int cchOutBuf, IntPtr ppvReserved);
None.
Do you know one? Please contribute it!
None.
Use Environment.ExpandEnvironmentVariables(path)
string resourcePath = "
\System32\shell32.dll,-4123";
resourcePath = Environment.ExpandEnvironmentVariables(resourcePath);
StringBuilder outBuff = new StringBuilder();
int result = SHLoadIndirectString(resourcePath, outBuff, -1, IntPtr.Zero);
//SHLoadIndirectString returns S_OK (0) if successfull
if(result == 0)
Console.WriteLine(outBuff.ToString());