Sha256: aafa50a183734c76565939cec6704a841bbe7c2ae656970577d77f43289e80c3

Contents?: true

Size: 971 Bytes

Versions: 1

Compression:

Stored size: 971 Bytes

Contents

#!/usr/bin/env ruby

lib = File.join(File.dirname(__FILE__), '..', 'lib')
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include? lib

require 'dde'
require 'win/gui/message'

include Win::DDE
include Win::GUI::Message

# console output redirection (may need to wrap it in synchronization code, etc)
def cout *args
  print *args
end

# std::queue<XlTable> q;				// Queue contains the tables to output

# Creating DDE server and staring service with default name 'excel' and default callback
cout "Starting DDE server with service 'excel'\n"
server = DDE::XlServer.new.start_service

# Command line args define actions to be run after each successful DDE data transaction
server.actions = ARGV.empty? ? [:timer] : ARGV

# Starting message loop (necessary for DDE message processing)
cout "Starting DDE message loop\n"

msg = Msg.new  # pointer to Msg FFI struct
while msg = get_message(msg)
  translate_message(msg);
  dispatch_message(msg);
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dde-0.2.9 bin/dde_main