MSFN Forum: CreateDirectory in code running on PE is failing mysterously (Solved) - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

CreateDirectory in code running on PE is failing mysterously (Solved) Rate Topic: -----

#1 User is offline   Avin 

  • Group: Members
  • Posts: 5
  • Joined: 29-June 06

Posted 14 August 2006 - 11:55 AM

I'm running some code that uses FindFirstFile/FindNext, CreateDirectory, and CopyFile in a recursive function that recursively copies a source directory and all subdirectories to a destination path (which may not exist initially). The code works fine on my XP PC, and generally works on PE as well, however it keeps failing to create the directory Q:\windows. Other directories parallel to that are being created perfectly fine. Thinking that perhaps there might be some sort of protection against creating a windows directory, I had my function create a directory called "xyzzytemp" instead of "windows" if it was supposed to create such a directory and then use MoveFile to rename it to "windows" ... however the CreateDirectory call would still fail. The error I received was 87 (ERROR_INVALID_PARAMETER) but I cannot see how the parameter is invalid for only this directory and not every other directory. Any ideas? Are there hidden differences between standard API functions like those I am using between their implementations on XP and PE?

[Edit: I figured out the problem. The format had not yet completed by the time I copied the Windows directory.]

This post has been edited by Avin: 15 August 2006 - 11:14 AM



Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy