lcloki Posted August 15, 2005 Posted August 15, 2005 Does anybody know why that's not working?The function normally should return "ä". I also tried it with the Unicode version, but same result.Dim $str1 Dim $str2 $str1='' $str2='' $res = DllCall( "user32.dll", "int", "OemToCharA", _ "str", $str1, _ "str", $str2) MsgBox(0, "", "error: " & @error & @CRLF _ & "res: " & $res & @CRLF _ & "str1: " & $str1 & @CRLF _ & "str2: " & $str2)OemToChar Windows API (MSDN Lib)
GaryFrost Posted August 15, 2005 Posted August 15, 2005 Dim $str1 Dim $str2 $str1='' $str2='' $res = DllCall( "user32.dll", "int", "OemToChar", _ "str", $str1, _ "str", $str2) MsgBox(0, "", "error: " & @error & @CRLF _ & "res: " & $res[0] & @CRLF _ & "str1: " & $res[1] & @CRLF _ & "str2: " & $res[2]) SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
lcloki Posted August 15, 2005 Author Posted August 15, 2005 Okay, that worked! Thanks a lot, but can you explain why i have to search the result in res[0-2]? I don't understand it...
GaryFrost Posted August 15, 2005 Posted August 15, 2005 (edited) from the help fileIf the function call fails then @error is set to 1. Otherwise an array is returned that contains the function return value and a copy of all the parameters (including parameters that the function may have modified).$return[0]= function return value$return[1] = param1$return[2] = param2...$return[n] = paramnyou don't have to search, the function i helped you with will always place the value your looking for in $res[2] Edited August 15, 2005 by gafrost SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
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