c to delphi

Giganews Newsgroups
Subject: c to delphi
Posted by:  Bojan Gavrilovic (bmjgavrilov…@gmail.com)
Date: Sat, 31 Jul 2010

Hi,
can somebody tell me where I am making mistake in the converting:

typedef struct _REGISTRY_EVENT {

REG_NOTIFY_CLASS eventType;

TIME_FIELDS time;

HANDLE processId;

ULONG dataType;

ULONG dataLengthB;

ULONG registryPathLengthB;

/* Contains path and optionally data */

UCHAR registryData[];

} REGISTRY_EVENT, * PREGISTRY_EVENT;

  _Registry_Event = record
    EventType: REG_NOTIFY_CLASS;
    Time: TIME_FIELDS;
    processID: THandle;
    DataType: ULONG;
    DataLength: ULONG;
    registryPathLength: ULONG;
    registryData: array of UCHAR;
  end;

from the c code sizeof(REGISTRY_EVENT) = 36

from the delphi code sizeof(REGISTRY_EVENT) = 40

Thanks in advance

Bojan

Replies