1. First make sure there is a mstscax.dll on your machine, and if you don't have this file, you can get it from Http://download.microsoft.com/download/whistler/tools/1.0/wxp/en-us/msrdpcli.exe
Download and install the Remote Desktop Connection software. Or use the Mstscax.dll in Windowxp, run the regsvr32 mstscax.dll for registration, Ccrun test use Mstscax.dll version number is 5.1.2600.0, in Windows2000 The server can compile.
2. Run C++builder-->components-->import Active control and find the following in the list:
Microsoft Terminal Services Active Client 1.0 Type Library (Version 1.0)
Click Install, you can choose to install it into the current package, you can also create a new one, select INTO new package--> Click Browser to save it as D:\Program files\borland\ccrun\mstsc\ MSTSC.BPK. You can fill in the Description column: Microsoft Terminal Service Control, which will appear in the package list after the installation is complete. Click OK, wait a moment, the system will prompt MSTSC.BPL will be compiled and installed, whether to continue, click Yes. At this point if all is normal, the system will be prompted with two compilation errors (hey, I mean the normal situation), is BCB bug? Hint the definition of oleprecedure cannot be found. Holy. Memory of a oleprocedure, an O, an E, it is not really a clerical error. Two oleprecedure replaced by Oleprocedure, compile again, OK, compile successfully, click Install installation.
3. If the previous step succeeds, there will be two more controls in the palette ActiveX: Mstscax and MsRdpClient, we are primarily leveraging MSTSCAX controls.
4. Common properties and methods for MSTSCAX controls:
Desktop height
Mstscax1->desktopheight = 600;
Desktop width
Mstscax1->desktopwidth = 800;
The string to display before the connection
Mstscax1->connectingtext = widestring ("welcome! Ccrun. ");
The server address of the connection
Mstscax1->server = widestring (Edtserver->text);
Window/Full-screen Mode
Mstscax1->fullscreen = false;
Screen color depth (usually 256 colors)
mstscax1->colordepth = 16;
Login user Name
Mstscax1->username = widestring (Edtusername->text);
String to display after disconnecting
Mstscax1->disconnectedtext = widestring ("886,ccrun.");
Caching bitmaps to disk
Mstscax1->advancedsettings->bitmapperistence = 1;
Enable data compression
mstscax1->advancedsettings->compress = 1;
A shell program that runs after it is connected and automatically disconnects when the shell is closed
Mstscax1->securedsettings->set_startprogram (widestring ("C:\\ccrun\\123.exe"));
Connection
Mstscax1->connect ();
Disconnect
Mstscax1->disconnect ();
5. Create a new project, drag a Mstscax control on the form, and based on the properties and methods described above, I believe you have no problem setting up your own Terminal Services client in BCB.
6. When the compiled program is published, the Mstscax.dll file must exist on the target machine, and it will not function properly until it is registered with Regsvr32.
Has the bug, the opinion and the suggestion, welcome letter to Info@ccrun.com to discuss together, do not carry the attachment, with the attachment mail all automatically deletes, thanks.