Igor Delovski Board Forum Index Igor Delovski Board
My Own Personal Slashdot!
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

File or folder properties

 
Post new topic   Reply to topic    Igor Delovski Board Forum Index -> Win32
Win32  
Author Message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3136
Location: Europe

PostPosted: Sat Jun 17, 2006 7:16 pm    Post subject: File or folder properties Reply with quote

"I want to add the option to view file or folder properties within my program"

http://groups.google.com/group/microsoft.public.platformsdk.shell/browse_thread/thread/77cf1d6a4fc4507d

Ike


Last edited by Ike on Wed Mar 14, 2007 4:47 pm; edited 1 time in total
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Sun Jul 16, 2006 11:39 pm    Post subject: Add/Remove Programs Reply with quote

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
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Mon Oct 23, 2006 5:46 pm    Post subject: Reply with quote

Raymond: Psychic debugging: Why doesn't my program show up when I call ShellExecute?

"The problem the second person is having lies in the last parameter to the
ShellExecute function. It's nShowCmd, which is supposed to be an SW_*
value, but which this person is passing as NULL."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Wed Nov 08, 2006 11:29 pm    Post subject: Reply with quote

Translate a network-mapped drive path to a UNC path

">Any Win32 API to do this? Thanks in advance.

Have a look at WNetGetUniversalName."
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3136
Location: Europe

PostPosted: Wed Mar 14, 2007 4:49 pm    Post subject: Reply with quote

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
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3136
Location: Europe

PostPosted: Fri Mar 30, 2007 8:38 pm    Post subject: Reply with quote

RC: The buffer size parameter to GetFileVersionInfo is the size of your buffer, no really

"This code worked great... for a while... But if you had a video driver whose
version resource needed more than 1024 bytes of space, the program crashed
with stack corruption."
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Tue May 15, 2007 4:20 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Tue Oct 23, 2007 7:47 pm    Post subject: Reply with quote

RC: Superstition: Why is GetFileAttributes the way old-timers
test file existence?


"If you ask an old-timer how to test for file existence, they'll say, "Use
GetFileAttributes." This is still probably the quickest way to test for file
existence, since it requires only a single call."
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3136
Location: Europe

PostPosted: Sat Nov 10, 2007 6:51 pm    Post subject: Reply with quote

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
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3136
Location: Europe

PostPosted: Tue Jan 08, 2008 9:43 pm    Post subject: Reply with quote

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
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Tue Sep 23, 2008 12:04 am    Post subject: Reply with quote

RC: How can I tell that a directory is weird and should be excluded from
the user interface?


"The way to mark a folder as containing stuff that you shouldn't bother the user
with is to set both the FILE_ATTRIBUTE_HIDDEN and FILE_ATTRIBUTE_SYSTEM
attributes. In addition to Recycle Bin directories, this also prevents you from sea-
rching weird things like System Restore points."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Thu Jan 15, 2009 4:21 pm    Post subject: Reply with quote

RC: Where does shell.windows.com get information about file
extensions, and how do I get in on that action?


"If you double-click a file for which there is no registered handler, Windows
will offer to visit the Web service on shell.windows.com to locate a program
that can open it. But where does this information come from, and how can
you add your program to the database?"
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Sat Nov 20, 2010 12:12 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3136
Location: Europe

PostPosted: Tue Feb 15, 2011 11:12 am    Post subject: Reply with quote

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
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3524
Location: Zagreb

PostPosted: Fri Jan 17, 2020 2:28 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3136
Location: Europe

PostPosted: Sun May 03, 2020 10:23 pm    Post subject: Reply with quote

msdn - ReadDirectoryChangesW

"Retrieves information that describes the changes within the specified directory.
The function does not report changes to the specified directory itself."


example - At Github

another - Yesterday is HISTORY, Tomorrow is MYSTERY.

so - Using ReadDirectoryChangesW asynchronously in a loop

msdn - Obtaining Directory Change Notifications
Back to top
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3136
Location: Europe

PostPosted: Mon Aug 30, 2021 3:40 pm    Post subject: Reply with quote

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
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3136
Location: Europe

PostPosted: Wed Dec 06, 2023 3:47 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Igor Delovski Board Forum Index -> Win32 All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Delovski.hr
Powered by php-B.B. © 2001, 2005 php-B.B. Group