Windows applications and configuration files

Source: Internet
Author: User
It is no new idea to provide a configuration file for each application. In early windows, many programs usually provide a ". ini "or". objects such as dat are customized or provide extended descriptions for applications. Example. config. The file with the extension ". config" is an XML file. A typical configuration file is as follows:
<Configuration>
<Deleetask>
</Appsettings>
<Runtime>
<Assemblybindingxmlns =/"urn: Schemas-Microsoft-com: ASM. V1/">
<Probingprivatepath =/"bin; usercontrol; component; doctemplate/">
</Probing>
</Assemblybinding>
</Runtime>
<! -->
<Tangrammainassemblylib =/"tangram#manager /"
Mainassemblycategory =/"tangram#manager /"
Mainframeassembly =/"tangram#manager. Application /"
Externalappcomcomponent = /"/"
Externalappassembly = /"/"
Workspaceguid =/"{9905f281-9c5d-440b-89af-ee61d3fa548a }/"
Tag =/"officexp/">
<Caption> welcome to Tangram world! </Caption>
<Workspacerunmodel =/"/"> </workspace>
<Backgroundtype =/"html/"> background.htm </background>
<Registrykey =/"tangramdesigner/" stdprofilesettings =/"4/"> </Registry>
<Skin> Merlin ENI // Merlin ENI. UiS </skin>
<Vbacomponent> docvbaserver. vbaserver.1 </vbacomponent>
<Mditabbedclienttag =/"/"> tangram?manager. mdiclientimpl.1 </mditabbedclient>
<Tangramtoolbarid> tangrambarmanager. barmanager.1 </tangramtoolbarid>
<Tangramcontrolbarid> tangramlitecontrolbard. tangramlitebar.1 </tangramcontrolbarid>
<Appplugin>
<! -- Add application plugin here: <plugin> test. Plug </plugin> -->
</Appplugin>
</Tangram>
</Configuration>
In. in the. NET environment, there is a set of Apis dedicated to processing such configuration files.. NET applications, such as Asp.net. The key configurations in the host environment depend heavily on the configuration file. It can be said that the configuration file is equivalent to a local registry in a local sense. For. net program, because. the. NET component does not need to be registered in the registry. Therefore. it is very important for the net program to find a specific component. The configuration file contains the following nodes:
<Runtime>
<Assemblybindingxmlns =/"urn: Schemas-Microsoft-com: ASM. V1/">
<Probingprivatepath =/"bin; usercontrol; component; doctemplate/">
</Probing>
</Assemblybinding>
</Runtime>
In this node, you can obtain "privatepath =/" bin; usercontrol; component; doctemplate/". This string is a series of" subdirectory "names separated by"; ", according.. NET Framework. If the developer creates each sub-directory marked by this string in the directory where the developed program is located, the developer needs.. NET component, it will be searched in these "local" directories.
In fact, even if. net is relatively unrelated to Win32 or win64 programs can also make full use of this default configuration file, the advantage of doing so is that when your system needs. net support, can be used naturally. net, we will introduce how to develop a real Win32 program in a later article, so that such Win32 programs can be supported as needed.. NET components. The typical Win32 systems are Microsoft Internet Explorer, Microsoft Office, and other application systems. The basic frameworks of these systems are Win32, but they can all be hosted.. net engine. In addition, the application of XML Reading and Writing Technology, such configuration files can make the application system and the Windows system registry isolation to reduce the burden on the registry, but also provide good support for the so-called "green software.

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.