Opened 3 years ago

Closed 3 years ago

#3825 closed Bug (Fixed)

$tagEDITSTREAM definition is wrong in Beta when using x64

Reported by: Nine Owned by: Jpm
Milestone: Component: AutoIt
Version: Severity: None
Keywords: Cc:


It should be reverted back to the actual version :

Global Const $tagEDITSTREAM = "align 4;dword_ptr dwCookie;dword dwError;ptr pfnCallback"

This tag definition is found in GUIRichEdit.au3 UDF

Attachments (0)

Change History (5)

comment:1 Changed 3 years ago by Jpm

Unless the MSDN doc is wrong there is no error
Can you give a repro script ?

comment:2 Changed 3 years ago by Nine

Just create any Test.rtf document. And use beta.

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

#include <GUIConstantsEx.au3>
#include <GuiRichEdit.au3>
#include <WindowsConstants.au3>


Func Example()
  Local $hGui, $iMsg, $idBtnNext, $iStep = 0, $idLblMsg, $hRichEdit
  $hGui = GUICreate("Example (" & StringTrimRight(@ScriptName, StringLen(".exe")) & ")", 320, 350, -1, -1)
  $hRichEdit = _GUICtrlRichEdit_Create($hGui, "This is a test.", 10, 10, 300, 220, _
  $idLblMsg = GUICtrlCreateLabel("", 10, 235, 300, 60)
  $idBtnNext = GUICtrlCreateButton("Next", 270, 310, 40, 30)

  _GUICtrlRichEdit_StreamFromFile($hRichEdit, "Test.rtf", $FO_UTF8)
  GUICtrlSetData($idLblMsg, "Streamed From Test.rtf")

  While True
    $iMsg = GUIGetMsg()
      Case $iMsg = $GUI_EVENT_CLOSE
        _GUICtrlRichEdit_Destroy($hRichEdit) ; needed unless script crashes
EndFunc   ;==>Example

comment:3 Changed 3 years ago by Jpm

richedit structure are very special
You got the wrong behavior for $tagEDITSTREAM
They are other $tag... that can be wrong too if the UDF's that use them use extra field not aligned to 4

$tagGETTEXTEX ptr lpDefaultChar;ptr lpbUsedDefChar"
$tagMSGFILTER wparam wParam;lparam lParam"
$tagENLINK wparam wParam;lparam lParam;" & $tagCHARRANGE

can you verified if they need to be fixed too ?

Thanks for the help

comment:4 Changed 3 years ago by Nine

Based on a few tests I made, I believe the right definitions are :

Global Const $tagEDITSTREAM = "align 4;dword_ptr dwCookie;dword dwError;ptr pfnCallback"
Global Const $tagGETTEXTEX = "align 4;dword cb;dword flags;uint codepage;ptr lpDefaultChar;ptr lpbUsedDefChar"
Global Const $tagMSGFILTER = $tagNMHDR & ";align 4;uint msg;wparam wParam;lparam lParam"
Global Const $tagENLINK = $tagNMHDR & ";align 4;uint msg;wparam wParam;lparam lParam;" & $tagCHARRANGE

Notice the align 4 on the last 2 tags starts after the tagNMHDR struct

comment:5 Changed 3 years ago by Jpm

  • Milestone set to
  • Owner set to Jpm
  • Resolution set to Fixed
  • Status changed from new to closed

Fixed by revision [12543] in version:

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

as closed The owner will remain Jpm.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.