AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren

Umgebungs Variabeln

Ein Thema von MasterC · begonnen am 17. Jan 2004 · letzter Beitrag vom 20. Jan 2004
Antwort Antwort
MasterC

Registriert seit: 9. Jan 2004
Ort: Krefeld
369 Beiträge
 
Delphi 2005 Personal
 
#1

Umgebungs Variabeln

  Alt 17. Jan 2004, 20:16
Hi,

Wie lassen sich in Delphi Umgebungs Variabeln setzten?
Christian H.
  Mit Zitat antworten Zitat
CalganX

Registriert seit: 21. Jul 2002
Ort: Bonn
5.403 Beiträge
 
Turbo Delphi für Win32
 
#2

Re: Umgebungs Variabeln

  Alt 17. Jan 2004, 20:23
Hi,
wennn du die JVCL installiert hast findest du in der Unit JclSysInfo die Funktion
Aus der Delphi-JVCL-Hilfe
Code:
[b]function[/b] SetEnvironmentVar([b]const[/b] Name: [b]string[/b]; [b]const[/b] Value: [b]string[/b]): Boolean;


Chris
  Mit Zitat antworten Zitat
MasterC

Registriert seit: 9. Jan 2004
Ort: Krefeld
369 Beiträge
 
Delphi 2005 Personal
 
#3

Re: Umgebungs Variabeln

  Alt 18. Jan 2004, 11:09
Hm, das geht doch auch bestimmt ohne JVCL, oder?
Christian H.
  Mit Zitat antworten Zitat
Benutzerbild von Mirilin
Mirilin

Registriert seit: 21. Dez 2002
Ort: Lenzburg
861 Beiträge
 
Delphi 6 Professional
 
#4

Re: Umgebungs Variabeln

  Alt 18. Jan 2004, 13:41


könntest ja schauen, wie es in der JCL gemacth wird

mfg Tobias
Tobias
Die Physik ist für die Physiker eigentlich viel zu schwer.
  Mit Zitat antworten Zitat
CalganX

Registriert seit: 21. Jul 2002
Ort: Bonn
5.403 Beiträge
 
Turbo Delphi für Win32
 
#5

Re: Umgebungs Variabeln

  Alt 18. Jan 2004, 13:46
Hi,
wie ich bereits vermutet hatte gibt es die Funktion SetEnvironmentVariable in der Unit Windows.
Was mich allerdings wundert ist, dass weder im PSDK, noch in der Delphi-Hilfe davon irgendwas erwähnt ist...

Chris
  Mit Zitat antworten Zitat
Benutzerbild von Mirilin
Mirilin

Registriert seit: 21. Dez 2002
Ort: Lenzburg
861 Beiträge
 
Delphi 6 Professional
 
#6

Re: Umgebungs Variabeln

  Alt 18. Jan 2004, 13:59


in meiner PSDK steht was :
Die PSDK sagt
SetEnvironmentVariable

The SetEnvironmentVariable function sets the contents of the specified environment variable for the current process.

Code:
BOOL SetEnvironmentVariable(
  LPCTSTR lpName,
  LPCTSTR lpValue
);
Parameters
lpName
[in] Pointer to a null-terminated string that specifies the name of the environment variable. The operating system creates the environment variable if it does not exist and lpValue is not NULL.
lpValue
[in] Pointer to a null-terminated string that specifies the contents of the environment variable. An environment variable has a maximum size limit of 32,767 bytes, including the trailing null terminator.
If this parameter is NULL, the variable is deleted from the current process's environment.

Return Values
If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

Remarks
This function has no effect on the system environment variables or the environment variables of other processes. For more information, see Environment Variables.

Windows 95/98/Me: SetEnvironmentVariableW is supported by the Microsoft Layer for Unicode. To use this, you must add certain files to your application, as outlined in Microsoft Layer for Unicode on Windows 95/98/Me Systems.


mfg Tobias
Tobias
Die Physik ist für die Physiker eigentlich viel zu schwer.
  Mit Zitat antworten Zitat
CalganX

Registriert seit: 21. Jul 2002
Ort: Bonn
5.403 Beiträge
 
Turbo Delphi für Win32
 
#7

Re: Umgebungs Variabeln

  Alt 18. Jan 2004, 14:01
Hi,
na super... Naja, dann hoffe ich mal, dass es nur ein Fehler in der Installation ist und nicht mein Download kaputt ist.

Chris
  Mit Zitat antworten Zitat
MasterC

Registriert seit: 9. Jan 2004
Ort: Krefeld
369 Beiträge
 
Delphi 2005 Personal
 
#8

Re: Umgebungs Variabeln

  Alt 20. Jan 2004, 16:43
JVCL braucht man nun wirklich nicht dafür...http://www.delphi-treff.de/content/e...ex.php4?id=513

Habs selber gefunden.
Christian H.
  Mit Zitat antworten Zitat
MathiasSimmack
(Gast)

n/a Beiträge
 
#9

Re: Umgebungs Variabeln

  Alt 20. Jan 2004, 17:23
Hab auch noch ein paar Links ins DF, damit ich auf meinen 1100. Beitrag komme :

...systemweit Umgebungsvariablen setzen/lesen?
...Umgebungsvariable in einem String auflösen?
  Mit Zitat antworten Zitat
Themen-Optionen Thema durchsuchen
Thema durchsuchen:

Erweiterte Suche
Ansicht

Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 21:17 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz