Click here to Skip to main content
15,897,371 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Translate Logical Drive to Physical Drive Pin
Randor 10-Aug-09 17:45
professional Randor 10-Aug-09 17:45 
GeneralRe: Translate Logical Drive to Physical Drive [modified] Pin
Bram van Kampen11-Aug-09 11:09
Bram van Kampen11-Aug-09 11:09 
GeneralRe: Translate Logical Drive to Physical Drive Pin
Randor 11-Aug-09 13:06
professional Randor 11-Aug-09 13:06 
GeneralRe: Translate Logical Drive to Physical Drive Pin
Bram van Kampen12-Aug-09 8:31
Bram van Kampen12-Aug-09 8:31 
GeneralRe: Translate Logical Drive to Physical Drive Pin
Andy Belton24-Dec-11 21:37
Andy Belton24-Dec-11 21:37 
GeneralRe: Translate Logical Drive to Physical Drive Pin
Randor 26-Dec-11 11:13
professional Randor 26-Dec-11 11:13 
GeneralRe: Translate Logical Drive to Physical Drive Pin
Andy Belton1-Jan-12 1:40
Andy Belton1-Jan-12 1:40 
GeneralRe: Translate Logical Drive to Physical Drive Pin
Randor 1-Jan-12 2:54
professional Randor 1-Jan-12 2:54 
Hey Andy,

Andy Belton wrote:
A couple of questions. In your solution you gave this format "\\\\.\\\\%c:". I assume this to be for extended filepath string length support. But the documenation with my old compiler has it as "\\\\.\\"

Actually the documentation to your old compiler is correct... for opening the device namespace you need to prepend "\\.\" which as you know escaped looks like "\\\\.\\"

I have no idea why my old code snippit from 2009 contains an extra backslash. I write alot of these code snippits impromptu... so some of them may contain typos or minor flaws. I can tell by looking at the above code snippit that I wrote it on the spot... because it doesn't return a value... or modify any variables being passed into the function. It is just enough to illustrate the idea and help the developer move forward.

Andy Belton wrote:
Is this the norm for extended length support? Users are bound to come up super long path names.

I believe that you are referring to the Unicode version of the CreateFile Function[^]... you would need to prepend a L"\\?\" which escaped for c++ looks like L"\\\\?\\"

Andy Belton wrote:
Also, in my application I also access network drives. Does the "\\\\pc name\\drive name\\" give this extended length support?

Yes, you can access files over the network with a path greater than 260 characters however you will need to use the Unicode version of CreateFile function[^]

Best Wishes,
-David Delaune
GeneralRe: Translate Logical Drive to Physical Drive Pin
Andy Belton4-Jun-12 4:34
Andy Belton4-Jun-12 4:34 
QuestionIostream processing\flags question Pin
GuimaSun10-Aug-09 12:23
GuimaSun10-Aug-09 12:23 
AnswerRe: Iostream processing\flags question Pin
Stuart Dootson10-Aug-09 21:10
professionalStuart Dootson10-Aug-09 21:10 
GeneralRe: Iostream processing\flags question Pin
GuimaSun11-Aug-09 2:55
GuimaSun11-Aug-09 2:55 
QuestionWait Until Event Occurs Pin
staticv10-Aug-09 4:50
staticv10-Aug-09 4:50 
AnswerRe: Wait Until Event Occurs Pin
Stuart Dootson10-Aug-09 8:32
professionalStuart Dootson10-Aug-09 8:32 
GeneralRe: Wait Until Event Occurs Pin
staticv10-Aug-09 20:30
staticv10-Aug-09 20:30 
GeneralRe: Wait Until Event Occurs Pin
Stuart Dootson10-Aug-09 21:01
professionalStuart Dootson10-Aug-09 21:01 
GeneralRe: Wait Until Event Occurs Pin
staticv10-Aug-09 21:25
staticv10-Aug-09 21:25 
QuestionSHGetFolderPath returns E_FAIL for CSIDL_BITBUCKET Pin
Nitheesh George10-Aug-09 4:43
Nitheesh George10-Aug-09 4:43 
AnswerRe: SHGetFolderPath returns E_FAIL for CSIDL_BITBUCKET Pin
Stuart Dootson10-Aug-09 8:27
professionalStuart Dootson10-Aug-09 8:27 
AnswerRe: SHGetFolderPath returns E_FAIL for CSIDL_BITBUCKET Pin
Randor 10-Aug-09 9:44
professional Randor 10-Aug-09 9:44 
GeneralRe: SHGetFolderPath returns E_FAIL for CSIDL_BITBUCKET Pin
Stuart Dootson10-Aug-09 10:29
professionalStuart Dootson10-Aug-09 10:29 
GeneralRe: SHGetFolderPath returns E_FAIL for CSIDL_BITBUCKET Pin
Randor 10-Aug-09 11:15
professional Randor 10-Aug-09 11:15 
GeneralRe: SHGetFolderPath returns E_FAIL for CSIDL_BITBUCKET Pin
Stuart Dootson10-Aug-09 11:23
professionalStuart Dootson10-Aug-09 11:23 
GeneralRe: SHGetFolderPath returns E_FAIL for CSIDL_BITBUCKET Pin
Nitheesh George10-Aug-09 21:38
Nitheesh George10-Aug-09 21:38 
GeneralRe: SHGetFolderPath returns E_FAIL for CSIDL_BITBUCKET Pin
Randor 10-Aug-09 22:55
professional Randor 10-Aug-09 22:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.