Hex Edit New Pb Gadget..

Share your advanced PureBasic knowledge/code with the community.
User avatar
CELTIC88
Enthusiast
Enthusiast
Posts: 154
Joined: Thu Sep 17, 2015 3:39 pm

Hex Edit New Pb Gadget..

Post by CELTIC88 »

Hi :),

code update .

Image


"Hex Edit" is a gadget allows the user to View and edit the hex and ascii of memory data,is fast and support a big size of memory .

is easy to use and you can change style:

Functions:
HexEdit_GetBytePositionFromXYimage:
Return the Byte position by mouse coordinate x y

HexEdit_Refresh:
update Scroll and redraw image, ideal if you changing the size of memory

HexEdit_Free:
free gadget

HexEdit_Resize;
Resize gadget

HexEdit_SetNumberOfBytesPerLine:
change the number of bytes per line

HexEdit_GetSelectedBytesSize:
Return length of the selected hex or ascii in bytes

HexEdit_GetFristSelectedBytePosition:
Return the start Byte position of the selection

HexEdit_GetCanvasGadgetId:
Return PB CanvasGadget Id

HexEdit_SetCallbackReadData:
SetCallbackReadData read example for more info

HexEdit_SetCallbackWriteData:
SetCallbackWriteData read example for more info

HexEdit_SetUserID:
set gadget identified value

HexEdit_GetUserID:
Return gadget identified value

HexEdit_GetMemorySize;
Return Memory Size

HexEdit_Enable:
Enable Gadget .

HexEdit_Disable:
Disable Gadget

HexEdit_GetSelectedBlock:
Return current Selected block = #OffsetBlock | #HexBlock | #AsciiBlock

HexEdit_SetBackImage:
Set background image gadget

HexEdit_FocusBytePosition:
Select position

HexEdit_GetFocusedBytePosition:
Return Selected position

HexEdit_SetSelectedRange:
Selects a range of memory

HexEdit_SelectAll:
Select All Bytes

HexEdit_EmptySelect:
Cancel selection

HexEdit_Clear:
clear gadget

HexEdit_ScrollFocusedBytePosition:
scroll to selected position

HexEdit_SetBinary:
View memory data

HexEdit_SetMemorySize:
change memory size and update scroll page size

HexEdit_GetMemoryAddress:
Return current memory address

HexEdit_SetMemoryAddress:
change memory Address

HexEdit_Create:
Create Gadget


HEXEDIT.PBI

Code: Select all

;- By celtic88 :) 2018. 


EnableExplicit

Prototype.i CallbackReadData(*HexEdit_Info)
Prototype.i CallbackWriteData(*HexEdit_Info)

Structure SelectArea ;Selection
  BlockSelected.l    ;Current Selected Block 
  Direction.l        ;Select Direction
  ByteStart.q        ;byte position at the beginning of the selection
  ByteEnd.q          ;byte position at the end of the selection
  ByteFixStart.q     ;first selected position
  ByteFixEnd.q       ;last selected position
  RegionStart.l      ;current selected block start position
  RegionEnd.l        ;current selected block end position
EndStructure

Structure Color ;Color
  Back.l        ;Background Color
  Hex.l         ;hex string color
  Ascii.l       ;ascii string color
  Offset.l      ;offset string color
  Slash.l       ;focused byte color
  SelectFace.l  ;selected byte string color
  SelectBack.l  ;selected byte string back color
  HeaderHex.l   ;header hex string color
  HeaderAscii.l ;header ascii string color
  HeaderOffset.l;header offset string color
  LineBlock.l   ;line Separator color
EndStructure

Structure HexEdit_Info ;HexEdit gadget structure
  *HexEditUserID       ;pointer to arbitrary data 
  
  CanvasGadgetId.i     ;Canvas Gadget Id
  ScrollVBarGadgetId.i ;ScrollVBar Gadget Id
  ScrollHBarGadgetId.i ;ScrollHBar Gadget Id
  ImageId.i            ;drawing image
  ImageBackId.i        ;Selected image Background
  
  CanvasGadgetWidth.l  ;Canvas Gadget Width
  CanvasGadgetHeight.l ;Canvas Gadget Height
  
  ScrollVBarPos.l      ;ScrollVBar position
  ScrollHBarPos.l      ;ScrollHBar position
  
  ByteCountByLine.l    ;current Count of bytes per line
  
  HeaderHeight.l       ;header size height
  
  AsciiWidthMax.l      ;Ascii character size Width
  AsciiHeightMax.l     ;Ascii character size Height
  HexByteSquareWidth.l ;Hex Square size Width
  HexCharWidthMax.l    ;Hex character size Width
  
  OffsetBlockWidth.l   ;Block "Offset" size Width
  HexBlockWidth.l      ;Block "Hex" size Width
  AsciiBlockWidth.l    ;Block "Ascii" size Width
  
  WorkSpaceWidth.l     ;Current image Canvas Width
  ImageWidth.l         ;Current image Width
  
  SeparatorBlockWidth.l ;space between blocks "width"
  SeparatorHexWidth.l   ;space between hex character "width"
  SeparatorLineHeight.l ;space between lines "Height"
  
  *MemoryAddress        ;current MemoryAddress
  MemorySize.q          ;memory size
  MemoryStartPos.q      
  MemoryPos.q           ;current memory position 
  MemoryReadPos.q       ;offset of "Memory Address" to be read
  
  LineToshowCount.l     ;maximum number of lines to display
  ByteCountToshowMax.l  ;maximum number of Bytes to display
  
  SelectOn.l            ;selection is started
  SelectOff.l           ;selection is stopped
  SelectArea.SelectArea ;selection area info
  SelectBytePos.q       ;current focused byte
  ClickTimer.q          ;"Click" Timer to detect click type
  
  Color.Color           ;coloring
  
  CallbackReadData.CallbackReadData ;callback function
  CallbackWriteData.CallbackWriteData ;callback function
  ByteToWrite.l         ;byte to write
  ByteStepToWrite.l
  
EndStructure
; 
; Procedure CallbackReadData(*HexEdit_Info.HexEdit_Info); CallbackWriteData Example
;   With *HexEdit_Info
;     \HexEditUserID 
;     \MemoryAddress 
;     \MemoryReadPos 
;     \ByteCountToshowMax 
;     
;   EndWith
; EndProcedure
; 
; Procedure CallbackWriteData(*HexEdit_Info.HexEdit_Info); CallbackWriteData Example
;   With *HexEdit_Info
;     \HexEditUserID 
;     \SelectBytePos 
;     \ByteToWrite 
;     
;   EndWith
; EndProcedure
; 
Structure HexEdit_DicByte
  ByteToHex.s
  ByteToChr.s
EndStructure

Enumeration Block
  #OffsetBlock ;Offset Block id
  #HexBlock    ;Hex Block id
  #AsciiBlock  ;Ascii Block id
EndEnumeration

;Selection Direction
#SelectDirectionUp        = -1
#SelectDirectionDown      = 1

;Color by default
#ColorBack                = $FFFFFFFF
#ColorHex                 = $FF000000
#ColorAscii               = $FF0000ff
#ColorOffset              = $FFFF0000
#ColorSlash               = $6582004B
#ColorSelectFace          = $DD808080
#ColorSelectBack          = $FF000000
#ColorHeaderHex           = $FF8B8B00
#ColorHeaderAscii         = $FF000000
#ColorHeaderOffset        = $FF000000
#ColorLineBlock           = $FF000000 

;Size by default
#SizeSeparatorBlockWidth  = 20
#SizeSeparatorHexWidth    = 7
#SizeHeaderHeight         = 50
#SizeSeparatorLineHeight  = 7
#NumberOfByteByLine       = 16

Global Dim HexEdit_DicByteToHexToChr.HexEdit_DicByte(255) 

Procedure HexEdit_SetDictionary()
  Protected p.l
  For p = 0 To 255
    HexEdit_DicByteToHexToChr(p)\ByteToHex = RSet(Hex(p),2,"0")
    HexEdit_DicByteToHexToChr(p)\ByteToChr = Chr(p)
  Next
  HexEdit_DicByteToHexToChr(0)\ByteToChr = "."
EndProcedure

HexEdit_SetDictionary()

Procedure HexEdit_GetCharMaxSize(*pHexEdit_Info.HexEdit_Info,DevOutput.i)
  With *pHexEdit_Info
    Protected.l z,w,s,h
    If StartDrawing(DevOutput)
      For z = 0 To 255
        w = TextWidth(Chr(z))
        h = TextHeight(Chr(z))
        If w > \AsciiWidthMax:\AsciiWidthMax = w:EndIf
        If h > \AsciiHeightMax:\AsciiHeightMax = h:EndIf
        If (z >= 65 And z <= 70) Or (z >= 48 And z <= 57)
          If w > \HexCharWidthMax :\HexCharWidthMax = w:EndIf
        EndIf
      Next
      StopDrawing()
    EndIf
  EndWith
EndProcedure

Procedure HexEdit_UpdateGadgetScroll(*pHexEdit_Info.HexEdit_Info)
  With *pHexEdit_Info
    Protected PageSize.q = (Round(\MemorySize / \ByteCountByLine, #PB_Round_Up) * \AsciiHeightMax ) + \HeaderHeight + (2*\AsciiHeightMax)
    SetGadgetAttribute(\ScrollVBarGadgetId,#PB_ScrollBar_Maximum,PageSize/\AsciiHeightMax)
    SetGadgetAttribute(\ScrollVBarGadgetId,#PB_ScrollBar_PageLength,\CanvasGadgetHeight/\AsciiHeightMax)
    
    SetGadgetAttribute(\ScrollHBarGadgetId,#PB_ScrollBar_Maximum,\WorkSpaceWidth)
    SetGadgetAttribute(\ScrollHBarGadgetId,#PB_ScrollBar_PageLength,\CanvasGadgetWidth)
    
    \LineToshowCount = Round((\CanvasGadgetHeight-\HeaderHeight) / \AsciiHeightMax,#PB_Round_Down)
    \ByteCountToshowMax = \LineToshowCount * \ByteCountByLine
  EndWith
EndProcedure

Procedure HexEdit_DrawImage(*pHexEdit_Info.HexEdit_Info)
  With *pHexEdit_Info
    Protected Z.l ,l.l,SelectByte.l
    Protected HexStartpos ,LineHeight =\HeaderHeight,ASciiStartpos 
    Protected Byte.l
    
    \ScrollVBarPos = GetGadgetState(\ScrollVBarGadgetId)
    \ScrollHBarPos = GetGadgetState(\ScrollHBarGadgetId)
    
    \MemoryPos = \ScrollVBarPos * \ByteCountByLine
    
    \MemoryStartPos = \MemoryPos
    \MemoryReadPos = \MemoryPos
    If \CallbackReadData:\CallbackReadData(*pHexEdit_Info):EndIf
    
    If StartDrawing(ImageOutput(\ImageId))
      DrawingMode(#PB_2DDrawing_AlphaBlend|#PB_2DDrawing_Transparent)
      
      ;Header draw
      FillMemory(DrawingBuffer(), DrawingBufferPitch() * \CanvasGadgetHeight, $00,#PB_Long)
      ;Box(0, 0, \ImageWidth, \CanvasGadgetHeight, \Color\Back)
      DrawText(10,10,"Offset",\Color\HeaderOffset,\Color\Back)
      DrawText(\OffsetBlockWidth + \HexBlockWidth + \SeparatorHexWidth,10,"Ascii",\Color\HeaderAscii,\Color\Back)
      HexStartpos =  \OffsetBlockWidth + \SeparatorHexWidth
      For Z = 0 To \ByteCountByLine-1
        DrawText(HexStartpos,10,HexEdit_DicByteToHexToChr(Z)\ByteToHex,\Color\HeaderHex,\Color\Back)
        HexStartpos + \HexByteSquareWidth + \SeparatorHexWidth
      Next  
      Box(0, \HeaderHeight-5, \WorkSpaceWidth, 3, \Color\LineBlock)
      Box(\OffsetBlockWidth-5, \HeaderHeight-5 , 1, \CanvasGadgetHeight- (\HeaderHeight-5), \Color\LineBlock)
      
      If \MemoryAddress
        For l = 1 To \LineToshowCount
          
          HexStartpos =  \OffsetBlockWidth + \SeparatorHexWidth
          ASciiStartpos = \OffsetBlockWidth + \HexBlockWidth + \SeparatorHexWidth;!
          
          DrawText(10,LineHeight,RSet(Hex(\MemoryPos),9,"0"),\Color\Offset,\Color\Back);offset
          For Z = 0 To \ByteCountByLine-1
            If \MemoryPos >= \MemorySize:Break 2:EndIf
            
            Byte = PeekA(\MemoryAddress + \MemoryReadPos)
            
            SelectByte = 0
            If \SelectOn = #True
              If  \MemoryPos  >= \SelectArea\ByteFixStart And \MemoryPos <= \SelectArea\ByteFixEnd
                SelectByte = 1
              EndIf
            EndIf
            
            If HexStartpos + \HexByteSquareWidth  >= \ScrollHBarPos + \OffsetBlockWidth And 
               HexStartpos - \ScrollHBarPos < \CanvasGadgetWidth ; hex block is show
              
              If SelectByte
                DrawText(HexStartpos,LineHeight,HexEdit_DicByteToHexToChr(Byte)\ByteToHex,\Color\SelectFace,\Color\SelectBack)
              Else
                DrawText(HexStartpos,LineHeight,HexEdit_DicByteToHexToChr(Byte)\ByteToHex,\Color\Hex,\Color\Back)
              EndIf
              
              If \SelectArea\BlockSelected = #HexBlock And \MemoryPos = \SelectBytePos And \SelectOff = #True
                Box(HexStartpos, LineHeight, \HexByteSquareWidth, \AsciiHeightMax - \SeparatorLineHeight, \Color\Slash)
              EndIf
            EndIf
            
            If ASciiStartpos +\AsciiWidthMax  >= \ScrollHBarPos + \OffsetBlockWidth And 
               ASciiStartpos - \ScrollHBarPos < \CanvasGadgetWidth ; ascii block is show
              If SelectByte
                DrawText(ASciiStartpos,LineHeight,HexEdit_DicByteToHexToChr(Byte)\ByteToChr,\Color\SelectFace,\Color\SelectBack)
              Else
                DrawText(ASciiStartpos,LineHeight,HexEdit_DicByteToHexToChr(Byte)\ByteToChr,\Color\Ascii,\Color\Back)
              EndIf
              
              If \SelectArea\BlockSelected = #AsciiBlock And \MemoryPos = \SelectBytePos And \SelectOff = #True
                Box(ASciiStartpos, LineHeight, \AsciiWidthMax, \AsciiHeightMax - \SeparatorLineHeight, \Color\Slash)
              EndIf
            EndIf
            
            ASciiStartpos + \AsciiWidthMax;TextWidth(Chr(Byte))
            HexStartpos + \HexByteSquareWidth + \SeparatorHexWidth
            \MemoryPos + 1
            \MemoryReadPos + 1
          Next
          
          LineHeight + \AsciiHeightMax
        Next
      EndIf
      
      ;Split image
      Protected ImageOffset = GrabDrawingImage(#PB_Any, 0, 0,
                                               \OffsetBlockWidth, \CanvasGadgetHeight)
      
      Protected ImageHex = GrabDrawingImage(#PB_Any, \ScrollHBarPos+\OffsetBlockWidth, 0,
                                            \ImageWidth-(\ScrollHBarPos+\OffsetBlockWidth), \CanvasGadgetHeight)
      StopDrawing()
    EndIf
    
    If StartDrawing(CanvasOutput(\CanvasGadgetId))
      If \ImageBackId ;draw Background
        DrawImage(ImageID(\ImageBackId ), 0, 0,\CanvasGadgetWidth, \CanvasGadgetHeight) 
      EndIf
      DrawingMode(#PB_2DDrawing_AlphaBlend)
      Box(0, 0, \CanvasGadgetWidth, \CanvasGadgetHeight, \Color\Back)
      DrawImage(ImageID(ImageOffset), 0, 0) 
      DrawImage(ImageID(ImageHex), \OffsetBlockWidth, 0) 
      StopDrawing()
    EndIf
    
    FreeImage(ImageOffset)
    FreeImage(ImageHex)
  EndWith
EndProcedure

Procedure HexEdit_EventVScroll()
  Protected *pHexEdit_Info.HexEdit_Info = GetGadgetData(EventGadget())
  With  *pHexEdit_Info
    If  \ScrollVBarPos <> GetGadgetState(\ScrollVBarGadgetId)
      HexEdit_DrawImage(*pHexEdit_Info)
    EndIf
    SetActiveGadget(\CanvasGadgetId)
  EndWith
EndProcedure

Procedure HexEdit_EventHScroll()
  Protected *pHexEdit_Info.HexEdit_Info = GetGadgetData(EventGadget())
  With  *pHexEdit_Info
    If  \ScrollHBarPos <> GetGadgetState(\ScrollHBarGadgetId)
      HexEdit_DrawImage(*pHexEdit_Info)
    EndIf
    SetActiveGadget(\CanvasGadgetId)
  EndWith
EndProcedure

Procedure.q HexEdit_GetBytePositionFromXYimage(*pHexEdit_Info.HexEdit_Info,x.l,y.l)
  With  *pHexEdit_Info
    Protected MemPos.q = \MemoryStartPos
    Protected Bytey.l = y - \HeaderHeight
    Bytey / \AsciiHeightMax
    Bytey * \ByteCountByLine
    x + \ScrollHBarPos
    Protected ByteX.l = x - (\OffsetBlockWidth + \SeparatorHexWidth)
    If \SelectArea\BlockSelected = #HexBlock
      ByteX / (\HexByteSquareWidth + \SeparatorHexWidth )
    Else
      ByteX - \HexBlockWidth
      ByteX / \AsciiWidthMax
    EndIf
    MemPos + Bytey + ByteX
    If MemPos < 0 :MemPos = 0:EndIf
    If MemPos > \MemorySize:MemPos = \MemorySize-1:EndIf
    ProcedureReturn MemPos
  EndWith
EndProcedure

Procedure HexEdit_EventInput()
  Protected *pHexEdit_Info.HexEdit_Info = GetGadgetData(EventGadget())
  With  *pHexEdit_Info
    Protected MouseX.l = GetGadgetAttribute(\CanvasGadgetId, #PB_Canvas_MouseX)
    Protected MouseY.l = GetGadgetAttribute(\CanvasGadgetId, #PB_Canvas_MouseY)
    Protected MouseWheelDelta.l = GetGadgetAttribute(\CanvasGadgetId, #PB_Canvas_WheelDelta)
    Protected Input.l = GetGadgetAttribute(\CanvasGadgetId, #PB_Canvas_Input)
    
    Select EventType()
      Case #PB_EventType_RightButtonDown, #PB_EventType_LeftButtonDown
        If MouseX > \OffsetBlockWidth
          \SelectArea\RegionStart = \OffsetBlockWidth
          \SelectArea\RegionEnd = \OffsetBlockWidth + \HexBlockWidth
          \SelectArea\RegionStart - \ScrollHBarPos
          \SelectArea\RegionEnd - \ScrollHBarPos
          \SelectArea\BlockSelected = #HexBlock
          If MouseX + \ScrollHBarPos >= \OffsetBlockWidth + \HexBlockWidth
            \SelectArea\BlockSelected = #AsciiBlock
            \SelectArea\RegionStart  + \HexBlockWidth
            \SelectArea\RegionEnd  + \AsciiBlockWidth
          EndIf
        EndIf
        \ByteStepToWrite = 0
        \SelectArea\Direction = #SelectDirectionDown
        \SelectOn = #True
        \SelectArea\ByteStart = HexEdit_GetBytePositionFromXYimage(*pHexEdit_Info,MouseX,MouseY)
        \SelectBytePos = \SelectArea\ByteStart
        \ClickTimer = ElapsedMilliseconds()
        If EventType() = #PB_EventType_LeftButtonDown
          \SelectArea\ByteFixStart = \SelectArea\ByteStart
          \SelectArea\ByteFixEnd = \SelectArea\ByteStart
          \SelectOff = #False
        Else
          \SelectOff = #True
          HexEdit_DrawImage(*pHexEdit_Info)
        EndIf
        
      Case #PB_EventType_MouseMove  
        If \SelectOff  =#False And \SelectOn = #True
          If MouseX < \SelectArea\RegionStart:MouseX = \SelectArea\RegionStart:EndIf
          If MouseX > \SelectArea\RegionEnd:MouseX = \SelectArea\RegionEnd:EndIf
          
          \SelectArea\ByteEnd = HexEdit_GetBytePositionFromXYimage(*pHexEdit_Info,MouseX,MouseY)
          
          \SelectArea\ByteFixStart = \SelectArea\ByteStart
          \SelectArea\ByteFixEnd = \SelectArea\ByteEnd
          \SelectArea\Direction = #SelectDirectionDown
          
          If \SelectArea\ByteEnd < \SelectArea\ByteStart
            \SelectArea\ByteFixStart = \SelectArea\ByteEnd
            \SelectArea\ByteFixEnd = \SelectArea\ByteStart
            \SelectArea\Direction = #SelectDirectionUp
          EndIf
          
          If MouseY < 0:ElseIf MouseY > \CanvasGadgetHeight 
            MouseY - \CanvasGadgetHeight
          Else
            MouseY =0
          EndIf
          
          SetGadgetState(\ScrollVBarGadgetId, \ScrollVBarPos + MouseY)
          HexEdit_DrawImage(*pHexEdit_Info)
        EndIf
        
      Case #PB_EventType_LeftButtonUp
        \ClickTimer  = ElapsedMilliseconds() - \ClickTimer  
        If \ClickTimer < 250
          \SelectOff = #True
          \SelectOn = #False
        ElseIf \SelectOn = #True
          \SelectOff = #True
        EndIf
        \SelectBytePos = \SelectArea\ByteFixEnd
        If \SelectArea\Direction = #SelectDirectionUp
          \SelectBytePos = \SelectArea\ByteFixStart
        EndIf
        HexEdit_DrawImage(*pHexEdit_Info)
        
      Case #PB_EventType_MouseWheel
        SetGadgetState(\ScrollVBarGadgetId, \ScrollVBarPos - MouseWheelDelta)
        HexEdit_DrawImage(*pHexEdit_Info)
        
      Case #PB_EventType_Input
        If \CallbackWriteData
          \ByteToWrite = Input
          
          If \SelectArea\BlockSelected = #HexBlock
            If (Input > 47 And  Input < 58) Or  
               (Input > 64 And  Input < 71) Or  
               (Input > 96 And  Input < 103)
              If \MemoryAddress And \SelectBytePos < \MemorySize
                Protected PeekA = PeekA(\MemoryAddress + \SelectBytePos)
              EndIf
              Protected ChrHex.s = "$" + Chr(Input) + Hex(PeekA & $0f)
              If \ByteStepToWrite = 1
                \ByteStepToWrite = 0
                ChrHex = "$" + Hex(PeekA >>4 & $0f) + Chr(Input)
              Else
                \ByteStepToWrite = 1
              EndIf
              \ByteToWrite = Val(ChrHex)
            Else
              ProcedureReturn
            EndIf
          EndIf
          
          \CallbackWriteData(*pHexEdit_Info)
          If \ByteStepToWrite = 0:\SelectBytePos + 1:EndIf
          If \SelectBytePos+3 > \MemoryPos
            SetGadgetState(\ScrollVBarGadgetId, \ScrollVBarPos + 1)
          EndIf
          HexEdit_DrawImage(*pHexEdit_Info)
        EndIf
        
    EndSelect
  EndWith  
EndProcedure

Procedure HexEdit_Refresh(*pHexEdit_Info.HexEdit_Info)
  HexEdit_UpdateGadgetScroll(*pHexEdit_Info)
  HexEdit_DrawImage(*pHexEdit_Info)
EndProcedure

Procedure HexEdit_Free(*pHexEdit_Info.HexEdit_Info)
  With *pHexEdit_Info
    If \ImageBackId :FreeImage(\ImageBackId) :EndIf
    FreeImage(\ImageId)
    FreeGadget(\CanvasGadgetId)
    FreeGadget(\ScrollVBarGadgetId)
    FreeGadget(\ScrollHBarGadgetId)
    FreeMemory(*pHexEdit_Info)
  EndWith
EndProcedure

Procedure HexEdit_Resize(*pHexEdit_Info.HexEdit_Info,x.l,y.l,Width.l,Height.l)
  With *pHexEdit_Info
    Width - 15:Height - 15:If Width < 1:Width=1:EndIf:If Height < 1:Height=1:EndIf
    ResizeGadget(\CanvasGadgetId,x,y,Width,Height)
    ResizeGadget(\ScrollVBarGadgetId,x+Width,y,15,Height)
    ResizeGadget(\ScrollHBarGadgetId,x,y+Height,Width,15)
    \CanvasGadgetWidth = Width
    \CanvasGadgetHeight = Height
    FreeImage(\ImageId)
    \ImageWidth = \WorkSpaceWidth
    If \ImageWidth < \CanvasGadgetWidth: \ImageWidth=\CanvasGadgetWidth:EndIf
    \ImageId = CreateImage(#PB_Any,\ImageWidth,Height,32,#PB_Image_Transparent)
    SetGadgetState(\ScrollVBarGadgetId, 0):SetGadgetState(\ScrollVBarGadgetId, \MemoryStartPos / \ByteCountByLine)
    HexEdit_Refresh(*pHexEdit_Info)
  EndWith
EndProcedure

Procedure HexEdit_SetNumberOfBytesPerLine(*pHexEdit_Info.HexEdit_Info,Size.l)
  With *pHexEdit_Info
    \ByteCountByLine = Size
    \HexBlockWidth = (\HexByteSquareWidth * \ByteCountByLine) + (\SeparatorHexWidth * \ByteCountByLine) + \SeparatorBlockWidth
    \AsciiBlockWidth =  (\AsciiWidthMax * \ByteCountByLine) + \SeparatorHexWidth
    \WorkSpaceWidth = \OffsetBlockWidth + \AsciiBlockWidth + \HexBlockWidth
    \ImageWidth = \WorkSpaceWidth
    If \ImageWidth < \CanvasGadgetWidth: \ImageWidth=\CanvasGadgetWidth:EndIf
    \ImageId = CreateImage(#PB_Any,\ImageWidth,\CanvasGadgetHeight,32,#PB_Image_Transparent)
    HexEdit_UpdateGadgetScroll(*pHexEdit_Info)
    SetGadgetState(\ScrollVBarGadgetId, 0):SetGadgetState(\ScrollVBarGadgetId, \MemoryStartPos / \ByteCountByLine)
    HexEdit_DrawImage(*pHexEdit_Info)
  EndWith
EndProcedure

Procedure.q HexEdit_GetSelectedBytesSize(*pHexEdit_Info.HexEdit_Info)
  With *pHexEdit_Info
    If \SelectOn = #True:ProcedureReturn  (\SelectArea\ByteFixEnd - \SelectArea\ByteFixStart) + 1:EndIf
  EndWith
EndProcedure

Procedure.q HexEdit_GetFristSelectedBytePosition(*pHexEdit_Info.HexEdit_Info)
  With *pHexEdit_Info
    If \SelectOn:ProcedureReturn \SelectArea\ByteFixStart:EndIf
  EndWith
EndProcedure

Procedure.i HexEdit_GetCanvasGadgetId(*pHexEdit_Info.HexEdit_Info)
  With *pHexEdit_Info
    ProcedureReturn \CanvasGadgetId
  EndWith
EndProcedure

Procedure HexEdit_SetCallbackReadData(*pHexEdit_Info.HexEdit_Info,*CallbackReadData)
  With *pHexEdit_Info
    \CallbackReadData = *CallbackReadData
    HexEdit_DrawImage(*pHexEdit_Info)
  EndWith
EndProcedure

Procedure HexEdit_SetCallbackWriteData(*pHexEdit_Info.HexEdit_Info,*CallbackWriteData)
  With *pHexEdit_Info
    \CallbackWriteData = *CallbackWriteData
  EndWith
EndProcedure

Procedure HexEdit_SetUserID(*pHexEdit_Info.HexEdit_Info,*ID)
  With *pHexEdit_Info
    \HexEditUserID = *ID
  EndWith
EndProcedure

Procedure.i HexEdit_GetUserID(*pHexEdit_Info.HexEdit_Info,*ID)
  With *pHexEdit_Info
    ProcedureReturn \HexEditUserID
  EndWith
EndProcedure

Procedure.q HexEdit_GetMemorySize(*pHexEdit_Info.HexEdit_Info)
  With *pHexEdit_Info
    ProcedureReturn \MemorySize
  EndWith
EndProcedure

Procedure HexEdit_Enable(*pHexEdit_Info.HexEdit_Info)
  With *pHexEdit_Info
    DisableGadget(\CanvasGadgetId,0)
    DisableGadget(\ScrollHBarGadgetId,0)
    DisableGadget(\ScrollVBarGadgetId,0)
  EndWith
EndProcedure

Procedure HexEdit_Disable(*pHexEdit_Info.HexEdit_Info)
  With *pHexEdit_Info
    DisableGadget(\CanvasGadgetId,1)
    DisableGadget(\ScrollHBarGadgetId,1)
    DisableGadget(\ScrollVBarGadgetId,1)
  EndWith
EndProcedure

Procedure.l HexEdit_GetSelectedBlock(*pHexEdit_Info.HexEdit_Info)
  With *pHexEdit_Info
    ProcedureReturn \SelectArea\BlockSelected
  EndWith
EndProcedure

Procedure HexEdit_SetBackImage(*pHexEdit_Info.HexEdit_Info,Image.i)
  With *pHexEdit_Info
    If \ImageBackId :FreeImage(\ImageBackId) :EndIf
    \ImageBackId = Image
    HexEdit_DrawImage(*pHexEdit_Info)
  EndWith
EndProcedure

Procedure HexEdit_FocusBytePosition(*pHexEdit_Info.HexEdit_Info,BytePos.q)
  With *pHexEdit_Info
    \SelectBytePos = BytePos
    HexEdit_DrawImage(*pHexEdit_Info)
  EndWith
EndProcedure


Procedure.q HexEdit_GetFocusedBytePosition(*pHexEdit_Info.HexEdit_Info)
  With *pHexEdit_Info
    ProcedureReturn \SelectBytePos
  EndWith
EndProcedure

Procedure HexEdit_SetSelectedRange(*pHexEdit_Info.HexEdit_Info,ByteSPos.q,ByteEPos.q)
  With *pHexEdit_Info
    \SelectOn = #True
    \SelectOff = #True
    \SelectArea\ByteStart = ByteSPos
    \SelectArea\ByteEnd = ByteEPos
    \SelectArea\ByteFixStart = \SelectArea\ByteStart
    \SelectArea\ByteFixEnd = \SelectArea\ByteEnd
    HexEdit_DrawImage(*pHexEdit_Info)
  EndWith
EndProcedure

Procedure HexEdit_SelectAll(*pHexEdit_Info.HexEdit_Info)
  With *pHexEdit_Info
    \SelectOn = #True
    \SelectOff = #True
    \SelectArea\ByteFixStart = 0
    \SelectArea\ByteFixEnd = \MemorySize
    HexEdit_DrawImage(*pHexEdit_Info)
  EndWith
EndProcedure

Procedure HexEdit_EmptySelect(*pHexEdit_Info.HexEdit_Info)
  With *pHexEdit_Info
    \SelectOn = #False
    \SelectOff = #False
    \SelectArea\ByteFixStart = 0
    \SelectArea\ByteFixEnd = 0
    HexEdit_DrawImage(*pHexEdit_Info)
  EndWith
EndProcedure

Procedure HexEdit_Clear(*pHexEdit_Info.HexEdit_Info)
  With *pHexEdit_Info
    \SelectOn = #False
    \SelectOff = #False
    \SelectBytePos = 0
    \MemorySize = 0
    \MemoryAddress = 0
    HexEdit_Refresh(*pHexEdit_Info)
  EndWith
EndProcedure

Procedure HexEdit_ScrollFocusedBytePosition(*pHexEdit_Info.HexEdit_Info)
  With *pHexEdit_Info
    SetGadgetState(\ScrollHBarGadgetId, 0):SetGadgetState(\ScrollHBarGadgetId, Mod(\SelectBytePos , \ByteCountByLine)* (\HexByteSquareWidth+\SeparatorHexWidth))
    SetGadgetState(\ScrollVBarGadgetId, 0):SetGadgetState(\ScrollVBarGadgetId, \SelectBytePos / \ByteCountByLine)
    HexEdit_DrawImage(*pHexEdit_Info)
  EndWith
EndProcedure

Procedure HexEdit_SetBinary(*pHexEdit_Info.HexEdit_Info,*PBinary, BinarySize.q)
  With *pHexEdit_Info
    HexEdit_Clear(*pHexEdit_Info)
    \MemorySize = BinarySize
    \MemoryAddress = *PBinary
    HexEdit_Refresh(*pHexEdit_Info)
  EndWith
EndProcedure

Procedure HexEdit_SetMemorySize(*pHexEdit_Info.HexEdit_Info,BinarySize.q)
  With *pHexEdit_Info
    \MemorySize = BinarySize
    HexEdit_Refresh(*pHexEdit_Info)
  EndWith
EndProcedure

Procedure.i HexEdit_GetMemoryAddress(*pHexEdit_Info.HexEdit_Info)
  With *pHexEdit_Info
    ProcedureReturn \MemoryAddress
  EndWith
EndProcedure

Procedure HexEdit_SetMemoryAddress(*pHexEdit_Info.HexEdit_Info, *MemoryAddress)
  With *pHexEdit_Info
    \MemoryAddress = *MemoryAddress
  EndWith
EndProcedure

Procedure.i HexEdit_Create(x.l,y.l,Width.l,Height.l)
  Protected *pHexEdit_Info.HexEdit_Info = AllocateMemory(SizeOf(HexEdit_Info))
  With  *pHexEdit_Info
    Width - 15:Height - 15:If Width < 1:Width=1:EndIf:If Height < 1:Height=1:EndIf
    \CanvasGadgetId = CanvasGadget(#PB_Any, x, y, Width, Height,#PB_Canvas_DrawFocus|#PB_Canvas_Keyboard)
    HexEdit_GetCharMaxSize(*pHexEdit_Info,CanvasOutput(\CanvasGadgetId))
    SetGadgetData(\CanvasGadgetId,*pHexEdit_Info)
    BindGadgetEvent(\CanvasGadgetId ,@HexEdit_EventInput())   
    
    \Color\Back = #ColorBack
    \Color\Hex = #ColorHex
    \Color\Ascii = #ColorAscii
    \Color\Offset = #ColorOffset
    \Color\Slash = #ColorSlash
    \Color\SelectFace = #ColorSelectFace
    \Color\SelectBack = #ColorSelectBack
    \Color\HeaderHex = #ColorHeaderHex
    \Color\HeaderAscii = #ColorHeaderAscii
    \Color\HeaderOffset = #ColorHeaderOffset
    \Color\LineBlock = #ColorLineBlock
    
    \CanvasGadgetWidth = Width
    \CanvasGadgetHeight = Height
    \SeparatorLineHeight = #SizeSeparatorLineHeight
    \AsciiHeightMax + #SizeSeparatorLineHeight
    \SeparatorBlockWidth = #SizeSeparatorBlockWidth
    \SeparatorHexWidth = #SizeSeparatorHexWidth
    \ByteCountByLine = #NumberOfByteByLine
    \HeaderHeight = #SizeHeaderHeight
    \HexByteSquareWidth = \HexCharWidthMax * 2
    
    \OffsetBlockWidth = (\HexCharWidthMax * 8) + \SeparatorHexWidth + \SeparatorBlockWidth
    \HexBlockWidth = (\HexByteSquareWidth * \ByteCountByLine) + (\SeparatorHexWidth * \ByteCountByLine) + \SeparatorBlockWidth
    \AsciiBlockWidth =  (\AsciiWidthMax * \ByteCountByLine) ;+ \SeparatorHexWidth
    
    \WorkSpaceWidth = \OffsetBlockWidth + \AsciiBlockWidth + \HexBlockWidth
    
    \ImageWidth = \WorkSpaceWidth
    If \ImageWidth < \CanvasGadgetWidth: \ImageWidth=\CanvasGadgetWidth:EndIf
    \ImageId = CreateImage(#PB_Any,\ImageWidth,Height,32,#PB_Image_Transparent)
    
    \ScrollVBarGadgetId = ScrollBarGadget(#PB_Any, Width + x, y, 15, Height, 0, 0, 1,#PB_ScrollBar_Vertical) 
    BindGadgetEvent(\ScrollVBarGadgetId, @HexEdit_EventVScroll())
    SetGadgetData(\ScrollVBarGadgetId,*pHexEdit_Info)
    
    \ScrollHBarGadgetId = ScrollBarGadget(#PB_Any, x, y+Height, Width, 15, 0, \WorkSpaceWidth, \CanvasGadgetWidth) 
    BindGadgetEvent(\ScrollHBarGadgetId, @HexEdit_EventHScroll())
    SetGadgetData(\ScrollHBarGadgetId,*pHexEdit_Info)
    
    HexEdit_Refresh(*pHexEdit_Info)
  EndWith
  ProcedureReturn *pHexEdit_Info
EndProcedure

DisableExplicit

Example

Code: Select all

IncludeFile "HEXEDIT.PBI"

DisableExplicit
If OpenWindow(0, 0, 0, 900, 650, "test HEXEDIT.PBI",#PB_Window_SystemMenu | #PB_Window_ScreenCentered | #PB_Window_WindowCentered)
  Global hHexEdit_Info = HexEdit_Create(0,0,900,650)
  
  Size = ((1024*1024)*11) - 1
  *mem = AllocateMemory(size)
  RandomData(*mem,size)
  
  HexEdit_SetBinary(hHexEdit_Info,*mem,size)
  Repeat:Until WaitWindowEvent() = #PB_Event_CloseWindow
  
  CurrentMemoryAddress = HexEdit_GetMemoryAddress(hHexEdit_Info)
  If CurrentMemoryAddress
    FreeMemory(CurrentMemoryAddress)
  EndIf
  
  HexEdit_Free(hHexEdit_Info)
EndIf

Enjoy!!
goodbye :)
Last edited by CELTIC88 on Sun Feb 04, 2018 5:38 pm, edited 1 time in total.
interested in Cybersecurity..
User avatar
RSBasic
Moderator
Moderator
Posts: 1218
Joined: Thu Dec 31, 2009 11:05 pm
Location: Gernsbach (Germany)
Contact:

Re: Hex Edit New Pb Gadget..

Post by RSBasic »

Great Image
Image
Image
davido
Addict
Addict
Posts: 1890
Joined: Fri Nov 09, 2012 11:04 pm
Location: Uttoxeter, UK

Re: Hex Edit New Pb Gadget..

Post by davido »

@CELTIC88,
Very nice, thank you for sharing. :D

I am assuming that you have designed this program for use on Windows machines.
I tested it on my MacBook Pro - it appears to work well.



A minor point: display on the Mac appears different from your screenshot; each line has a blank line following it.
DE AA EB
kvitaliy
Enthusiast
Enthusiast
Posts: 162
Joined: Mon May 10, 2010 4:02 pm

Re: Hex Edit New Pb Gadget..

Post by kvitaliy »

Great! Thanks for sharing!
firace
Addict
Addict
Posts: 899
Joined: Wed Nov 09, 2011 8:58 am

Re: Hex Edit New Pb Gadget..

Post by firace »

Pretty good job! But this seems to be a hex viewer, not editor... Or am I missing something?
infratec
Always Here
Always Here
Posts: 6817
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: Hex Edit New Pb Gadget..

Post by infratec »

You can change the content on both sides.
But delete is not working.
User avatar
CELTIC88
Enthusiast
Enthusiast
Posts: 154
Joined: Thu Sep 17, 2015 3:39 pm

Re: Hex Edit New Pb Gadget..

Post by CELTIC88 »

Exemple 2

Code: Select all

IncludeFile "HEXEDIT.PBI"

Global hHexEdit_Info

Procedure Window_Resize()
  Protected FormWindowWidth = WindowWidth(0)
  Protected FormWindowHeight = WindowHeight(0)    
  HexEdit_Resize(hHexEdit_Info,0,40,FormWindowWidth,FormWindowHeight-40)
EndProcedure

Procedure __CallbackGetData(*HexEdit_Info.HexEdit_Info)
  With *HexEdit_Info
    FileSeek(\HexEditUserID, \MemoryReadPos)
    \MemoryAddress = ReAllocateMemory(\MemoryAddress,\ByteCountToshowMax)
    \MemoryReadPos = 0
    ReadData(\HexEditUserID,\MemoryAddress,\ByteCountToshowMax)
  EndWith
EndProcedure

If OpenWindow(0, 0, 0, 900, 650, "test HEXEDIT.PBI", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget | #PB_Window_SizeGadget | #PB_Window_ScreenCentered | #PB_Window_WindowCentered)
  BindEvent(#PB_Event_SizeWindow ,@Window_Resize(),0)
  
  ComboBoxGadget(0, 20, 10, 100, 20)
  GadgetToolTip(0,"Number Of Octets per Line")
  For o = 7 To 256:AddGadgetItem(0, -1, Str(o+1)):o+o:Next:SetGadgetState(0,1)
  ButtonGadget(1, 340, 10, 50, 20, "go")
  StringGadget(2, 220, 10, 100, 20, "1024")
  ButtonGadget(3, 500, 10, 80, 20, "Open File..")
  
  hHexEdit_Info = HexEdit_Create(0,40,900,610)
  
  Size = ((1024*1024)*11) - 1
  *mem = AllocateMemory(size)
  RandomData(*mem,size)
  
  Repeat
    Event = WaitWindowEvent()
    Select Event
        
      Case #PB_Event_Gadget
        Select EventGadget()
          Case 0            
            HexEdit_SetNumberOfBytesPerLine(hHexEdit_Info,Val(GetGadgetText(0)))
          Case 1
            HexEdit_FocusBytePosition(hHexEdit_Info,Val(GetGadgetText(2)))
            HexEdit_ScrollFocusedBytePosition(hHexEdit_Info)
          Case 3
            File$ = OpenFileRequester("Select a File..","", "*.*|*.*",0)
            If File$
              HexEdit_Clear(hHexEdit_Info)
              FileSize.q = FileSize(File$)
              If FileSize > 0
                Id = ReadFile(#PB_Any,File$)
                HexEdit_SetUserID(hHexEdit_Info,Id)
                HexEdit_SetMemorySize(hHexEdit_Info,FileSize)
                HexEdit_SetCallbackReadData(hHexEdit_Info,@__CallbackGetData())
                
              EndIf
            EndIf
        EndSelect
        
    EndSelect
  Until Event = #PB_Event_CloseWindow
  
  CurrentMemoryAddress = HexEdit_GetMemoryAddress(hHexEdit_Info)
  If CurrentMemoryAddress
    FreeMemory(CurrentMemoryAddress)
  EndIf
  
  HexEdit_Free(hHexEdit_Info)
  If Id
    CloseFile(Id)
  EndIf
EndIf
interested in Cybersecurity..
User avatar
CELTIC88
Enthusiast
Enthusiast
Posts: 154
Joined: Thu Sep 17, 2015 3:39 pm

Re: Hex Edit New Pb Gadget..

Post by CELTIC88 »

@infratec , @firace

example

Code: Select all

IncludeFile "HEXEDIT.PBI"

EnableExplicit
Global hHexEdit_Info

;Very basic memory manager!
Procedure.i MemoryManager_InsertMemory(*MemorySource,*MemoryToInser,InserPos.q,SizeMemorySource.q,SizeMemoryToInser.q)
  *MemorySource = ReAllocateMemory(*MemorySource, SizeMemorySource + SizeMemoryToInser)
  Protected DeltaMemorySize.q = SizeMemorySource - InserPos
  If InserPos < SizeMemorySource And DeltaMemorySize > 0 
    Protected *TempMemory = AllocateMemory(DeltaMemorySize)
    CopyMemory(*MemorySource + InserPos, *TempMemory, DeltaMemorySize)
  EndIf
  CopyMemory(*MemoryToInser, *MemorySource + InserPos, SizeMemoryToInser)
  If *TempMemory
    CopyMemory(*TempMemory , *MemorySource + InserPos + SizeMemoryToInser, DeltaMemorySize)
    FreeMemory(*TempMemory)
  EndIf
  ProcedureReturn *MemorySource
EndProcedure

Procedure.i MemoryManager_DeleteMemory(*MemorySource,SizeMemorySource.q,DeleteStartPos.q,DeleteSize.q)
  If DeleteSize >= SizeMemorySource
    FreeMemory(*MemorySource):ProcedureReturn 0
  EndIf  
  CopyMemory(*MemorySource + DeleteStartPos + DeleteSize, *MemorySource + DeleteStartPos,SizeMemorySource - (DeleteStartPos + DeleteSize))
  *MemorySource = ReAllocateMemory(*MemorySource, SizeMemorySource - DeleteSize)
  ProcedureReturn *MemorySource
EndProcedure

Procedure __CallbackSetData(*HexEdit_Info.HexEdit_Info)
  With *HexEdit_Info
    If \SelectBytePos < \MemorySize
      PokeA(\MemoryAddress + \SelectBytePos, \ByteToWrite)
    EndIf
  EndWith
EndProcedure

Procedure Window_Menu()
  Protected MemoryAddress = HexEdit_GetMemoryAddress(hHexEdit_Info)
  Protected FristSelectBytePos.q = HexEdit_GetFristSelectedBytePosition(hHexEdit_Info)
  Protected SelectBytePos.q = HexEdit_GetFocusedBytePosition(hHexEdit_Info)
  Protected MemorySize.q =  HexEdit_GetMemorySize(hHexEdit_Info)
  Protected SelectedByteLen.q = HexEdit_GetSelectedBytesSize(hHexEdit_Info)
  Protected SelectedBlock.l = HexEdit_GetSelectedBlock(hHexEdit_Info)
  
  Protected p,count
  Select EventMenu()  
    Case 0
      If MemoryAddress
        MemoryAddress + FristSelectBytePos
        Protected clip.s = ""
        For p = 0 To SelectedByteLen -1
          Protected Byte = PeekA(MemoryAddress + p)
          If SelectedBlock = #HexBlock
            clip + RSet(Hex(Byte),2,"0")
          Else
            clip + Chr(Byte)
          EndIf
        Next
        SetClipboardText(clip)
      EndIf
    Case 1
      Protected Cliptxt.s = GetClipboardText()
      If Cliptxt = "":ProcedureReturn:EndIf
      Protected *amem = AllocateMemory(Len(Cliptxt))
      For p = 1 To Len(Cliptxt)
        If HexEdit_GetSelectedBlock(hHexEdit_Info) = #HexBlock  
          Protected hex = Val("$" + Mid(Cliptxt,p,2))
          p + 1
        Else
          hex = Asc(Mid(Cliptxt,p,1))
        EndIf
        PokeA(*amem + count,hex)
        count + 1
      Next
      MemoryAddress = MemoryManager_InsertMemory(MemoryAddress,*amem,SelectBytePos,MemorySize,count)
      MemorySize  + count
      HexEdit_SetMemoryAddress(hHexEdit_Info,MemoryAddress)
      HexEdit_SetMemorySize(hHexEdit_Info,MemorySize)
      HexEdit_SetSelectedRange(hHexEdit_Info,SelectBytePos,SelectBytePos + count -1)
      HexEdit_Refresh(hHexEdit_Info)
      
    Case 2
      MemoryAddress = MemoryManager_DeleteMemory(MemoryAddress,MemorySize,FristSelectBytePos,SelectedByteLen)
      MemorySize  - SelectedByteLen
      If MemorySize < 0 : MemorySize = 0 :EndIf
      HexEdit_SetMemoryAddress(hHexEdit_Info,MemoryAddress)
      HexEdit_SetMemorySize(hHexEdit_Info,MemorySize)
      HexEdit_EmptySelect(hHexEdit_Info)
      HexEdit_Refresh(hHexEdit_Info)
      
    Case 3
      HexEdit_SelectAll(hHexEdit_Info)
      
  EndSelect
EndProcedure

Procedure ShowMenu()
  DisplayPopupMenu(0,WindowID(0))
EndProcedure

DisableExplicit
If OpenWindow(0, 0, 0, 900, 650, "test HEXEDIT.PBI",#PB_Window_SystemMenu | #PB_Window_ScreenCentered | #PB_Window_WindowCentered)
  BindEvent(#PB_Event_Menu ,@Window_Menu(),0)
  CreatePopupImageMenu(0, 0)
  MenuItem(0, "&Copy" + #TAB$)
  MenuItem(1, "&Past")
  MenuItem(2, "&Delete")
  MenuBar()
  MenuItem(3, "&Select All")
  
  hHexEdit_Info = HexEdit_Create(0,0,900,650)
  
  BindGadgetEvent(HexEdit_GetCanvasGadgetId(hHexEdit_Info),@ShowMenu(),#PB_EventType_RightClick )
  
  Size = ((1024*1024)*11) - 1
  *mem = AllocateMemory(size)
  RandomData(*mem,size)
  
  HexEdit_SetBinary(hHexEdit_Info,*mem,size)
  HexEdit_SetCallbackWriteData(hHexEdit_Info,@__CallbackSetData())

  Repeat:Until WaitWindowEvent() = #PB_Event_CloseWindow
  
  CurrentMemoryAddress = HexEdit_GetMemoryAddress(hHexEdit_Info)
  If CurrentMemoryAddress
    FreeMemory(CurrentMemoryAddress)
  EndIf
  
  HexEdit_Free(hHexEdit_Info)
EndIf
interested in Cybersecurity..
User avatar
CELTIC88
Enthusiast
Enthusiast
Posts: 154
Joined: Thu Sep 17, 2015 3:39 pm

Re: Hex Edit New Pb Gadget..

Post by CELTIC88 »

thank you guys for your comments
;)
interested in Cybersecurity..
Fred
Administrator
Administrator
Posts: 16619
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Hex Edit New Pb Gadget..

Post by Fred »

Good work !
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5342
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Re: Hex Edit New Pb Gadget..

Post by Kwai chang caine »

Like usually...an amazing code of sick :shock:
Thanks a lot for sharing this jewel 8)
ImageThe happiness is a road...
Not a destination
Post Reply