Kram3r 0 Posted September 4, 2007 (edited) Hi ! I'm trying to do an UDF for RMChart Dll. RMChart is freeware and makes really good looking charts. (http://www.rmchart.com/) I've a function on this dll thats requires the Double data type for two of its arguments, is there any work around to use this function since DllCall not allow double type ? THKZ Func _RMC_AddDataAxis($nCtrlId,$nRegion,$nAlignment=0,$nMinvalue=0,$nMaxvalue=0, _ $nTickcount=0,$nFontsize=0,$nTextcolor=0,$nLinecolor=0, $nLinestyle=0 , _ $nDecimalDigits=0,$sUnit="",$sText="",$sLabels="",$nLabelAlignment=0) $hdll = DllOpen("rmchart.dll") $return=dllcall($hdll,"long","RMC_ADDDATAAXIS","long",$nCtrlId,"long", _ $nRegion,"long",$nAlignment,"double",$nMinvalue,"double",$nMaxvalue, _ "long", $nTickcount,"long",$nFontsize,"long",$nTextcolor,"long",$nLinecolor, _ "long",$nLinestyle,"long",$nDecimalDigits,"str",$sUnit ,"str",$sText, _ "str",$sLabels,"long",$nLabelAlignment) #cs nResult (LONG) = RMC_AddDataAxis( ByVal nCtrlId (LONG), ByVal nRegion (LONG), Optional ByVal nAlignment (LONG), Optional ByVal nMinvalue (DOUBLE), Optional ByVal nMaxvalue (DOUBLE), Optional ByVal nTickcount (LONG), Optional ByVal nFontsize (LONG), Optional ByVal nTextcolor (LONG), Optional ByVal nLinecolor (LONG), Optional ByVal nLinestyle (LONG), Optional ByVal nDecimalDigits (LONG), Optional ByRef sUnit (ASCIIZ), Optional ByRef sText (ASCIIZ), Optional ByRef sLabels (ASCCIZ), Optional ByRef nLabelAlignment (LONG) ) #ce ;DllClose($hdll) ->make script hang in the 2 other calls of RMChart.dll EndFunc Edited September 4, 2007 by Kram3r To all the Devs: Thkx for AutoIt To all Mods: Thkx for the quality forum Share this post Link to post Share on other sites
martin 85 Posted September 4, 2007 Hi ! I'm trying to do an UDF for RMChart Dll. RMChart is freeware and makes really good looking charts. I've a function on this dll thats requires the Double data type for two of its arguments, is there any work around to use this function since DllCall not allow double type ? THKZ Func _RMC_AddDataAxis($nCtrlId,$nRegion,$nAlignment=0,$nMinvalue=0,$nMaxvalue=0, _ $nTickcount=0,$nFontsize=0,$nTextcolor=0,$nLinecolor=0, $nLinestyle=0 , _ $nDecimalDigits=0,$sUnit="",$sText="",$sLabels="",$nLabelAlignment=0) $hdll = DllOpen("rmchart.dll") $return=dllcall($hdll,"long","RMC_ADDDATAAXIS","long",$nCtrlId,"long", _ $nRegion,"long",$nAlignment,"double",$nMinvalue,"double",$nMaxvalue, _ "long", $nTickcount,"long",$nFontsize,"long",$nTextcolor,"long",$nLinecolor, _ "long",$nLinestyle,"long",$nDecimalDigits,"str",$sUnit ,"str",$sText, _ "str",$sLabels,"long",$nLabelAlignment) #cs nResult (LONG) = RMC_AddDataAxis( ByVal nCtrlId (LONG), ByVal nRegion (LONG), Optional ByVal nAlignment (LONG), Optional ByVal nMinvalue (DOUBLE), Optional ByVal nMaxvalue (DOUBLE), Optional ByVal nTickcount (LONG), Optional ByVal nFontsize (LONG), Optional ByVal nTextcolor (LONG), Optional ByVal nLinecolor (LONG), Optional ByVal nLinestyle (LONG), Optional ByVal nDecimalDigits (LONG), Optional ByRef sUnit (ASCIIZ), Optional ByRef sText (ASCIIZ), Optional ByRef sLabels (ASCCIZ), Optional ByRef nLabelAlignment (LONG) ) #ce ;DllClose($hdll) ->make script hang in the 2 other calls of RMChart.dll EndFunc Not sure but have you tried "int"? Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Share this post Link to post Share on other sites
Kram3r 0 Posted September 4, 2007 I do now martin, thks for the tip, but still no luck. Double type have 8 bytes, i think the problem lies there. I think i have no others errors on dll call. To all the Devs: Thkx for AutoIt To all Mods: Thkx for the quality forum Share this post Link to post Share on other sites
Zedna 289 Posted September 4, 2007 In DllStructCreate() is "int64" and "double" type but in DllCall it's really missing. So maybe this should be in "AutoIt Feature Requests" forum Resources UDF ResourcesEx UDF AutoIt Forum Search Share this post Link to post Share on other sites
Kram3r 0 Posted September 4, 2007 No workaround then , thats too bad. I will post in features request, maybe i get lucky. tnks zedna. To all the Devs: Thkx for AutoIt To all Mods: Thkx for the quality forum Share this post Link to post Share on other sites