[Win32utils-devel] FFI and PathRemoveBackslash

Daniel Berger djberg96 at gmail.com
Thu Apr 11 06:42:48 UTC 2013

Can someone provide me with a working example of PathRemoveBacklash and
FFI? I cannot get it to work right. It doesn't seem to modify its receiver.

# path_remove.rb
require 'ffi'

class Windows
  extend FFI::Library

  ffi_lib :shlwapi

  attach_function :PathRemoveBackslashA, [:buffer_out], :string

  def initialize(path)
    p path
    p PathRemoveBackslashA(path)
    p path

# end path_remove.rb

I thought I'd asked this before at some point but I can't find any
reference to it, so my apologies if I'm repeating myself.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/win32utils-devel/attachments/20130411/8550f97c/attachment.html>

More information about the win32utils-devel mailing list