Win32 |
Author |
Message |
Ike Kapetan
Joined: 17 Jun 2006 Posts: 3146 Location: Europe
|
|
Back to top |
|
|
delovski
Joined: 14 Jun 2006 Posts: 3524 Location: Zagreb
|
Posted: Sun Jul 16, 2006 11:39 pm Post subject: Add/Remove Programs |
|
|
Launching Add/Remove Programs in Vista
"I am trying to launch Add/Remove Programs by running ShellExecuteEx with
"appwiz.cpl". This works fine on XP but not on Vista. Does anybody know how
to launch Add/Remove Programs programmatically in Vista?" |
|
Back to top |
|
|
delovski
Joined: 14 Jun 2006 Posts: 3524 Location: Zagreb
|
|
Back to top |
|
|
delovski
Joined: 14 Jun 2006 Posts: 3524 Location: Zagreb
|
|
Back to top |
|
|
Ike Kapetan
Joined: 17 Jun 2006 Posts: 3146 Location: Europe
|
Posted: Wed Mar 14, 2007 4:49 pm Post subject: |
|
|
RC: The only thing you can do with display names is display them
"There is no guarantee that the display name for a CD-ROM will be of any
particular form. The default in Windows XP happens to be LABEL (D:), but
there are a variety of system policies that can be used to change this, and if
any of those policies is in effect, the program can't find its CD-ROM and
refuses to run.
(For the record, the correct way of doing this would be to pass each drive
letter to the GetDriveType function to see if it is a DRIVE_CDROM; for each
such drive, call GetVolumeInformation to get the CD-ROM's volume label.)" |
|
Back to top |
|
|
Ike Kapetan
Joined: 17 Jun 2006 Posts: 3146 Location: Europe
|
|
Back to top |
|
|
delovski
Joined: 14 Jun 2006 Posts: 3524 Location: Zagreb
|
Posted: Tue May 15, 2007 4:20 pm Post subject: |
|
|
RC: Command lines need to be quoted; paths don't
"The correct statement of the rule is that command lines in the registry
should have quotation marks to protect spaces. Path names, on the other
hand, not only do not require quotation marks, but in fact must not have
quotation marks, because the quotation mark is not a part of the file name." |
|
Back to top |
|
|
delovski
Joined: 14 Jun 2006 Posts: 3524 Location: Zagreb
|
|
Back to top |
|
|
Ike Kapetan
Joined: 17 Jun 2006 Posts: 3146 Location: Europe
|
Posted: Sat Nov 10, 2007 6:51 pm Post subject: |
|
|
RC: You just have to accept that the file system can change
"If the file is indeed deleted, then it goes into "delete pending" mode, at
which point the file deletion physically occurs when the last handle is closed.
But while it's in the "delete pending" state, you can't do much with it. The
file is in limbo." |
|
Back to top |
|
|
Ike Kapetan
Joined: 17 Jun 2006 Posts: 3146 Location: Europe
|
Posted: Tue Jan 08, 2008 9:43 pm Post subject: |
|
|
RC: Taxes: Files larger than 4GB
"This means that you need to use 64-bit file offsets such as those used by
the function SetFilePointerEx (or SetFilePointer if you're willing to fight with
the somewhat roundabout way it deals with the high 32 bits of the offset)." |
|
Back to top |
|
|
delovski
Joined: 14 Jun 2006 Posts: 3524 Location: Zagreb
|
|
Back to top |
|
|
delovski
Joined: 14 Jun 2006 Posts: 3524 Location: Zagreb
|
|
Back to top |
|
|
delovski
Joined: 14 Jun 2006 Posts: 3524 Location: Zagreb
|
Posted: Sat Nov 20, 2010 12:12 am Post subject: |
|
|
graphcomp.com - General Win32 Internet Functions
"The FTP and Gopher protocols can return additional text information along
with most errors. This extended error information can be retrieved by using
the InternetGetLastResponseInfo function whenever GetLastError returns
ERROR_INTERNET_EXTENDED_ERROR (occurring after an unsuccessful fun-
ction call)." |
|
Back to top |
|
|
Ike Kapetan
Joined: 17 Jun 2006 Posts: 3146 Location: Europe
|
Posted: Tue Feb 15, 2011 11:12 am Post subject: |
|
|
msdn - FtpRenameFile Function
"The lpszExisting and lpszNew parameters can be either partially or fully
qualified file names relative to the current directory." |
|
Back to top |
|
|
delovski
Joined: 14 Jun 2006 Posts: 3524 Location: Zagreb
|
Posted: Fri Jan 17, 2020 2:28 pm Post subject: |
|
|
so - ShellExecute to open a special folder (ex: Libraries\Documents) without knowing the special folder name
"That CodeProject article has everything you need. Just call ShellExecute on
Explorer with the params specified in the table. For example ShellExecuteW(0,
"Open", "Explorer", "/N,::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\::
{21EC2020-3AEA-1069-A2DD-08002B30309D}", "", 1) should open the
Control Panel. Other, real, directories like the Desktop can be gotten the old
fashioned way: with SHGetFolderPath" |
|
Back to top |
|
|
Ike Kapetan
Joined: 17 Jun 2006 Posts: 3146 Location: Europe
|
|
Back to top |
|
|
Ike Kapetan
Joined: 17 Jun 2006 Posts: 3146 Location: Europe
|
Posted: Mon Aug 30, 2021 3:40 pm Post subject: |
|
|
so - Finding a Windows user's 'true' application data folder?
"CSIDL_APPDATA (FOLDERID_RoamingAppData) is for data that is accessible
to the calling thread's current user account (which can be impersonated) on
multiple machines (hense "roaming" data).
CSIDL_LOCAL_APPDATA (FOLDERID_LocalAppData) is for data that is
accessible to the calling thread's current user account on the local machine
only (hense "local" data).
CSIDL_COMMON_APPDATA (FOLDERID_ProgramData) is for data that is
accessible to any user account on the local machine only (not "roaming" data)." |
|
Back to top |
|
|
Ike Kapetan
Joined: 17 Jun 2006 Posts: 3146 Location: Europe
|
Posted: Wed Dec 06, 2023 3:47 pm Post subject: |
|
|
so - Maximum path length in Win32 API on Windows 11?
"NTFS is UTF-16-capable but doesn't require UTF-16 encoding. Path elements
can be any sequence of 16-bit code units (except a few reserved code units,
such as \0). Path elements can be no longer than 255 code units. The full path
can be no longer than 32k, meaning 32768 code units. WCHAR in Win32 API
terms. The Win32 file API is mostly confined by what NTFS requires, with some
admissions to FAT(32). - IInspectable" |
|
Back to top |
|
|
|