According to http://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx#short_vs._long_names the 8.3 aliases are optional.
What is the API to check if there is support for 8.3 alias for particular file or device?
You can use DeviceIoControl() or ZwFsControlFile() to send a FSCTL_QUERY_PERSISTENT_VOLUME_STATE control code to the volume. It fills a FILE_FS_PERSISTENT_VOLUME_INFORMATION struct, whose VolumeFlags field will have the PERSISTENT_VOLUME_STATE_SHORT_NAME_CREATION_DISABLED flag enabled if 8.3 aliasing is disabled.
See the following article for more details and a code example:
Query Volume Setting for 8.3 State
Related
I'm using libsvm as the input data format, and want to know how I could pass column name to LightGBM cli.
I found that LightGBM python API support a parameter feature_name, does cli version support the same field? I cannot find it through doc.
https://lightgbm.readthedocs.io/en/latest/pythonapi/lightgbm.train.html#lightgbm.train
This question was cross-posted to the LightGBM issues board, https://github.com/microsoft/LightGBM/issues/3731 and answered there.
Yes, feature names in the CLI are supported by using the header parameter, documented at https://lightgbm.readthedocs.io/en/latest/Parameters.html#header. Add feature names as the first line in your data file and use that parameter to tell the LightGBM CLI to look in the header for feature names.
I'd like to get the current AirDrop status in my macOS machines.
I used to check it by reading the value of DisableAirDrop in domain com.apple.NetworkBrowser but this seems to be deprecated in latest OS versions (High Sierra and above) and now it doesn't really disable airDrop.
Instead, I check for the DiscoverableMode value in domain com.apple.sharingd is set to Off in the following manner :
defaults read com.apple.sharingd DiscoverableMode | grep 'Off'
I'd like to know whether this field (DiscoverableMode) is applicable only for airDrop only ?
In addition, is there any way i can check this for all active users and not just for current user ?
thanks
does NSURLSession send user-agent automatically has an answer that describes the NSURLSession default HTTP User-Agent string for iOS. I want to know the default format for macOS (preferably with supporting documentation), and the default format for NSURLConnection as well.
I'm seeing some very old User-Agent strings on my site, and I'm trying to verify potential sources.
It follows that same code path as the iOS one.
nsurl/887 CFNetwork/887 Darwin/17.0.0 (x86_64)
$(CFBundleName)/$(CFBundleVersion) CFNetwork/$(CFNetworkVersion) Darwin/$(DarwinVersion) ($(Architecture))
If the program doesn't have a CFBundleName, its executable name is used instead. For missing CFBundleVersion, (unknown version) is used. This typically occurs when a command line tool without a bundle calls CFNetwork.
I don't think there is any documentation for this, and the default User Agent should be treated as a debugging facility instead of a specified behavior.
I have a registry entry e.g. LocalizedString=#%programfiles%\Internet Explorer\iexplore.exe,-702
Is there a known API to extract the path and the string other than custom-ally parse it (and use LoadString)?
And then I have a defult value e.g. (default)="%programfiles%\Internet Explorer\iexplore.exe" (including the double-quotes, but without the #);
How does Windows handle this stuff?
The API function you need is called RegLoadMUIStringW. This is a Vista API so if you want to support XP you'll need to parse the registry entry manually.
Update: Actually, SHLoadIndirectString looks like it could be your XP saviour.
I'm making a network redirector and would like to support UNC.
To support UNC I should implement IOCTL_REDIR_QUERY_PATH. I have read the document but can't understand what LengthAccepted means.
Suppose my unc name is \\a\b and receive the control code with the path string \a\b\c.txt. Then what should I fill the LengthAccepted variable?
I got the anwser from osronline.com
Here is the link. http://www.osronline.com/showthread.cfm?link=222210