![]() |
Re: Programm funktioniert nur unter XP
eventuell gab es die Funktion in Delphi3 noch nicht. Also muss er sie einfach manuell einbinden.
|
Re: Programm funktioniert nur unter XP
:cry: :cry: :cry: So sieht es wohl aus. Kann mir jemand helfen wie ich das machen kann??
|
Re: Programm funktioniert nur unter XP
Als erstes brauchst du die Funktion von Windows.
Zitat:
Delphi-Quellcode:
Sysutils.pas:
function GetEnvironmentVariable(lpName: PChar; lpBuffer: PChar; nSize: DWORD): DWORD; stdcall; overload;
{$EXTERNALSYM GetEnvironmentVariable} //(c) by Borland
Delphi-Quellcode:
Natürlich reicht auch die erste Deklaration, wenn du kein Problem mit PChar hast. :stupid:
function GetEnvironmentVariable(const Name: string): string;
var Len: integer; begin Result := ''; Len := GetEnvironmentVariable(PChar(Name), nil, 0); if Len > 0 then begin SetLength(Result, Len - 1); GetEnvironmentVariable(PChar(Name), PChar(Result), Len); end; end; //(c) by Borland |
Alle Zeitangaben in WEZ +1. Es ist jetzt 04:06 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz