Introduction to shlwapi

Source: Internet
Author: User

In Windows, there is a shlwapi. dll file that contains a large number of windows string processing methods.ProgramIt is often used in applications. Some processing methods also exist in cruntime, but it is not convenient to use. There are some functions and related Windows API functions, such as strcpy's string processing functions such as lstrcpy. From the shlwapi name, this should be a Windows Shell API function.

Shlwapi. DLL provides a lot of methods to process windows strings. These methods can make your work easier. Generally, we need to get the suffix of a file name and use the cstring of MFC to find the string, but it is troublesome. Everyone's implementation is different. The pathfindextension function provided in shlwapi directly returns a pointer with a suffix.

 

Shlwapi is mainly divided into three types of functions. The first type is string processing function, which usually starts with Str. The second type is path or folder processing function, which usually starts with path and the third type is registry processing function, it usually starts with SH. Each type of function must be divided into A and W.

 

Common string processing functions include:

Strchr, strchri, strcmpn, strcmpni, strcspn, strcspni, strdup, bytes (formatted in bytes), bytes, bytes, strncat, bytes, strrchr, strrchri, strrstri, strspn, strstr, strstri, strtoint, strtointex (hexadecimal string can be converted to 10 hexadecimal value), strtrim (delete trailing empty string), strcat, strcmp, strcpy, chrcmpi,

 

Common Path processing functions include:

Upload, pathaddextension, pathappend, begin, combine, pathcombine, pathcompactpath, pathcompactpathex, pathcommonprefix, pathfileexists, pathfindextension, pathfindfilename (similar to the part after the basename to obtain the entire file name ), pathfindnextcomponent (get all file names except drive letters), pathfindonpath, pathgetargs, pathgetchartype, pathgetdrivenumber, pathisdirectory, pathisfilespec (only file name part, not including: And \ symbols), pathisprefix, pathisrelative, pathisroot, pathissameroot, pathisunc, pathisuncserver, pathisuncservershare, pathiscontenttype, pathisurl,
Pathmakepretty, pathmatchspec, pathparseiconlocation, pathquotespaces, pathrelativepathto, pathremoveargs, pathremovebackslash, pathremoveblanks,
Pathremoveextension, pathremovefilespec, pathrenameextension, pathsearchandqualify, pathsetdlgitempath, pathskiproot, pathstrippath,
Pathstriptoroot, pathunquotespaces, pathmakesystemfolder, pathunmakesystemfolder, pathissystemfolder

 

Common registry processing functions include:

Shdeleteemptykey, shdeletekey, shdeletevalue, shgetvalue, shsetvalue, shqueryvalueex, shenumkeyex, shenumvalue, shqueryinfokey,
Shregcreateuskey, shregopenuskey, shregqueryusvalue, shregwriteusvalue, shregdeleteusvalue, shregdeleteemptyuskey, shregenumuskey,
Shregenumusvalue, shregqueryinfouskey, shreggetusvalue, shregsetusvalue, shreggetboolusvalue, shopenregstream,

Other functions

Create a GDI help Function

Shcreateshellpalette

 

Dllgetversionproc pointer, used to obtain the dll version number

 

And dllinstall prototype Definition

Stdapi dllinstall (bool binstall, lpcwstr psz1_line );

 

 

 

 

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.