vb.net - COM in a Windows form EXE using Visual Basic/Visual Studio 12 -
i don't program in .net framework i've needed use create simple exe application logs data measurement equipment. want application have automation interface couple of methods. i've done before using delphi/pascal , straightforward, , can create class library in visual studio registers , methods , can interfaced adding comclass windows form application doesn't work, can point me in right direction?
this started comment kept growing, not off track ...
you can register dll. short answer add class library project , put com class in there. allow share functionality of class, not same instance of class.
i think problem trying establish interprocess communications. immediate suggestion not that, @ least @ first.
for start have com app interface .net class library log data. have project .net executable displays log, , updates periodically. have .net code on both sides of fence , can start investigating ways them talk each other.
the hard part invoking methods , returning values. if need responsive system can investigate named pipes inter-process communication, or using wcf service callbacks between 2 systems. problem in either case hamstrung class library not being hosted .net have limited functionality (no config file etc). if can put time lag suggest starting writing messages local datastore , polling each client, every 30 seconds or so. example app create message saying "give me measurement a" , start polling every second. dll have timer , within 30 seconds read message , write own message measurement, exe read , display. once system , running can decide whether need tackle inter-process communication, different interface.
Comments
Post a Comment