Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than kernel32, prefix the name with the module name and a period.
You can create this FileAttributes type to go in your class and be used with the alternative signature if you wish (or you can use the System.IO.FileAttributes as displayed in the below example):
This method works for Alternate Data Streams, also great when used with the Unicode header \\?\ to change the attributes of files who have paths to long to be dealt with via the shell.
Tips & Tricks:
Please add some!
Sample Code:
Using the "alternative" method above you can make calls like so:
public static void SetFileAttributes(String path, FileAttributes dwFileAttributeFlags)
{
if (!SetFileAttributesW(UnicodeHeader + path, dwFileAttributeFlags))
{
throw (Marshal.GetExceptionForHR(Marshal.GetHRForLastWin32Error()));
}
}
In the above example I have specified the W (Unicode) version of the function as opposed to the A (ANSI) version of the function and so I don't think I needed to specify the CharSet to be Unicode however I have done so for illustration purpose to show how you would force the non W version of the function to work with unicode (long) file paths. (Another user's edit: I tried this, and I think you still need to specify the CharSet.)
The file attributes used by file-handling functions, such as those of shlwapi.dll.
8/11/2012 10:26:10 PM - -203.161.81.161
Click to read this page
4/6/2008 7:23:14 AM - anonymous
Click to read this page
4/6/2008 7:23:14 AM - anonymous
Please edit this page!
Do you have...
helpful tips or sample code to share for using this API in managed code?
corrections to the existing content?
variations of the signature you want to share?
additional languages you want to include?
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).