Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.IO;
- namespace ComLib
- {
- public class LogWriter
- {
- public void WriteLine( string line )
- {
- using( var log = new StreamWriter( File.OpenWrite( @"c:log.file" ) ) )
- {
- log.WriteLine( line );
- }
- }
- }
- }
- [assembly: ComVisible( false )]
- [ComVisible( true )]
- public class LogWriter ....
- require 'win32ole'
- lib = WIN32OLE.new('ComLib.LogWriter')
- lib.WriteLine('calling .net from ruby via COM, hooray!')
- "Your Ruby Code" -> RubyCOM -> "COM-Callable Wrappers" -> "Your .NET objects"
- extern "C" __declspec ( dllexport ) void CallManagedMethod() {
- Something^ myManagedObject ...
- }
Add Comment
Please, Sign In to add comment