Modify

Opened 5 years ago

Closed 5 years ago

#3825 closed Bug (Fixed)

$tagEDITSTREAM definition is wrong in Beta 3.3.15.3 when using x64

Reported by: Nine Owned by: J-Paul Mesnage
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 by J-Paul Mesnage, 5 years ago

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

comment:2 by Nine, 5 years ago

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 by J-Paul Mesnage, 5 years ago

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 by Nine, 5 years ago

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 by J-Paul Mesnage, 5 years ago

Milestone: 3.3.15.4
Owner: set to J-Paul Mesnage
Resolution: Fixed
Status: newclosed

Fixed by revision [12543] in version: 3.3.15.4

Modify Ticket

Action
as closed The owner will remain J-Paul Mesnage.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.