Thema: Delphi Delphi SprachDLL nutzen

Einzelnen Beitrag anzeigen

chris

Registriert seit: 24. Mai 2003
Ort: Düsseldorf
196 Beiträge
 
Delphi 2009 Professional
 
#5

Re: Delphi SprachDLL nutzen

  Alt 4. Feb 2004, 17:08
hi,

auch kein problem.

dann könntest du es wie folgt machen:

resource (eng.rc):

Code:
STRINGTABLE
{
 1, "&Yes"
}
dll (lang_eng.dll):

Delphi-Quellcode:
library lang_eng;
 {$E dll}
begin
 {$R eng.res}
end.
aufruf:

Delphi-Quellcode:
var
  a: array[0..255] of char;
  h: hwnd;
begin
  h := loadlibrary('lang_eng.dll');
  try
    if h >= 32 then
      if loadstring(h, 1, a, sizeof(a)) > 0 then showmessage(strpas(a))
  finally
    freelibrary(h)
  end;
Chris
D2009.4 | Vista SP2 x32
  Mit Zitat antworten Zitat