Thema: Delphi Offset

Einzelnen Beitrag anzeigen

Assarbad
(Gast)

n/a Beiträge
 
#2

Re: Offset

  Alt 29. Aug 2004, 13:43
Das ist jetzt aber Quark. ... schau mal auf den Prototypen in C:

Code:
typedef struct _OVERLAPPED {
  ULONG_PTR Internal;
  ULONG_PTR InternalHigh;
  DWORD Offset;
  DWORD OffsetHigh;
  HANDLE hEvent;
} OVERLAPPED;

/*

*Internal*
Reserved for operating system use. This member, which specifies a system-dependent status, is valid when the GetOverlappedResult function returns without setting the extended error information to ERROR_IO_PENDING.

*InternalHigh*
Reserved for operating system use. This member, which specifies the length of the data transferred, is valid when the GetOverlappedResult function returns TRUE.

*Offset*
File position at which to start the transfer. The file position is a byte offset from the start of the file. The calling process sets this member before calling the ReadFile or WriteFile function. This member is ignored when reading from or writing to named pipes and communications devices and should be zero.

*OffsetHigh*
High-order word of the byte offset at which to start the transfer. This member is ignored when reading from or writing to named pipes and communications devices and should be zero.

*hEvent*
Handle to an event set to the signaled state when the operation has been completed. The calling process must set this member either to zero or a valid event handle before calling any overlapped functions. To create an event object, use the CreateEvent function.
Functions such as WriteFile set the event to the nonsignaled state before they begin an I/O operation.

*/
Der Operator (?) OffsetPos dürfte aber meiner Einschätzung nach das Offset der Struktur im Speicher sein - Delphi-Entsprechung:

Delphi-Quellcode:
var
  x:OVERLAPPED;

begin
  OffsetPos = @x;
end;
Das hat aber nichts mit dem Member "Offset" der Struktur zu tun. Drück dich also bitte klarer aus, wenn du eine Antwort erwartest! Welche Sprache ist das obige Beispiel ... kannst du vielleicht eine Delphi-Entsprechung geben?!

Was genau willst du ändern und geht es um das Offset der Struktur (das kann man normalerweise nicht ändern...) oder um den Wert des Members "Offset" ... vielleicht gibt es dir ja schon einen Anstoß, wenn du nur darüber nachdenkst.
  Mit Zitat antworten Zitat