Ver Mensaje Individual
  #4  
Antiguo 10-11-2016
Avatar de Neftali [Germán.Estévez]
Neftali [Germán.Estévez] Neftali [Germán.Estévez] is online now
[becario]
 
Registrado: jul 2004
Ubicación: Barcelona - España
Posts: 19.439
Reputación: 10
Neftali [Germán.Estévez] Es un diamante en brutoNeftali [Germán.Estévez] Es un diamante en brutoNeftali [Germán.Estévez] Es un diamante en bruto
Supongo que el resultado es similar al que finalmente has utilizado, pero otra cosa que podrías hacer aprovechando que tu programa (por ahora) no utiliza DLL's diseñadas por ti, es lo siguiente:

Código Delphi [-]
var
  Handle: THandle;
  ModuleEntry: TModuleEntry32;
  Str1, Str2, Str3:String;
begin
  // Path de todos los módulos cargados
  Handle := CreateToolHelp32SnapShot(TH32CS_SNAPMODULE, 0);
  Win32Check(Handle <> INVALID_HANDLE_VALUE);
  try
    ModuleEntry.dwSize := Sizeof(ModuleEntry);
    Win32Check(Module32First(Handle, ModuleEntry));
    repeat
      // Añadirlo
      Memo1.Lines.Add(ModuleEntry.szExePath);
      // Para todas las DLL's...
      if (UpperCase(ExtractFileExt(ModuleEntry.szExePath)) = '.DLL') then begin
        // Es el mismo directorio del EXE?
        if ExtractFilePath(ModuleEntry.szExePath) = ExtractFilePath(Application.ExeName) then begin
          Str1 := ExtractFilePath(ModuleEntry.szExePath);
          Str2 := ExtractFilePath(Application.ExeName);
          Str3 := ModuleEntry.szExePath;

          // Eliminar el mensaje ··············································.
          ShowMessage('Halt!!'  + sLineBreak +
                      Str1 + sLineBreak +
                      Str2 + sLineBreak +
                      Str3);
          // ···································································
          Halt;
        end;
      end;
    until not Module32Next(Handle, ModuleEntry);
  finally
    CloseHandle(Handle);
  end;
end;
__________________
Germán Estévez => Web/Blog
Guía de estilo, Guía alternativa
Utiliza TAG's en tus mensajes.
Contactar con el Clubdelphi

P.D: Más tiempo dedicado a la pregunta=Mejores respuestas.
Responder Con Cita