Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > API de Windows
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

 
 
Herramientas Buscar en Tema Desplegado
  #3  
Antiguo 13-06-2007
Avatar de seoane
[seoane] seoane is offline
Miembro Premium
 
Registrado: feb 2004
Ubicación: A Coruña, España
Posts: 3.717
Poder: 26
seoane Va por buen camino
Y por si tienes el C oxidado

Código Delphi [-]
uses PsApi;

procedure EnumModules(List: TStringList);
var
  hMods: array[0..1024] of HMODULE;
  hProcess: THandle;
  Needed: DWORD;
  i: Integer;
  ModName: Array[0..MAX_PATH] of Char;
begin
  List.Clear;
  hProcess:= OpenProcess(PROCESS_QUERY_INFORMATION  or PROCESS_VM_READ,
    FALSE, GetCurrentProcessId);
  if hProcess <> 0 then
  begin
    if EnumProcessModules(hProcess, @hMods, Sizeof(hMods), Needed) then
      for i:= 0 to (Needed div Sizeof(HMODULE)) - 1 do
      begin
        FillChar(ModName,Sizeof(ModName),#0);
        if GetModuleFileNameEx(hProcess, hMods[i], ModName, Sizeof(ModName) - 1) <> 0 then
          List.Add(String(PChar(@ModName)));
      end;
    CloseHandle(hProcess);
  end;
end;

Por ejemplo:
Código Delphi [-]
var
  Lista: TStringList;
begin
  Lista:= TStringList.Create;
  try
    EnumModules(Lista);
    ShowMessage(Lista.Text);
  finally
    Lista.Free;
  end;
end;
Responder Con Cita
 



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
usar DLLs lynu Varios 1 27-03-2007 02:57:53
Trabajando con dlls Novás Varios 2 23-08-2006 17:35:41
Icono en dlls arantzal Varios 4 30-09-2005 15:21:21
DLLs y EXEs i.larranaga C++ Builder 3 02-03-2004 16:04:04
Debugear Dll cargadas dinámicamente Aldo Varios 2 13-01-2004 09:50:56


La franja horaria es GMT +2. Ahora son las 12:47:31.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi