Jump to content

Midi UDF Help


eynstyne
 Share

Recommended Posts

$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]
Link to comment
Share on other sites

  • Developers

$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 ?

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
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]
Link to comment
Share on other sites

  • Developers

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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
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]
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...