Sha256: 9cd94fe3a43efb9b8810e9845a4ed6e7eed1a4ad5752cce4a35c4b821519e08e

Contents?: true

Size: 939 Bytes

Versions: 1

Compression:

Stored size: 939 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.11 bin/dde_main