Skip to content

Instantly share code, notes, and snippets.

@bbrowning
Created September 17, 2010 21:53
Show Gist options
  • Select an option

  • Save bbrowning/585023 to your computer and use it in GitHub Desktop.

Select an option

Save bbrowning/585023 to your computer and use it in GitHub Desktop.
def setup(lib_path=nil)
# Setup the path to the C library
lib_path ||= "/Applications/VirtualBox.app/Contents/MacOS/VBoxXPCOMC.dylib"
# Attach to the interface
ffi_lib lib_path
attach_function :VBoxGetXPCOMCFunctions, [:uint], :pointer
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment