# Handling .dll file using ruby in windows XP

**URL:** <https://www.ruby-forum.com/t/handling-dll-file-using-ruby-in-windows-xp/194300>\
**Category:** Ruby\
**Created:** [September 2, 2010, 7:15am UTC](https://www.ruby-forum.com/t/handling-dll-file-using-ruby-in-windows-xp/194300 "2010-09-02T07:15:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![chandraruby](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/96bed5/32.png) [@chandraruby](https://www.ruby-forum.com/u/chandraruby)\
**Post date:** [September 2, 2010, 7:15am UTC](https://www.ruby-forum.com/t/handling-dll-file-using-ruby-in-windows-xp/194300/1 "2010-09-02T07:15:46Z")

</div>

Hi,

I am new to Ruby. I want to use a dll with RUBY to change/modify the  
frequency value in a signal generator.

Is it possible to open dll file in ruby to read/write the value in it?

Thanks,  
Chandra

---

<div class="post-metadata">

**Author:** ![chandraruby](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/96bed5/32.png) [@chandraruby](https://www.ruby-forum.com/u/chandraruby)\
**Post date:** [September 2, 2010, 8:45pm UTC](https://www.ruby-forum.com/t/handling-dll-file-using-ruby-in-windows-xp/194300/2 "2010-09-02T20:45:36Z")

</div>

On Sep 2, 2:16 am, Chandra S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hi,
> 
> I am new to Ruby. I want to use a dll with RUBY to change/modify the  
> frequency value in a signal generator.
> 
> Is it possible to open dll file in ruby to read/write the value in it?

While you can alter the contents of a binary file (DLL), I presume is  
not what you want as will render the DLL useless afterwards.

Please read the API documentation of the DLL you want to use and take  
a look to Ruby FFI interface for writing down a module that interfaces  
it.

[http://wiki.github.com/ffi/ffi/](http://wiki.github.com/ffi/ffi/)
