Write applications with Visual Studio .NET on Windows XP Professional.

zhaozj2021-02-08  211

Write applications with Visual Studio .NET on Windows XP Professional.

Microsoft Corporation

October 25, 2001

Please download the source code of the Temption Communication (RTC) section of this article from MSDN Downloads.

Abstract: This article discusses the efficiency advantage of developing application software on Windows XP (this article contains links to English sites).

Windows XP Professional: Developer Operating System

Have you been looking for ways to improve your own professional efficiency and production efficiency throughout the development organization? If so, use Microsoft® Windows® XP Professional as an application development platform. The reasons are as follows:

Higher reliability and performance => Higher development efficiency

Due to many improvement measures, Windows XP has a great progress than the early Microsoft operating system in terms of reliability and performance.

Compared with Windows 98 and Windows NT 4.0

When you test the latest program changes, is it exhausted by the desktop? If you develop an application for a Windows 9x platform, you may find these platforms to make your harness. Think about it again, this is true, you must test on all supported platforms, Windows XP is one of them!

Therefore, it is developed on Windows 9x, and then Windows XP is used as one of the configurations that need to be tested in the lab, why not develop on Windows XP, then test Windows 9x in the lab? It is possible to say that most of the errors encountered in Windows 9x will exist in Windows XP, so you can fully use most of the time in Windows XP's efficient development environment.

What is the reliability of Windows XP? Last year, the conclusion of the National Software Test Laboratory is that Windows 2000 Professional reliability is 14 times that of Windows 98 is 4 times the Windows NT® 4.0 Workstation. For more information, see the Microsoft Web site. The reliability test of the new round of Windows XP is being conducted, and it is expected to further improve the Windows 2000.

How fast is the speed of Windows XP? Etesting Labs Inc. Tested various desktop computing tasks and found that Windows XP is the fastest speed in all Windows operating systems. For example, as indicated in this report, the average startup time of the application in Windows XP is reduced by 25% higher than Windows 98, which allows you to enter the faster development process.

Compared with Windows 2000

Windows XP improves many core improvements in performance and reliability, in the Windows 2000 desktop system, can be obtained through the Service Pack update. Also, you can also download and install the latest device drivers from the corresponding PC peripheral manufacturer, which is improved from these up-to-date drivers.

Therefore, if you have already run Windows 2000 and install the latest updates, you will be upgraded to Windows XP mainly in order to improve the reliability and performance of the development platform, but it is a refresh.

However, Windows XP adds all reliability features may still be moved.

New reliability

Windows XP is based on Windows 2000, which adds a range of new, more efficient features, the purpose of reducing the number of serious problems. These features allow you to solve problems faster and easier to solve and provide a more reliable personal calculation experience. Reliability Improvements in Windows XP Professional discusses the new Efficiency feature of Windows XP (which includes links to more detailed information), such as the Windows driver protection feature that prevents installation and loading of problems, and device driver rollback Function (This feature has great improvements in efficiency than Windows 2000 and Windows NT "last correct configuration" options). At the same time, this article also reviews the "Dynamic Update" option in the Windows installer, which can automatically download the latest installer updates from the Windows update site.

Related Links:

Windows XP Professional Developer Center Windows XP Professional for It ProfessionalS Windows XP Professional on Microsoft.com

Quick user switch

Quick User Switch is a new feature of Windows XP, built on a Windows 2000 infrastructure, used to separate user status and data settings. The main efficiency advantage of new features is that you can test application functions in the same computer simultaneously using multiple login user profiles. If there is no Windows XP, you need to do this require multiple computers or multiple logouts and restart, very time consuming.

In this way, you can create multiple user profiles with a variety of different language and accessory settings for different network resources or local computer resource resources.

Many programming guides for specific application scenarios are discussed in the related links below.

Related Links

Platform SDK: Policies and Profiles (Platform SDK: Policy and Profile) documentation in Fast User Switching. Platform SDK: Shell Programmer's Guide (Platform SDK: Shell Programmer Guide) documentation is located in User Accounts With Fast User Switch And Remote Desktop. Platform SDK: Application Compatibility Guide (Platform SDK) documentation in Test Your Application With Fast User Switching. Platform SDK: Real-Time Communication (Platform SDK: Real-Time Communication) Document C Coding Example of Fast User Switching With RTC. Windows XP Networking Features and Enhancements.

Isolation application and parallel sequence set in Windows XP and .NET framework

Windows XP has significant superiority compared to parallel sharing and dynamic link library redirection employed in Windows 98 Second Edition and Windows 2000 Time Frames with quarantined applications and parallel assemblies. These earlier versions suggest developers to create new components to support multiple versions of the component. This method requires the registry, so the components are not completely isolated. If the registry has a conflict, the application is still possible to be destroyed.

In Windows XP, the assembly is described by a declaration that no longer rely on the registry to store and access COM activation data. This makes it completely isolated between the components. Now you can still process the shared assembly, different from the static link DLL, Windows XP configuration allows the assembly publisher, application publishers, and administrators to change the relevant content of the stroke sequence after deployment. Windows XP provides a model that secures the assembly to the assembly and manages the parallel sequence sets used by an application. The .NET framework also fully supports the isolation applications, using the assembly, declaration, explicit version management, and configuration services. Just like Windows XP implementation, the public language in .NET runs by providing the default version, or by overriding the publisher of each assembly, to enforce specific versions. Similarly, the services provided at runtime using public language, Visual Studio® .NET can automatically create declarations during code development.

Related Links

How To Build and Service Isolated Applications and Side-by-Side Assemblies for Windows XP Simplifying Deployment and Solving DLL Hell with the .NET Framework Side-by-Side and Versioning Considerations for .NET Remoting Platform SDK: Isolated Applications and Side-by- Side assemblies .NET Framework SDK: Side-by-Side Execution

Stored username and password

When logging in to a computer running Windows XP Professional, the username and password you provide will be a default security environment that connects to other computers connected to the network and connects to the Internet of INTERNET. However, many users sometimes need different usernames and passwords to connect to different resources. E.g:

You want to log in to your own computer using a standard account, but you need to connect to some computers as an administrator to maintain or find faults. When you work at home, use your username and password to connect to the server. Your account is located in a domain, but you need to access a computer in a trusted domain. When accessing different web sites, you want to use different usernames and passwords for each site.

You can access the user interface to manage the authentication credentials stored in the Advanced tab of the User Account Control Panel applet.

Enter "HH Key.chm" in the Start | "Run" dialog box, you can understand more information on this feature.

Related Links

Platform SDK: Security Credentials Management API

How many times have you been can't go home because you need to complete a long running time? Or, your launch procedure will make it run overnight, but you are worried about it at home. Or, a project can only be processed on the computer of the work unit, so I have to stay in the office?

How many times have you spent a lot of time on your own system, and another computer has reproduced these errors, but you have no physical access rights?

Windows XP Remote Desktop Connection Features For the above questions and many other situations (in which case you need to remotely and securely access another computer remotely and securely) to provide ready-made solutions.

Using Remote Desktop features, you can run applications in remote computers of Windows XP Professional remote computers from other client computers running any Windows operating system. The application runs on a computer installed on Windows XP Professional, only the keyboard input, mouse input, and display output data are transferred to the remote location over the network. Related Links

An Overview of Windows XP Remote Desktop

How to set up and use remote desktop

TUNING Remote Desktop

remote Assistance

Remote Assistance is similar to the remote desktop connection, allowing a computer to remotely view or control another computer. However, the remote assisted user interface is for users to interact, so the users on both sides need to log in to the computer and sit in front of the computer. (In fact, when the remote computer is in remote control, the remote desktop connection does not allow the user to log in to the remote computer.)

In the past, if you want to send a new design email to a customer or partner, we also need to tell them through the phone how to install, change, and fix it. The situation is now greatly changed. If your partner requests you to provide remote assistance, you can directly guide them to complete the installation process and show their changes to them, and they just need to sit there to see your computer. . If you have a web camera, it's better! Now when you show them your favorite feature, you can also see their faces.

The following links describe several solutions that can be used to launch remote assistance, as well as the details of the remote assistance in the home or in the company network.

Related Links

TechNet Step-by-Step Guide To Remote Assistance

Using Remote Assistance in Windows XP

Remote commissioning with Visual Studio .NET

How many times have you been able to ran to another building because you can't play on your computer, and even fly to the outside world to solve the problem? If you are able to directly debug the problem on your remote computer without leaving your desktop!

If you have a Visual Studio 6.0 remote debugging, you should already know how the application components running on another building server using source code, and how much efficiency can increase.

Unfortunately, you also know that it is difficult to operate stably in Visual Studio 6.0. With Visual Studio .NET, there is no such problem, but you still have to perform some setup steps, but you don't have so much requirements as before. What is even more is even, as long as the setting is successful, it will always run.

Related Links

Get Visual Studio .NET Release Candidate from here.

For more information on remote debugging using Visual Studio .NET, see the topic of the "New In The Visual Studio Debugger" in Visual Studio .NET Release Candidate.

Real-time communication (RTC)

Windows XP contains a range of new interactions for real-time communication with friends and colleagues via Windows Messenger. These features provide new programs for users to cooperate with colleagues and partners with colleagues and partners in a desktop computer or laptop, including text messages, voice and video conferencing, interactive transfer files, sharing applications Or graphics, or at the entire desktop of friends or colleagues, to provide remote assistance.

Developers can also use these collaboration functions to use these collaboration functions in their own applications. Reuse the WebBrowser control enables developers to easily add browsing, documents to the application in their applications. Similarly, the new RTC API in Windows XP enables developers to easily integrate Windows XP real-time communication features into their own applications. In addition to integrated communication based on PC to PC sessions (such as visible in Windows Messenger), the RTC Client Application Programming Interface (API) can also implement PC to calls and calls to calls.

Related Links

Windows Messenger in Windows XP Windows Messenger: New Waves of Innovation Platform SDK: Real-Time Communications (RTC) Client API Platform SDK includes Visual C ® 6.0 and Visual Basic® 6.0 samples, demonstrate how to create PC to PC, PC to call And the audio and video session call to the phone; how to implement application sharing in the PC to PC sessions; and how to receive, respond, and disconnect PC calls. You can download and install Platform SDK here (make sure to select the check box, the following example), and then you will find the sample to be downloaded to the installation drive / program files / Microsoft SDK / Samples / NetDS / RTC folder. Use the RTC as a control in the Windows Form (see below).

WINDOWS XP development with Visual Studio .NET

Visual Studio .NET provides a set of tools for the development of Windows XP applications. These tools are based on a new multi-language mode, in which any programming language can be performed under the control of the public language runtime, which can access the same integrated development environmental function and a single unified class library equally. The application code executed on the public language is called "controlled code".

The class library provided by the .NET frame is an object-oriented, hierarchically extended API architecture that unifies the different models developed by the previous application, such as C Microsoft underlying, Java's Windows basic class, and traditional COM and Win32 programming model.

Visual Studio .NET, .NET Framework class library, and public language are runtime include creation of a Windows application, web application, and Windows service applications. They also provide the function of accessing traditional COM interfaces and DLL functions from a controlled code, and vice versa.

The rest of this article will discuss the function of accessing Windows XP from a controlled code.

Related Links

Visual Studio Developer Center .NET Development Developer Center .NET Framework SDK Developer Center .NET Framework SDK: Introduction to the .NET Framework Class Library .NET Framework SDK: .NET Framework Class Library. .NET Framework SDK: Language Interoperability Overview

Access COM components from Visual Studio .NET

Some applications need to interact with your own COM components or COM components provided by Microsoft and third parties. To simplify the development of these applications, a set of functions are provided when the public language is run, which can hide the differences between controlled and non-controlled programming models, such as calling conventions and error processing. Visual Studio .NET writes a controlled code through these features to access the functionality implemented by the COM DLL, as if the COM interface is the same as the controlled code. This is because when you add a reference to the COM type library in Visual Studio .Net, a controlled packaging is generated for the COM interface described in the Type library. Of course, this also means that there is a loss of loss when accessing the COM function from a controlled code. Related Links

.NET Framework SDK: COM Wrappers .NET Framework SDK: Interoperating with Unmanaged Code .NET Framework: Adding a Reference to a COM Type Library in Visual Studio .NET Building Distributed Applications with .NET

Provide the COM application as an XML Web service

With Windows XP and .NET frameworks, you can easily provide existing COM applications as SOAP endpoints. Thus, by clicking the check box on the "Co-Act" tab in the "COM Application" Properties dialog box of the Component Services tab, you can transform the method in the COM interface to a web service.

For more information, review the following MSDN Technical Articles and Sample Codes: Microsoft .NET and Windows XP COM Integration With SOAP.

Use RTC controls in a Windows Form

The RTC function of Windows XP can be easily accessed from the controlled code in the Visual Studio .NET by adding references to the type library (as described above).

But in the design, you need to use the RTC in the Windows Form as easy as the text box or other controls in the Visual Studio .Net toolbox, you need to do extra jobs. Therefore, we provide you with an RTC controlled packaging for Visual Studio .NET Release Candidate so you can immediately integrate RTC to a form-based Windows application.

The initial version of the RTC Controlled Package does not support the "existence" function for determining online availability and location information. We wish you to use the RTCSIMple form in the download file and send your suggestions and errors to msdn@microsoft.com, indicate "Issues for RTC Managed Wrapper" on the subject line. We will update the examples based on the best suggestions and "existent" function (after the Windows .NET Server Beta 3 required for the information is required).

You can download real-time communication COM packages here.

Related Links

.NET Framework SDK: System.Windows.Forms

Use the background intelligent transfer service in Visual Studio .NET

Do you want to use idle CPU cycles and network bandwidth to download large data files in the background? Background Intelligent Transport Service (BITS) is a channel that Windows Update is asynchronous to Windows XP Desktop, and all client applications that need to get data files from the HTTP server can be used.

As long as the user keeps logging in and network connection status, BITS will continue to download after the initial application exits. If the user logs out or disconnects the network connection, BITS will automatically suspend the transfer and restore the transfer when the user logs in and establishes a network connection. Even if the computer restarts, it can also maintain the transmission state. BITS provides a queue manager to manage four levels of front desk and background transport priority, and support polling and callbacks for transferring working status. Platform SDK includes a C example that demonstrates how to access this feature. You can download and install Platform SDK here (make sure to select the check box, the following example), then you will find the sample to download to the installation drive / program files / microsoft SDK / Samples / Web / Bits / Bits_ie folder .

C sample bits_ie highly demonstrate this feature of Visual Studio. But you may also want to know more information about the use of Visual C 6.0, see "Upgrade Previous 32-" Upgrade Previous 32- Bit Versions Of Visual C (Upgrade the previous 32-bit version of the Visual C ) topic.

If you want to use the BITS interface through the controlled code in Visual Studio .NET, you can use it according to the instructions in the .NET Framework document.

Related Links

"Platform SDK: Background Intelligent Transfer Service" in Using Bits (Platform SDK: Background Intelligent Transfer Service).

to sum up

Compared with Windows 98 SE, Windows ME, and Windows NT 4.0 Workstation, Windows XP Professional's efficiency advantage is very obvious - even from Windows 2000 Professional Upgrade, it is also worth it.

Visual Studio .NET progresses in developing Windows applications, it is the best development environment currently developing Windows XP applications.

转载请注明原文地址:https://www.9cbs.com/read-3390.html

New Post(0)