function GetModuleName: string;
var
  NameBuffer: array[ 0..MAX_PATH ] of char;
begin
  ZeroMemory( @NameBuffer, SizeOf( NameBuffer ) );
  GetModuleFileName( HInstance, NameBuffer, Pred( SizeOf( NameBuffer ) ) );
  Result := NameBuffer;
end;

Above should also work for applications, ActiveX controls and whatever
else... Requires the use of the Windows unit.
-- 
With kind regards,

\/\//\ Wim,
W.A. ten Brink

On 6/15/07, blinkz_blinkz <[EMAIL PROTECTED]> wrote:
>
>
> How do we get "self name" inside DLL,
> as we can use "application.exename" or "paramstr(0)" for EXE.
>
> regards,
> blinkz
>
>


[Non-text portions of this message have been removed]

Reply via email to