using System; using ATLSimpleServ; using ClassLibrary1; using System.Diagnostics; namespace Script { //This is an example how to create and access COM object and objects implemented in CLR assembly. //COM server ATLSimpleServ (COM\ATLSimpleServ.dll) must be registered before running the sample. //Execute RegisterComServer.cmd to do the registration. class Class1 { public static void Main(string[] args) { //register COM dll Process myProcess = new Process(); myProcess.StartInfo.FileName = "RegisterComServer.cmd"; myProcess.Start(); myProcess.WaitForExit(); ClassLibrary1.Class1 assemblyType = new ClassLibrary1.Class1(); CTestObjClass COMObject = new CTestObjClass(); COMObject.Test(); } } }

AltStyle によって変換されたページ (->オリジナル) /