|
HOWEVER, he explicitely asked for INI Files in Windows XP.
For those who havent noticed: The KB articles list all articles they apply to. In this case, the Windows Series up to Windows for Workgroups.
This might apply to Windows 95/98, but most certainly not to Windows XP.
Cheers,
Sebastian
--
Contra vim mortem non est medicamen in hortem.
|
|
|
|
|
Sebastian Schneider wrote: This might apply to Windows 95/98, but most certainly not to Windows XP.
Why would you think it would be any different for XP?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hello everyone,
Suppose I have a file created with FILE_ATTRIBUTE_NORMAL attribute. I think it means attribute FILE_FLAG_WRITE_THROUGH is not enabled. Is my understanding correct?
And I think if I do not enable the FILE_FLAG_WRITE_THROUGH attribute, even if flush operation (function call) will not *truly* dump data to disk. Is my understanding also correct?
So, my question is, when will the data be dumped to disk -- only when we close the file?
thanks in advance,
George
|
|
|
|
|
FILE_FLAG_WRITE_THROUGH is an instruction to the OS about how you want it to handle cacheing, it has nothing to do with file attributes.
|
|
|
|
|
Hi Mike,
I heard sometimes people will mention that if we do not enable FILE_FLAG_WRITE_THROUGH mode, data will be not safe (data missing or inconsistency)? Why?
regards,
George
|
|
|
|
|
Imagine if that were true. How often do you add FILE_FLAG_WRITE_THROUGH to CreateFile() calls? I don't think I've ever used it. I imagine that many Windows programmers are like me, and don't use it (if they even know about it). Now think about all the programs those people have written. Do you think all of them have data-loss bugs?
|
|
|
|
|
Hi Mike, I think FILE_FLAG_WRITE_THROUGH will degrade the performance since it needs to sync the OS buffer and disk more frequently. So, I am wondering whether each time when we issue write API (without flush), the content will always be written to the disk?
Why people does not use FILE_FLAG_WRITE_THROUGH? It is a good question. I think the answer to this question is to answer what are the differences between the cases when FILE_FLAG_WRITE_THROUGH is enabled or disabled?
Any comments?
regards,
George
|
|
|
|
|
I wanted to operate the menu selection via space key from the keyboard.
How would I do that?
For Ex. If we select the Menu File->Open. If we hit the Enter key on
Open menu it opens File Dialog. I wanted to do the same operation on
space key.
Raj
|
|
|
|
|
Hello all,
I want to check for some folder c:\\a\\b and create if that folders does not exits.
Till now I have done with checking and creating the c:\\a
Can anyone help me hw to create the sub folder along with the main folder.
I am using below code.
<br />
int ret;<br />
char buf[ ] = "C:\\A";<br />
ret = PathFileExists(buf);<br />
if(ret == 0)<br />
{<br />
CreateDirectory(buf,NULL); <br />
}
if I give char buf[ ] = “C:\\A\\B\\”; this code has no effect .
|
|
|
|
|
one way use of PathFileExists to check its exist or no(you use of it)
(2) you can use of FindFirstFile/FindNext
(3) if you have folders name you can use of SetCurrectDirectory(); and check return value of it 0 or 1
Suresh H wrote: “C:\\A\\B\\”;
"C:\\A\\B"
|
|
|
|
|
What exactly is that you are not able to do? Weren't you answered[^] for this question already?
Nobody can give you wiser advice than yourself. - Cicero
ப்ரம்மா
|
|
|
|
|
I was trying to create main and sub folder at a time so that was the problem
Now I changed my code as below , now its working correctly..
int ret;<br />
char buf[ ] = "C:\\A"; <br />
char buf1[ ] = "C:\\A\\B"<br />
ret = PathFileExists(buf);<br />
<br />
if(ret == 0)<br />
{<br />
CreateDirectory(buf,NULL); <br />
CreateDirectory(buf1,NULL);<br />
}
Thank you WhiteSky , brahmma & Prasad for yr help.
|
|
|
|
|
One question you want to use of
char buf[ ] = "C:\\A";
char buf1[ ] = "C:\\A\\B"
char buf2[ ] = "C:\\A\\B\\C"
...
...
char buf21[ ] = "C:\\A\\B\\C\\...T"
|
|
|
|
|
Yes that is the problem ...
|
|
|
|
|
if you know folers name use of String Table of course before this if your folders are like a b c d...ab ac dc,... use of numbers and convert numbers with itoa or CString::Format forPathFileExists
then you can check and create 28 folder with a loop
(I think you use of a b c d),but if you different names use of String Table and insert folders name on it and read of it
|
|
|
|
|
Bad advise. Please see here[^]
Nobody can give you wiser advice than yourself. - Cicero
ப்ரம்மா
|
|
|
|
|
Thanks WhiteSky ......I will do the same ...;)
|
|
|
|
|
That is some dumb way of doing things. What if you have a 14 folders intermediate to create the innermost folder? Use SHCreateDirectory() or SHCreateDirectoryEx() instead.
SHCreateDirectory(NULL, TEXT("D:\\Hi there\\Good luck"));
Nobody can give you wiser advice than yourself. - Cicero
ப்ரம்மா
|
|
|
|
|
Hi brahmma,
I am getting undeclared identifier, we have to include any header or lib file ???
SHCreateDirectory(NULL, TEXT("C:\\A\\B\\C"));
SHCreateDirectoryEx(NULL, TEXT("C:\\A\\B\\C"));
error C2065: 'SHCreateDirectory' : undeclared identifier
error C2065: 'SHCreateDirectoryEx' : undeclared identifier
|
|
|
|
|
Suresh H wrote: we have to include any header or lib file ???
#include "shlobj.h" and you need to link to shell32.lib
Nobody can give you wiser advice than yourself. - Cicero
ப்ரம்மா
|
|
|
|
|
hi Brahmma ,
I added shell32.lib to project settings, but still i am getting the same error and also i ahve included #include "shlobj.h" .
can u plz tell me what is the cause ??
|
|
|
|
|
I think you need to download the latest Platform SDK.
Nobody can give you wiser advice than yourself. - Cicero
ப்ரம்மா
|
|
|
|
|
|
You need to download latest platform SDK. If its already there. Update include directories settings for your IDE, to point to updated SDK.
|
|
|
|
|
In addition to my previous reply.
Mentioned API's are available with IE version 6 onwards. Make sure sure it is present on your machine.
And to compile youe code , your need to update IE version in your app,
too.
#ifdef _WIN32_IE
#undef _WIN32_IE
#endif
#define _WIN32_IE 0x0601
Use above line of code in your application. Before including concern API file.
|
|
|
|