Modify

Opened 3 years ago

Closed 3 years ago

#3825 closed Bug (Fixed)

$tagEDITSTREAM definition is wrong in Beta 3.3.15.3 when using x64

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

Description

It should be reverted back to the actual 3.3.14.5 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 ?
Thanks

comment:2 Changed 3 years ago by Nine

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

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Version=Beta
#AutoIt3Wrapper_UseX64=y
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

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

Example()

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, _
      BitOR($ES_MULTILINE, $WS_VSCROLL, $ES_AUTOVSCROLL))
  $idLblMsg = GUICtrlCreateLabel("", 10, 235, 300, 60)
  $idBtnNext = GUICtrlCreateButton("Next", 270, 310, 40, 30)
  GUISetState(@SW_SHOW)

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

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

comment:3 Changed 3 years ago by Jpm

Hi,
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 3.3.15.4
  • Owner set to Jpm
  • Resolution set to Fixed
  • Status changed from new to closed

Fixed by revision [12543] in version: 3.3.15.4

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

Action
as closed The owner will remain Jpm.
Author


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

 
Note: See TracTickets for help on using tickets.