[Help] Full paths / short paths - Printable Version -Shoutbox (https://shoutbox.menthix.net) +-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58) +--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4) +---- Forum: Scripting (/forumdisplay.php?fid=39) +----- Thread: [Help] Full paths / short paths (/showthread.php?tid=62597) [Help] Full paths / short paths by alexp2_ad on 07-05-2006 at 04:55 PM
Is there any way I can convert a short path into a long one in JScript? I have a function that returns: RE: [Help] Full paths / short paths by matty on 07-05-2006 at 05:10 PM you will want to use GetFullPathNameW api if i remember correctly RE: RE: [Help] Full paths / short paths by alexp2_ad on 07-05-2006 at 05:13 PM
quote:I was trying that, but it seems to require I pass it some StringBuilder type which doesn't seem to exist in JScript or something. If you could show me an example, that'd be very useful. RE: [Help] Full paths / short paths by matty on 07-05-2006 at 05:22 PM
Again I am at work can't test it code: RE: [Help] Full paths / short paths by alexp2_ad on 07-05-2006 at 05:28 PM Weird, that actually returned a string, unlike all my efforts, but it was the same string I put in. RE: [Help] Full paths / short paths by matty on 07-05-2006 at 05:31 PM
quote:Did you use GetFullPathNameW or GetFullPathNameA? RE: [Help] Full paths / short paths by alexp2_ad on 07-05-2006 at 05:34 PM Used GetFullPathNameW as you said. Just tried GetFullPathNameA and it returned a bunch of chinese characters. RE: [Help] Full paths / short paths by matty on 07-05-2006 at 05:39 PM
quote:Ya because Javascript uses WChars so any API that has the ability of using Ascii or WChars you need to use the WChar so it is processed properly. quote: RE: [Help] Full paths / short paths by Eljay on 07-05-2006 at 05:42 PM
wrong function matty code: RE: [Help] Full paths / short paths by alexp2_ad on 07-05-2006 at 05:45 PM
Yay, working! RE: [Help] Full paths / short paths by matty on 07-05-2006 at 05:45 PM
quote:How he said it worked? RE: RE: [Help] Full paths / short paths by alexp2_ad on 07-05-2006 at 05:46 PM
quote:No, I said it returned the same thing I put in. GetLongPathNameW works. Thanks for the help. |