How to Use mstsclib

Source: Internet
Author: User

Use aximp/source c: \ windows \ system32 \ mstsc. DLL to generate the source code of axmstsclib. DLL (axmstsclib. CS), then you can include it in your project, thus you do not need axmstsclib. DLL.

What's more, you can even remove mstsclib. DLL by manually defining the interface classes.

 

First of all, I wowould like to confirm my understanding of your issue. From
Your description, I understand that when you have drag and drop a terminal
Services control on a Windows form, a compiler error was generated. If
There is any misunderstanding, please feel free to let me know.
Based on my research, this is a known issue. The wrapper generater fails
Generate correct method for returning an Enum value. Here is a workaround.
1. md c: \ Temp
2. cd c: \ Temp
3.% <SDK bin directory >%\ aximp.exe % WINDIR % \ system32 \ mstscax. dll
This will generate mstsclib. dll and axmstsclib. dll.
Make sure InterOP. mstsclib. dll and axinterop. mstsclib. dll have been deleted
In the OBJ and bin \ debug directories.
4. Copy the generated files (without renaming)-mstsclib. dll and
Axmstsclib. DLL into the project's OBJ directory.
5. In the project's references, add mstsclib. dll and axmstsclib. dll from
The OBJ directories.
6. Now, instead of drag-drop ing the control from the toolbox, write code
To add the control:
Goto form. CS Code view
Declare: Private axmstsclib. axmstscax axmstscax1;
In initializecomponent:
This. axmstscax1 = new axmstsclib. axmstscax ();
(System. componentmodel. isupportinitialize) (This. axmstscax1). begininit ();
//
// Axmstscax1
//
This. axmstscax1.enabled = true;
This. axmstscax1.location = new system. Drawing. Point (58, 17 );
This. axmstscax1.name = "axmstscax1"
This. axmstscax1.ocxstate =
(System. Windows. Forms. axhost. State) (resources. GetObject ("axmstscax1.ocxstat
E ")));
This. axmstscax1.size = new system. Drawing. Size (192,192 );
This. axmstscax1.tabindex = 1;
....
This. Controls. Add (this. axmstscax1 );
(System. componentmodel. isupportinitialize) (This. axmstscax1). endinit ();

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.