Forum: Ruby DLL structure creation in ruby

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
B2a3d039b6ef2cdfb784ee514f057fd8?d=identicon&s=25 Basu Ks (basu)
on 2009-03-03 07:16
Hi,

I have a dll structure with params show in the code below ,

$typUUID = DllStructCreate("int;short;short;byte[8]")

       DllStructSetData($typUUID, 1, 0x626FC520)  # Sets data to the
first member (i.e int)
       DllStructSetData($typUUID, 2, 0xA41E)        # Sets data to the
second member (i.e short)
       DllStructSetData($typUUID, 3, 0x11CF)       # Sets data to the
third
member (i.e short)
       DllStructSetData($typUUID, 4, 0xA7, 1)
       DllStructSetData($typUUID, 4, 0x31, 2)
       DllStructSetData($typUUID, 4, 0x0, 3)
       DllStructSetData($typUUID, 4, 0xA0, 4)
       DllStructSetData($typUUID, 4, 0xC9, 5)
       DllStructSetData($typUUID, 4, 0x8, 6)
       DllStructSetData($typUUID, 4, 0x26, 7)
       DllStructSetData($typUUID, 4, 0x37, 8)

       pointer = DllStructGetPtr($typUUID)

     i need to use the pointer (pointer to structure ), in a dll
call.Could some one help me to create the pointer to the structure
with all the specified fields set ?

Thanks In advance !
This topic is locked and can not be replied to.