Folge dem Video um zu sehen, wie unsere Website als Web-App auf dem Startbildschirm installiert werden kann.
Anmerkung: Diese Funktion ist in einigen Browsern möglicherweise nicht verfügbar.
SetEnvironmentVariable
The SetEnvironmentVariable function sets the contents of the specified environment variable for the current process.
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.
GetEnvironmentVariable
The GetEnvironmentVariable function retrieves the contents of the specified variable from the environment block of the calling process. The contents are in the form of a null-terminated string of characters.
DWORD GetEnvironmentVariable(
LPCTSTR lpName,
LPTSTR lpBuffer,
DWORD nSize
);
Parameters
lpName
[in] Pointer to a null-terminated string that specifies the name of the environment variable.
lpBuffer
[out] Pointer to a buffer that receives the contents of the specified environment variable. An environment variable has a maximum size limit of 32,767 characters, including the null-terminating character.
nSize
[in] Size of the buffer pointed to by the lpBuffer parameter, in TCHARs.
Return Values
If the function succeeds, the return value is the number of TCHARs stored into the buffer pointed to by lpBuffer, not including the terminating null character.
If lpBuffer is not large enough to hold the data, the return value is the buffer size, in TCHARs, required to hold the value string and its terminating null character.
If the function fails, the return value is zero. If the specified environment variable was not found in the environment block, GetLastError returns ERROR_ENVVAR_NOT_FOUND.
SetEnvironmentVariable("PLOTOUT", "c:\test\Work\decay.out");
SetEnvironmentVariable("PLOTPLT1", "c:\test\Work\decay1.plt");
SetEnvironmentVariable("PLOTPLT2", "c:\test\Work\decay2.plt");
WinExec("C:\\test\\fd\\lib\\win\\Calc_Fort.exe",SW_SHOWNORMAL);