Shark007 Posted February 4, 2010 Posted February 4, 2010 (edited) Could someone help me with a DLLCall? This dll should return one of the following integers depending on your speaker configuration. mono = 0 headPhone = 17 stereo = 1 front 3ch = 2 quadro = 12 5.0 = 6 5.1 = 13 7.1 = 24 If FileExists(@ScriptDir & '\SpkCfg.dll') Then $a = DllCall(@ScriptDir & '\SpkCfg.dll', "int", "getSpeakerConfig") If @error Then MsgBox(0, "ERROR", "error message = " & @error) Else MsgBox(0, "SPEAKER", "The result is " & $a) EndIf Else MsgBox(0, "ERROR", "file not found") EndIf I'm quite new to using dllcall so your assistance would be very appreciated. SpkCfg.dll Edited February 4, 2010 by Shark007
Malkey Posted February 4, 2010 Posted February 4, 2010 Could someone help me with a DLLCall? This dll should return one of the following integers depending on your speaker configuration. mono = 0 headPhone = 17 stereo = 1 front 3ch = 2 quadro = 12 5.0 = 6 5.1 = 13 7.1 = 24 If FileExists(@ScriptDir & '\SpkCfg.dll') Then $a = DllCall(@ScriptDir & '\SpkCfg.dll', "int", "getSpeakerConfig") If @error Then MsgBox(0, "ERROR", "error message = " & @error) Else MsgBox(0, "SPEAKER", "The result is " & $a) EndIf Else MsgBox(0, "ERROR", "file not found") EndIf I'm quite new to using dllcall so your assistance would be very appreciated. SpkCfg.dll DllCall returns an array if successful. So, MsgBox(0, "SPEAKER", "The result is " & $a) should be MsgBox(0, "SPEAKER", "The result is " & $a[0])
Shark007 Posted February 4, 2010 Author Posted February 4, 2010 (edited) I still get error message 1, unable to use the DLL file I assume my DLLCall is poorly formatted, but really do not know. This is what I cannot get past. Edited February 4, 2010 by Shark007
PsaltyDS Posted February 4, 2010 Posted February 4, 2010 Where did this DLL come from? Is there a link to the interface specification? Documentation? Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Shark007 Posted February 4, 2010 Author Posted February 4, 2010 (edited) The dll is taken from the ffdshow inno setup. The only documentation I could find was through the ffdshow SVN repository. Edited February 5, 2010 by Shark007
PsaltyDS Posted February 4, 2010 Posted February 4, 2010 And you successfully used it in a test under VB, or VC++, or what? This doesn't sound much like an AutoIt issue. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
trancexx Posted February 4, 2010 Posted February 4, 2010 I see nothing particularly wrong. Are you sure SpkCfg.dll in script's dir is the one that you attached? ♡♡♡ . eMyvnE
Shark007 Posted February 4, 2010 Author Posted February 4, 2010 And you successfully used it in a test under VB, or VC++, or what? This doesn't sound much like an AutoIt issue.I did not claim autoit had an issue. I am trying to use the dll. I have the issue.I see nothing particularly wrong. Are you sure SpkCfg.dll in script's dir is the one that you attached?Yes, the dll was extracted from the latest ffdshow tryouts inno setup installer.
Shark007 Posted February 4, 2010 Author Posted February 4, 2010 ok, i found my problem. I wasnt paying attention to architecture. I am working on an x64 system, and it was compiling an x64 executable with a 32bit dll. All is fine. thanks for the assistance.
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