Sign in to follow this  
Followers 0
eynstyne

Midi UDF Help

5 posts in this topic

$msg = _MidiOutGetDevCaps(0,4)

Func _MidiOutGetDevCaps($deviceid=0,$getinfo=0)
$struct = DllStructCreate("udword;udword;uint;char[128];udword;udword;udword;udword;dword")
$ret = Dllcall("winmm.dll","long","midiOutGetDevCapsA","long",$deviceid,"ptr",Dllstructgetptr($struct),"int",99)
    if not @error Then
        $get = Dllstructgetdata($struct,$getinfo)
        return $get
    EndIf
EndFunc

$msg returns "osoft GS Wavetable SW Synth"

WTF happened to "Micr" part of the return? I have set the length to 99 so it should return all characters.

Why?

;)


F@m!ly Guy Fr33k! - Avatar speaks for itself__________________________________________________________________________________________ite quotes... - Is your refrigerator running? If it is, It probably runs like you...very homosexually - Christians don't believe in gravity - Geeze Brian where do you think you are, Payless?- Show me potato Salad!__________________________________________________________________________________________Programs available - Shutdown timer[indent][/indent]

Share this post


Link to post
Share on other sites



$msg = _MidiOutGetDevCaps(0,4)

Func _MidiOutGetDevCaps($deviceid=0,$getinfo=0)
$struct = DllStructCreate("udword;udword;uint;char[128];udword;udword;udword;udword;dword")
$ret = Dllcall("winmm.dll","long","midiOutGetDevCapsA","long",$deviceid,"ptr",Dllstructgetptr($struct),"int",99)
    if not @error Then
        $get = Dllstructgetdata($struct,$getinfo)
        return $get
    EndIf
EndFunc

$msg returns "osoft GS Wavetable SW Synth"

WTF happened to "Micr" part of the return? I have set the length to 99 so it should return all characters.

Why?

;)

Where did you find that the structure starts with 2 DoubleWords? shouldn;t those be words ?

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

so in place of word put byte?


F@m!ly Guy Fr33k! - Avatar speaks for itself__________________________________________________________________________________________ite quotes... - Is your refrigerator running? If it is, It probably runs like you...very homosexually - Christians don't believe in gravity - Geeze Brian where do you think you are, Payless?- Show me potato Salad!__________________________________________________________________________________________Programs available - Shutdown timer[indent][/indent]

Share this post


Link to post
Share on other sites

Func _MidiOutGetDevCaps($deviceid = 0, $getinfo = 0)
    $struct = DllStructCreate("ushort;ushort;udword;char[128];ushort;ushort;ushort;ushort;dword")
    $ret = DllCall("winmm.dll", "long", "midiOutGetDevCapsA", "long", $deviceid, "ptr", DllStructGetPtr($struct), "int", 99)
    If Not @error Then
        $get = DllStructGetData($struct, $getinfo)
        Return $get
    EndIf
EndFunc   ;==>_MidiOutGetDevCaps


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Thank you JdeB. I knew something strange was happening!

I just looked in Microsoft knowledge base an misread things... ;)


F@m!ly Guy Fr33k! - Avatar speaks for itself__________________________________________________________________________________________ite quotes... - Is your refrigerator running? If it is, It probably runs like you...very homosexually - Christians don't believe in gravity - Geeze Brian where do you think you are, Payless?- Show me potato Salad!__________________________________________________________________________________________Programs available - Shutdown timer[indent][/indent]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0