Guest User

Untitled

a guest
Jun 19th, 2018
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.64 KB | None | 0 0
  1. From b0031ca74fdcf66f598a396751aabd68854646c0 Mon Sep 17 00:00:00 2001
  2. From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <v.ondruch@gmail.com>
  3. Date: Thu, 21 Oct 2010 01:34:19 +0200
  4. Subject: [PATCH] Fixed spoon for Ruby 1.8.
  5.  
  6. ---
  7. lib/spoon.rb | 5 +++--
  8. 1 files changed, 3 insertions(+), 2 deletions(-)
  9.  
  10. diff --git a/lib/spoon.rb b/lib/spoon.rb
  11. index 47e8193..abf4f1d 100644
  12. --- a/lib/spoon.rb
  13. +++ b/lib/spoon.rb
  14. @@ -14,7 +14,7 @@ module Spoon
  15.  
  16. attach_function :_posix_spawn, :posix_spawn, [:pointer, :string, :pointer, :pointer, :pointer, :pointer], :int
  17. attach_function :_posix_spawnp, :posix_spawnp, [:pointer, :string, :pointer, :pointer, :pointer, :pointer], :int
  18. - rescue FFI::NotFoundError
  19. + rescue LoadError, FFI::NotFoundError
  20. end
  21.  
  22. # BOOL WINAPI CreateProcess(
  23. @@ -34,7 +34,7 @@ module Spoon
  24. ffi_lib 'kernel32'
  25. ffi_convention :stdcall
  26.  
  27. - attach_function :_create_process, :CreateProcessW, [:buffer_in, :pointer, :pointer, :pointer, :int, :int, :pointer, :buffer_in, :pointer, :pointer], :int
  28. + attach_function :_create_process, :CreateProcessA, [:buffer_in, :pointer, :pointer, :pointer, :int, :int, :pointer, :buffer_in, :pointer, :pointer], :int
  29. attach_function :_get_last_error, :GetLastError, [], :int
  30.  
  31. class SecurityAttributes < FFI::Struct
  32. @@ -47,6 +47,7 @@ module Spoon
  33. layout :cb, :int, # DWORD
  34. :reserved, :pointer, # LPTSTR
  35. :desktop, :pointer, # LPTSTR
  36. + :title, :pointer, # LPTSTR
  37. :x, :int, # DWORD
  38. :y, :int, # DWORD
  39. :x_size, :int, # DWORD
  40. --
  41. 1.7.1
Add Comment
Please, Sign In to add comment