Home > Net >  C # to create activex problems
C # to create activex problems

Time:09-25

Hi:
I use c # vs2017 created a activex DLL project (not any CPU), a 64 - bit compiled through, running on IE browser HTML pages, but in Internet explorer F12 debugging HTML code prompt did not load the activex, 64, the operating system is Win10 IE11. Thank you,
The code is as follows:

Cs
.using System;
Using System. Collections. Generic;
Using System. Linq;
Using System. The Text;
Using System. The Runtime. InteropServices;
The namespace ClassLibrary1
{
[ProgId (" DemoClassLibrary1. The HelloWorld ")]
[ClassInterface (ClassInterfaceType. AutoDual)]
[Guid (" a9 731632-05 b8e f4-4 - A34E - BCA8168843B9 ")]
[ComVisible (true)]
Public class Class1
{
[ComVisible (true)]
Public String SayHello ()
{
Return "helloworld";
}
}
}


The csproj
<? The XML version="1.0" encoding="utf-8"?>



{0 d958562 a7f - 8481-4-8482-09 eaed3b86c0} & lt;/ProjectGuid>
Library
Properties
ClassLibrary1 & lt;/RootNamespace>
ClassLibrary1 & lt;/AssemblyName>
V4.6.1 & lt;/TargetFrameworkVersion>
512 & lt;/FileAlignment>
true



true
Full
False
Bin \ Debug \ & lt;/OutputPath>
DEBUG; TRACE
Prompt
4
true
False
X64 & lt;/PlatformTarget>
4096 & lt;/FileAlignment>

Pdbonly
true
Bin \ Release \ & lt;/OutputPath>
TRACE
Prompt
4


False


Miyao. Pfx









The HTML
 



DemoCSharpActiveX webpage

<body>