AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Offset

Ein Thema von Spike2k3 · begonnen am 28. Aug 2004 · letzter Beitrag vom 29. Aug 2004
Antwort Antwort
Spike2k3

Registriert seit: 20. Aug 2003
73 Beiträge
 
Delphi 7 Enterprise
 
#1

Offset

  Alt 28. Aug 2004, 20:59
Hi, leute ich hab ma ne Frage...
Das ist das original:
OffsetPos OVERLAPPED <NULL,NULL,53Fh,NULL,NULL>
So und damit ist offset "0040113F" gemeint...
Nun will ich aber die Position in "0043FE7F" ändern...
OffsetPos OVERLAPPED <NULL,NULL,"Welche Zahl muss nun hier hin????",NULL,NULL>

Help...dadurch funzt das ganze Programm nich...
  Mit Zitat antworten Zitat
Assarbad
(Gast)

n/a Beiträge
 
#2

Re: Offset

  Alt 29. Aug 2004, 12: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
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 16:07 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz