C #. NET com component compilation setting project properties: "generate"-> "register for COM Interop ". 1. Change AssemblyInfo. cs ...... Set COM visible 1 create source code 1 register COM component DLL 3 Use VBS Script test in HTML 3 prompt cannot create ACTIVEX control ...... 4 Prompt cannot find Path 4 ---- author Attilax, 1466519819@qq.com --- my environment is vs2010... WIN7 system set project properties: "generate"-> "register for COM Interop ". Of course, you can also set the COM visibility for each interface. The ComVisibleAttribute class provides such control. Change AssemblyInfo. cs ...... Set COM to be visible // set? ComVisible is set to publish? Set? To a false? Here? Which of the following statements about D in the limit set in the process sequence? Category? Dí// right? COM group? T? Can you see ?. Such? Result? Do you want to renew your account? COM access? Q: Why? Which of the following statements about D in the limit set in the process sequence? Category? Siín ,? // What will the slave do?? Category? Siín?? ComVisible? Sex? Set hosts? Set? Is a true. Compile [assembly: ComVisible (true)] Build the source code using System; using System. collections. generic; using System. text; using System. runtime. interopServices; namespace MyLib {[ComVisible (true)] [Guid ("2CBD3D76-35F1-4f9d-9C1B-9DBFEE412F77")] public interface IMyClass {void Initialize (); void Dispose (); string VC (String path);} [ComVisible (true)] [Guid ("EA2F140A-108F-47ae-BBD5-83EEE646CC0e")] [ProgId ("MyLib. myClassa ")] pu Blic class MyClass: IMyClass {public void Initialize () {// nothing todo} public void Dispose () {// nothing todo} public String VC (String path) {// x + y; if (path. trim (). equals ("") {return "no pathx";} fastvcAtiLib. fastvcyjmC2k c = new fastvcAtiLib. fastvcyjmC2k (); // c. novc = true; // 4 test. only show pic. not show vercode text // c. oriImg = true; // img not process and get vercode... cant Echo show img pic .. c. vg = 1; c. sid = "c2n"; string VerifyCode; try {VerifyCode = c. recByte (path);} catch (Exception ex) {VerifyCode = ex. message;} return VerifyCode;} register the COM component DLL regasm ClassLibrary1.dll/codebase. If your DLL is not strongly signed, you must use the/codebase parameter to unregister and use regasm/u ClassLibrary1.dll to test <script language = "VBScript"> Dim o: Set o = CreateObject ("MyLib. myClass ") o. initialize www.2cto.com M SgBox "1 + 2 =" & o. vc ("c: \ dx.jpg") o. Dispose Set o = Nothing </script> prompts that ACTIVEX control cannot be created ...... Cause: the registration is not registered ...... The system prompts that the path cannot be found, indicating that it is already registered. The DLL may not have a strong signature, but does not specify the/CODEBASE attribute. As a result, this key value is not found in the registration. But not found.