My understanding is: if FAT32 doesn't support TEMP files, than SetFileAttributes should fail to set TEMP attribute.
You need to seperate FAT from the operating system within your mind. When you call SetFileAttributes and set the file as FILE_ATTRIBUTE_TEMPORARY what happens internally is that the NT kernel calls CcInitializeCacheMap[^] and CcSetAdditionalCacheAttributes[^] which disables write-behind and essentially enables a "lazy write" which means that the file may or may not be written to disk depending on an internal algorithm based on critera such as i/o priority, filesize, media type ect...
The difference is that FAT32 does not have anywhere to store this extra information as it is an older technology. NTFS on the other hand was designed to store additional file attributes for both now and in the future as it can be extended.
GetFileAttributesEx() won't help me. I had problems understanding why ::FindFirstFile and GetFileAttributes() report different set of file attributes on FAT32.
And now I get it, TEMP files are not flushed to HDD, and therefore limitations of FAT can be see with ::FindFirstFile and not with GetFileAttributes().
I made a small test in which I created a file on USB stick (with FAT32 file system), then added a TEMP attribute to it and:
a) read file attributes right after creating file
b) then I safely removed USB drive (forcing windows to flush file to FAT)
c) re-read file attributes, now both ::FindFirstFile and GetFileAttributes() reported correct values
Now I can safely continue developing my enumeration class.
One more time, a BIG thank you to all three of you for your help, suggestions and explanations.
I am to provide RTL Layout for the CPropertySheet.
As it is derived from the CWnd, I am setting WS_EX_LAYOUTRTL as the extended style.
But it is doing nothing. Just added a Debug Assertion Failure to my code.
Please suggest me how can i provide the RTL layout for the CPropertySheet.
Thanks for your reply. I tried setting the Layout RTL flag to true for each property page in the resource file. I also set the language of these property pages to Arabic. The result was that the individual pages (tabs) are getting displayed in the Right to Left layout.
But the container window (main dialog box that is the Property Sheet) is still in LTR layout.
Please suggest for the same..
I tried the same after removing both the lines pointed by you. Still the main container window is in LTR layout.
What i got from the PSH_RTLREADING documentation and its implementation in my project, is "PSH_RTLREADING" only changes the the caption. What is require by the RTLLayout is change in the whole TITLE bar, Status bar, tabs all these should be in the Right of the screen.
Canption should be displayed in the Right of the Title bar.
However PSH_RTLREADING only changes the caption in RTL. However the position of the caption in the Title bar still reamings in teh left.
I'm trying to obtain the Windows Firewall status, which is simple enough using the get_FirewallEnabled method on INetFwProfile. The problem is that this only retrieves the local policy, which could have been overridden by the group policy and so is sometimes wrong.
Does anyone know if there's a way of retrieving the group policy? There's a get_CurrentProfileType on INetFwMgr, but this just seems to return NET_FW_PROFILE_STANDARD regardless of the policy. There's a NEW_FW_POLICY_TYPE enum, but it's not used in any methods that I can find.