COM programming-Registering a COM server in the form of a DLL

Source: Internet
Author: User

This article does not involve any explanation of the technology of COM, just to say how to write a good DLL form of COM how to use. As shown, I already have a COM server in the form of a DLL and a COM client that uses a COM server:

Now this DLL's COM server to register in the operating system, so that every time the use of the COM library to know where to load this COM server.

The tool used to register the DLL's COM server is regsvr32.exe this thing, and its directory is the C-drive under the Windows\System32.

Grammar:

regsvr32 [/u] [/s] [/n] [/i[:cmdline]] dllname where dllname is the file name of the ActiveX control, it is recommended that you copy it to the System folder before installation. However, there will always be an error, saying that the corresponding module can not be found.

registration is not successful may be that the DLL file can not be copied separately to register, but to use the DLL file is located in the Software installation path to register. Locate the file path under the Software installation directory where the file is located .

In DOS, enter the command Regsvr32+dll file full path (the path under the installed software directory), and then enter, you can complete the DLL COM server registration.

Note Select the file location of the DLL's COM server.

COM programming-Registering a COM server in the form of a DLL

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.