AGB  ·  Datenschutz  ·  Impressum  







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

Header übersetzung, kleines Problemchen

Ein Thema von DelphiNub · begonnen am 8. Sep 2008 · letzter Beitrag vom 8. Sep 2008
 
DelphiNub

Registriert seit: 20. Nov 2006
11 Beiträge
 
#3

Re: Header übersetzung, kleines Problemchen

  Alt 8. Sep 2008, 17:21
Ja schonmal danke dafür ^^
Hab mal ein wenig in der Doku gekramst und das stand über die SSQ_Callback funktion:

Code:
The SSQ_Callback function is an application-defined callback function.

BOOL WINAPI SSQ_Callback(
   DWORD type,
   PSSQ_REPLY_UNION reply
);
[...]
Return Values:

The function should return TRUE to get all messages of a message loop.
If the function returns FALSE a message loop, if exists, will break.
Von daher nehme ich mal an das dann so aussehen müsste:
SSQ_CALLBACK = function( typ: DWORD; reply: PSSQ_REPLY_UNION ):BOOL; StdCall; Da SSQ_REPLY_UNION ein uniun struct ist und google mir bisher ausgespuckt hat das das dann ein variant record in delphi wäre sieht's bei mir nu so aus:
Delphi-Quellcode:
  
  SSQ_REPLY_UNION = record
    case Word of
     0: (batch_reply: PSSQ_BATCH_REPLY;);
     1: (log_reply: PChar;);
     2: (rules_reply: PSSQ_RULES_REPLY;);
     3: (rcon_reply: PChar;);
     4: (log_notify: Bool;);
  end;
  PSSQ_REPLY_UNION = ^SSQ_REPLY_UNION;
Meine funktion danach dann (als test)
Delphi-Quellcode:
function MyCB( typ: DWORD; reply: PSSQ_REPLY_UNION ): BOOL; stdcall;
begin
  form1.ListBox1.Items.Add( inttostr( typ ) ); // jaja, is nich schön
  result:= true;
end;
Beim OnCreate dann die initialisierung und ein "SSQ_SetCallbackAddress( MyCB )", was auch true zurück gibt, also von daher ja schonmal alles i.O.

Wenn ich nun aber eine funktion aufrufe die damit im zusammenhang steht gibt mir der Debugger: "Invalid parameter/packet" und danach funktioniert garnichts mehr..
  Mit Zitat antworten Zitat
 


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 15:18 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz