# WIN32OLE -- missing sub-object members

**URL:** <https://www.ruby-forum.com/t/win32ole-missing-sub-object-members/79977>\
**Category:** Ruby\
**Created:** [December 20, 2006, 7:24pm UTC](https://www.ruby-forum.com/t/win32ole-missing-sub-object-members/79977 "2006-12-20T19:24:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![djlewis](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/7bcc69/32.png) [@djlewis](https://www.ruby-forum.com/u/djlewis)\
**Post date:** [December 20, 2006, 7:24pm UTC](https://www.ruby-forum.com/t/win32ole-missing-sub-object-members/79977/1 "2006-12-20T19:24:53Z")

</div>

I’m trying to connect to this set of Windows Scripting objects…

[http://www.dbpoweramp.com/developer-scripting-dmc.htm](http://www.dbpoweramp.com/developer-scripting-dmc.htm)

It seems to go OK for dMCScripting.Converter, but the other subobjects  
come up empty – they are there, but I can’t see or use any of the  
members. Here’s code to show the problem…

require ‘win32ole’

cnv = WIN32OLE::new(“dMCScripting.Converter”)  
mp3 = WIN32OLE::new(“dMCScripting.Mp3Settings”)  
ogg = WIN32OLE::new(“dMCScripting.OggSettings”)  
wav = WIN32OLE::new(“dMCScripting.WaveSettings”)  
wma = WIN32OLE::new(“dMCScripting.WMASettings”)

p = Hash.new  
p[:cnv] = cnv.ole\_get\_methods  
p[:mp3] = mp3.ole\_get\_methods  
p[:ogg] = ogg.ole\_get\_methods  
p[:wav] = wav.ole\_get\_methods  
p[:wma] = wma.ole\_get\_methods

p.each do |k, v|  
printf( “%s, %d members\n”, k, v.size)  
v.each {|x| printf( " %s\n", x.to\_s)}  
end

printf( “dMCScripting.Converters.VolumeNormalize = %d\n”,  
cnv.VolumeNormalize)  
printf( “dMCScripting.Mp3Settings.Frequency = %d\n”, mp3.Frequency)

* * *

wav, 0 members  
wma, 0 members  
cnv, 7 members  
VolumeNormalize  
PreserveTags  
DeleteSourceFiles  
ConvertToFolder  
ToFolder  
GetCompressions  
WasConvError  
mp3, 0 members  
ogg, 0 members  
dMCScripting.Converters.VolumeNormalize = 0  
dbPowerAmp2.rb:24:in `method_missing': unknown property or method `Frequency’ (WIN32OLERuntimeError)  
HRESULT error code:0x80020006  
Unknown name. from dbPowerAmp2.rb:24

* * *

Accessing the dMCScripting object in VBA/Excel works fine, or at least,  
everything is present and accounted for in the object browser.

I realize this could be a problem with the dMC dll (and I’ll ask them  
too), but even if so, any help diagnosing that would be gratefully  
accepted. Of course, if I’m doing something wrong in ruby – quite  
possible as I’m just starting with it – I’d love to hear about that.

Thanks. --David
