AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren

Windows Messages sniffen.

Ein Thema von dde · begonnen am 18. Apr 2005 · letzter Beitrag vom 1. Mai 2005
Antwort Antwort
Seite 1 von 3  1 23   
dde

Registriert seit: 7. Mai 2003
132 Beiträge
 
#1

Windows Messages sniffen.

  Alt 18. Apr 2005, 00:15
Was wisst ihr drüber. Ein paar Explorer-Messages sollen nämlich auch mein Prog erreichen, damit der unabhängig vom User die System-Info aktualisiert. Z.b. die geöffneten Fenster..
  Mit Zitat antworten Zitat
Benutzerbild von fylo
fylo

Registriert seit: 18. Feb 2004
Ort: Rostock
155 Beiträge
 
Delphi 7 Personal
 
#2

Re: Windows Messages sniffen.

  Alt 18. Apr 2005, 08:21
Hi

kannst du dein Problem einwenig genauer beschreiben? Welche Messages meinst du und was möchtest du sniffen?
have fun
fylo
  Mit Zitat antworten Zitat
dde

Registriert seit: 7. Mai 2003
132 Beiträge
 
#3

Re: Windows Messages sniffen.

  Alt 18. Apr 2005, 09:09
Ich prog gerad ein Systemtool. Das kann z.B. die versteckten Fenster herausbekommen und bei Bedarf anzeigen. Nun können jedoch mit der Zeit neue Fenster entstehen. Damit der user nicht immer auf ein Refresh-Btn drücken muss, will ich das automatisieren. Wenn ein neues Fenster in der Zwischenzeit existiert, dann soll das Programm dies per Msg mitbekommen und anschließend in die Liste einfügen...
  Mit Zitat antworten Zitat
Benutzerbild von fylo
fylo

Registriert seit: 18. Feb 2004
Ort: Rostock
155 Beiträge
 
Delphi 7 Personal
 
#4

Re: Windows Messages sniffen.

  Alt 18. Apr 2005, 10:06
Hi

ich glaub mit einem Hook sollte sich das machen lassen. Benutze mal die Forumsuche nach Hier im Forum suchenHook
have fun
fylo
  Mit Zitat antworten Zitat
dde

Registriert seit: 7. Mai 2003
132 Beiträge
 
#5

Re: Windows Messages sniffen.

  Alt 18. Apr 2005, 19:18
Das war mir schon klar. Welche Messages?
  Mit Zitat antworten Zitat
Benutzerbild von fylo
fylo

Registriert seit: 18. Feb 2004
Ort: Rostock
155 Beiträge
 
Delphi 7 Personal
 
#6

Re: Windows Messages sniffen.

  Alt 18. Apr 2005, 20:40
Hi

in der WinAPI-Help ist folgendes zum SetWindowsHookEx und zum WH_CBT lesen:
Zitat:
HCBT_ACTIVATE
The system is about to activate a window.

HCBT_CLICKSKIPPED
The system has removed a mouse message from the system message queue. Upon receiving this hook code, a CBT application must install a WH_JOURNALPLAYBACK hook procedure in response to the mouse message.

HCBT_CREATEWND
A window is about to be created. The system calls the hook procedure before sending the WM_CREATE or WM_NCCREATE message to the window. If the hook procedure returns a nonzero value, the system destroys the window; the CreateWindow function returns NULL, but the WM_DESTROY message is not sent to the window. If the hook procedure returns zero, the window is created normally.
At the time of the HCBT_CREATEWND notification, the window has been created, but its final size and position may not have been determined and its parent window may not have been established. It is possible to send messages to the newly created window, although it has not yet received WM_NCCREATE or WM_CREATE messages. It is also possible to change the position in the Z order of the newly created window by modifying the hwndInsertAfter member of the CBT_CREATEWND structure.

HCBT_DESTROYWND
A window is about to be destroyed.

HCBT_KEYSKIPPED
The system has removed a keyboard message from the system message queue. Upon receiving this hook code, a CBT application must install a WH_JOURNALPLAYBACK_hook hook procedure in response to the keyboard message.

HCBT_MINMAX
A window is about to be minimized or maximized.

HCBT_MOVESIZE
A window is about to be moved or sized.

HCBT_QS
The system has retrieved a WM_QUEUESYNC message from the system message queue.

HCBT_SETFOCUS
A window is about to receive the keyboard focus.

HCBT_SYSCOMMAND
A system command is about to be carried out. This allows a CBT application to prevent task switching by means of hot keys.
have fun
fylo
  Mit Zitat antworten Zitat
dde

Registriert seit: 7. Mai 2003
132 Beiträge
 
#7

Re: Windows Messages sniffen.

  Alt 24. Apr 2005, 13:23
So, ich hab jetzt mal die Messages oben getestet.

HCBT_ACTIVATE wird auch gesendet, wenn die Maus sich bewegt...

HCBT_CREATEWND wird ständig gesendet.

Die bringen mich also nicht weiter, da sie ja irgendwie immer gesendet werden und ich das ja auch mit nem timer bezwecken könnte, was nicht beabsichtigt ist.

Kann man nicht direkt die Messages an den Explorer sniffen?
  Mit Zitat antworten Zitat
dde

Registriert seit: 7. Mai 2003
132 Beiträge
 
#8

Re: Windows Messages sniffen.

  Alt 24. Apr 2005, 14:26
So ich habs jetzt gelöst. Ich hooke WH_SHELL und filtere nach nCode = HSHELL_WINDOWCREATED und HSHELL_WINDOWDESTROYED.
  Mit Zitat antworten Zitat
Arnulf

Registriert seit: 28. Okt 2004
Ort: Wien
271 Beiträge
 
#9

Re: Windows Messages sniffen.

  Alt 27. Apr 2005, 00:12
Hi
kann man soetwas wie WriteProcessMemory auch sniffen?

allerdings von einem anderen programm aus.
in dem sinn so etwas wie CheckRemoteDebuggerPresent ab service pack1 macht.

vielleicht mit wm_debug?

In dem sinn also eine meldung bekommen wenn ein fremdes programm auf ein zu schützendes programm zugreift?

Arnulf
  Mit Zitat antworten Zitat
ReDoX
(Gast)

n/a Beiträge
 
#10

Re: Windows Messages sniffen.

  Alt 27. Apr 2005, 07:09
Hi,
WriteProcessMemory kannst du z.B. durch einen API-Hook hooken und immer wenn, WriteProcessMemory aufgerufen wird wird deine Funktion ausgefuehrt.
Mfg ReDoX
  Mit Zitat antworten Zitat
Antwort Antwort
Seite 1 von 3  1 23   

Themen-Optionen Thema durchsuchen
Thema durchsuchen:

Erweiterte Suche
Ansicht

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 07:50 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