|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How to convert ShortPath to longPath?There is a GetLongPathName method in kernel32.dll that does that.
I found this article, that has a code sample: http://www.c-sharpcorner.com/UploadFile/crajesh1981/RajeshPage103142006044841AM/RajeshPage1.aspx?ArticleID=63e02c1f-761f-44ab-90dd-8d2348b8c6d2 yxq wrote: Show quoteHide quote > Hello, > How to convert "c:\PROGRA~1" to "c:\program files" > > Thank you > > Maybe this will help:
http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=b310d797-bdb2-4726-a0f0-ec44baa2ac66 yxq wrote: Show quoteHide quote > Hello, > How to convert "c:\PROGRA~1" to "c:\program files" > > Thank you > > Declare Auto Function GetLongPathName Lib "kernel32.dll" _
(ByVal lpszShortPath as string, ByVal lpszLongPath as stringbuilder, ByVal cchBuffer as integer) _ as Integer Public Function ToLongPathName (shortName as String) as String Dim longNameBuffer as New StringBuilder(256) Dim BufferSize as Integer = longNameBuffer.Capacity GetLongPathName(shortName, longNameBuffer, bufferSize) Return longNameBuffer.ToString() End Function -- Show quoteHide quoteDennis in Houston "yxq" wrote: > Hello, > How to convert "c:\PROGRA~1" to "c:\program files" > > Thank you > > > Thank you very much.
Show quoteHide quote "Dennis" <Den***@discussions.microsoft.com> дÈëÏûÏ¢ÐÂÎÅ:2FCEE87C-25FC-4C55-9EA3-0B8B74801***@microsoft.com... > Declare Auto Function GetLongPathName Lib "kernel32.dll" _ > (ByVal lpszShortPath as string, ByVal lpszLongPath as stringbuilder, ByVal > cchBuffer as integer) _ > as Integer > Public Function ToLongPathName (shortName as String) as String > Dim longNameBuffer as New StringBuilder(256) > Dim BufferSize as Integer = longNameBuffer.Capacity > GetLongPathName(shortName, longNameBuffer, bufferSize) > Return longNameBuffer.ToString() > End Function > > -- > Dennis in Houston > > > "yxq" wrote: > >> Hello, >> How to convert "c:\PROGRA~1" to "c:\program files" >> >> Thank you >> >> >>
Programmatically open compmgmt.msc
When the messagebox disappears, it leaves a white square Windows Image Acquisition (WIA) Taking black photos Need to sort an Array Help with logic - system payment method Connect to database in non standard location Listview item fontstyle About download files vb express question Windows form designer default scope for controls. |
|||||||||||||||||||||||