dafritz
4/21/2006 2:55:00 PM
Here is the full code in ruby of what im trying to get working
require 'Win32API'
@file_handle= " "* 4
@var_handle=" "
create_file = Win32API.new("spssio32.dll", "spssOpenWrite", ['P','P'],
'I')
spss_set_var=Win32API.new("spssio32.dll", "spssSetVarName", ['P', 'P',
'I'], 'I')
commit_header=Win32API.new("spssio32.dll", "spssCommitHeader", ['P'],
'V')
close_file =Win32API.new("spssio32.dll", "spssCloseWrite", ['P'], 'V')
puts create_file.Call("testFile.sav", @file_handle) #puts 0 for
succesfully creating the file
puts spss_set_var.Call(@file_handle, "ruby_spss_test", 0) # puts 5 for
invalid file handle
# dont care about these until i get the previous line to output 0 for
success
commit_header.Call(@file_handle)
close_file.Call(@file_handle)