mfc / c++ directory creation problem

R

Rohan De Sa

Hello,
I am writing an MFC application in the developer environment. i
am using some functions like "CreateDirectory" and "CopyFile" from
winbase.h.

Unfortunately these functions dont work when I run the exe normally,
but if i get into debug mode and step through the functions then the
functions work perfectly. I am NOT confusing between debug and Release
versions.

Can anyone please tell me what is it that I am doing wrong?

TIA,
R
 
J

Joona I Palaste

Rohan De Sa said:
Hello,
I am writing an MFC application in the developer environment. i
am using some functions like "CreateDirectory" and "CopyFile" from
winbase.h.
Unfortunately these functions dont work when I run the exe normally,
but if i get into debug mode and step through the functions then the
functions work perfectly. I am NOT confusing between debug and Release
versions.
Can anyone please tell me what is it that I am doing wrong?

As the CreateDirectory and CopyFile functions, or indeed any function
from winbase.h, are not standard, their behaviour is entirely
implementation-dependent. Thus we cannot say what is wrong within the
context of ISO standard C. Please ask in
comp.os.ms-windows.programmer.win32.

--
/-- Joona Palaste ([email protected]) ---------------------------\
| Kingpriest of "The Flying Lemon Tree" G++ FR FW+ M- #108 D+ ADA N+++|
| http://www.helsinki.fi/~palaste W++ B OP+ |
\----------------------------------------- Finland rules! ------------/
"It's not survival of the fattest, it's survival of the fittest."
- Ludvig von Drake
 
B

Bruno Desthuilliers

Rohan said:
Hello,
I am writing an MFC application in the developer environment. i
am using some functions like "CreateDirectory" and "CopyFile" from
winbase.h.

Unfortunately these functions dont work when I run the exe normally,
but if i get into debug mode and step through the functions then the
functions work perfectly. I am NOT confusing between debug and Release
versions.

Can anyone please tell me what is it that I am doing wrong?

Yes : you're posting a question about C++ and the MS platform on a ng
dedicated to the C language as defined by the ansi and ISO standards.

This is plain wrong.

Bruno
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top