Error calling .NET DLL method
I have a problem.
during setup.
---------------------------
---------------------------
Error calling .NET DLL method
Constructor on type 'WordLauncher.Launcher' not found.
---------------------------
ОК
---------------------------
from nsi:
File "WordLauncher.dll"
>StrCpy $0 "Hello, Signatec"
>DetailPrint $0 CLR::Call /NOUNLOAD "WordLauncher.dll" "WordLauncher.Launcher" "launch" 1 "some string value"
from dll:using System
.Reflection;
>using Microsoft.Office.Interop.Word;
>namespace WordLauncher
>{
public static class Launcher
{
staticobject missing = Missing.Value;
public staticvoid launch(string text)
{
Application Word_App = null;
Document Word_doc = null;
try
{
Word_App = new Application();
Word_doc = new Document();
}
catch
{
}
AutoCorrect autocorrect = Word_App.AutoCorrect;
AutoCorrectEntries autoEntries = autocorrect.Entries;
autoEntries.Add("Inntroduction", "Introduction");
Documents Docs = Word_App.Documents;
Word_App.Visible = true;
_Document my_Doc = (_Document)Word_doc;
Word_doc = Docs.Add(ref missing, ref missing, ref missing, ref missing);
object start = 0;
object end = 0;
Range range = Word_doc.Range(ref missing, ref missing);
range.Text = text;
}
}