Can Ruby import a .NET dll?

While IronRuby will make short work of talking to your .NET dll (it’ll be literally no code at all), it was abandoned by microsoft, and it never got a large enough open source community to keep it going after that event. I wouldn’t recommend it these days Regarding the COM solution, this may actually be … Read more

How can a web page read from the user’s serial port?

One thing for sure, you will never be able to communicate with the local machine hardware without installing some special binaries (and run it with appropriate privileges) on the local machine. However, that doesn’t mean you necessary need to use an ActiveX component and stay stuck with Internet Explorer. Of course, you could also develop … Read more

As of today, what is the right way to work with COM objects? [duplicate]

The .NET / COM interop is well designed, and works correctly. In particular, the .NET Garbage Collector correctly tracks COM references, and will correctly release COM objects when they have no remaining runtime references. Interfering with the reference counts of COM object by calling Marshal.ReleaseComObject(…) or Marshal.FinalReleaseComObject(…) is a dangerous but common anti-pattern. Unfortunately, some … Read more

reusing Internet Explorer COM Automation Object

Try This: Set IEObject = GetObject( ,”InternetExplorer.Application” ) *Notice the comma before “InternetExplorer.Application” EDIT: Try this: Dim IE As SHDocVw.InternetExplorer Set IE = GetObject(,”InternetExplorer.Application”) You can also try this: Dim ShellApp Set ShellApp = CreateObject(“Shell.Application”) Dim ShellWindows Set ShellWindows = ShellApp.Windows() Dim i For i = 0 To ShellWindows.Count – 1 If InStr(ShellWindows.Item(i).FullName, “iexplore.exe”) <> … Read more

TFS Build server and COM references – does this work?

Using tlbimp.exe directly is not necessary. Try replacing any <COMReference> items in the project file with <COMFileReference>. An example would look like this: <ItemGroup> <COMFileReference Include=”MyComLibrary.dll”> <EmbedInteropTypes>True</EmbedInteropTypes> </COMFileReference> </ItemGroup> The COM dll doesn’t need to be registered on the machine for this to work. Each COMFileReference item can also have a WrapperTool attribute but the … Read more