Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FFI can not find "GetLogicalDriveStrings" of kernel32.dll #1881

Closed
whiteleaf7 opened this issue Aug 2, 2014 · 2 comments
Closed

FFI can not find "GetLogicalDriveStrings" of kernel32.dll #1881

whiteleaf7 opened this issue Aug 2, 2014 · 2 comments

Comments

@whiteleaf7
Copy link

sample

require "fiddle"
include Fiddle
Handle = DL::Handle
Kernel32 = Handle.new("kernel32")
Function.new(Kernel32["GetLogicalDriveStrings"], [TYPE_LONG, TYPE_VOIDP], TYPE_LONG)

output

DL::DLError: unknown symbol GetLogicalDriveStrings
     sym at c:/jruby-1.7/lib/ruby/1.9/dl.rb:325
      [] at c:/jruby-1.7/lib/ruby/1.9/dl.rb:334
  (root) at t.rb:6
>jruby -v
jruby 1.7.13 (1.9.3p392) 2014-06-24 43f133c on Java HotSpot(TM)
64-Bit Server VM 1.7.0_07-b10 [Windows 7-amd64]
@whiteleaf7 whiteleaf7 changed the title FFI can not find "GetLogicalDriveStrings" in kernel32.dll FFI can not find "GetLogicalDriveStrings" of kernel32.dll Aug 2, 2014
@djberg96
Copy link
Contributor

This is not a bug. The existing functions are "GetLogicalDriveStringsA" and "GetLogicalDriveStringsW". If you specify either of those it will work.

@MSNexploder
Copy link
Contributor

GetLogicalDriveStringsA and GetLogicalDriveStringsW work without issues using 1.7.21 and 9.1.9.0 on Win 7 (x64).

@kares kares closed this as completed May 29, 2017
@kares kares added this to the JRuby 1.7.21 milestone May 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants