FlexHEX Editor - Just the Right Tool to Edit Binaries

Introduction

Files and Drives

Inspecting Data

Editing Data

Navigation

Search and Replace

Tools

Complex Data Types

Loading and Mapping

Editing Structured Data

Structure Definition

Structures

Unions

Arrays

Strings

Enumerations

Bit Structures

Basic Types

Special Fields

Advanced Features


 

 

Structures

Structure is a composite data object. It is composed of fields that can have different types.

struct RgbColor {
  unsigned byte Red;
  unsigned byte Green;
  unsigned byte Blue;
};

The above definition introduces a type RgbColor, which can be mapped to data or used in other definitions. For example, you can use the RgbColor type to define an array of pixels:

struct ScreenArea {
  unsigned dword nPixels;
  RgbColor Area[nPixels];
};

Anonymous Structures

You don't need to declare a structure type if you need it only as a part of another definition. For instance, you can skip a declaration of the RgbColor type if it is used only within the ScreenArea definition:

struct ScreenArea {
  unsigned dword nPixels;
  struct {
    unsigned byte Red;
    unsigned byte Green;
    unsigned byte Blue;
  } Area[nPixels];
};

Anonymous structure definition looks exactly as the structured type definition except there is no identifier following the struct keyword. Anonymous definition may occur only within another definition and is allowed wherever a type name is expected.

 

 
Copyright © 2007 Inv Softworks LLC
All rights reserved
 
Home | Product | Download | Order | Support | Documentation | Company