eynstyne Posted November 24, 2006 Share Posted November 24, 2006 $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 More sharing options...
Developers Jos Posted November 24, 2006 Developers Share Posted November 24, 2006 $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 More sharing options...
eynstyne Posted November 24, 2006 Author Share Posted November 24, 2006 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 More sharing options...
Developers Jos Posted November 24, 2006 Developers Share Posted November 24, 2006 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 More sharing options...
eynstyne Posted November 24, 2006 Author Share Posted November 24, 2006 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now