AGB  ·  Datenschutz  ·  Impressum  







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

mIRC DLL und NMHTTP

Ein Thema von XnikoX · begonnen am 3. Jan 2004
Antwort Antwort
XnikoX

Registriert seit: 11. Aug 2003
11 Beiträge
 
Delphi 6 Professional
 
#1

mIRC DLL und NMHTTP

  Alt 3. Jan 2004, 00:06
Hallo,
Seit einigen Tagen schreibe ich an einer DLL für mIRC, die Suchergebnise von Google ausgibt.
Soweit so gut. Ich habe alle Funktionen bereits getestet und alles funktioniert. Wenn ich jetzt alles in eine mIRC-DLL übertrage, macht EINE Funktion/Prozedur Probleme.

Delphi-Quellcode:
procedure TGoogleDLL.SourceToList(SearchText: string; Conn: TNMHTTP);
begin
  Conn.Get('http://www.google.de/search?q=' + StrToHex(SearchText));
  GText := Conn.Body;
end;
Wenn ich die Zeile mit Conn.Get "auskommentiere" und GText manuell festlege, kackt mIRC nicht ab.
Habe auch probiert, das ganze als Funktion einzubinden, aber das macht den gleiche Fehler.
Ich vermute, dass mIRC nicht damit klar kommt, dass die DLL eine Verbindung aufbaut.
Leider sind die Fehlermeldungen sehr undeutlich. Windows Fehlermeldungen halt.
Ich habe dann überlegt, ob mIRC die DLL vielleicht sofort wieder "entladen" will, aber die Verbindung noch nicht fertig ist.
In der mIRC-Hilfe steht, wie man in der DLL dafür sorgen kann, dass die DLL nicht "entladen" wird.
Ich werde jedoch nicht schlau daraus, da das Beispiel in C ist und ich selber auch noch nicht der Delphi-Freak bin.
Hier der Auszug aus der Hilfe:

Zitat:
Keeping a DLL Loaded after a call
By default a DLL is unloaded immediately after you make the /dll or $dll() call. You can keep a DLL loaded by including a LoadDll() routine in your DLL, which mIRC calls the first time you load the DLL:

void __stdcall (*LoadDll)(LOADINFO*);

typedef struct {
DWORD mVersion;
HWND mHwnd;
BOOL mKeep;
} LOADINFO;

mVersion contains the mIRC version number in the low and high words.

mHwnd contains the window handle to the main mIRC window.

mKeep is set to TRUE by default, indicating that mIRC will keep the DLL loaded after the call. You can set mKeep to FALSE to make mIRC unload the DLL after the call (which is how previous mIRCs worked).
Ich hoffe, ich konnte alles möglichst verständlich erklären.
Also das ist der einzige Lösungsweg, der mir derzeit einfällt. Dass die DLL quasi sagt "Stopp! Noch nicht vorbei hier!".
Wenn jemand andere Alternativen hat: Her damit!

Schöne Grüße,
XnikoX


ps.: Bei IdHTTP das gleiche.
When I look into your eyes, I want to be sick
The person I once trusted is now a hypocrite
Face up, you lost what we made together
You think you're winning now, but pride is forever!
  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 14:02 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