Einzelnen Beitrag anzeigen

Daniel G
(Gast)

n/a Beiträge
 
#2

Re: lpEnvironment-Parameter bei CreateProcessWithLogonW

  Alt 31. Jul 2005, 01:09
Das PSDK, dein Freund und Helfer

Zitat von Das PSDK:
lpEnvironment
[in] Pointer to an environment block for the new process. If this parameter is NULL, the new process uses the environment of the specified user instead of the environment of the calling process.
An environment block consists of a null-terminated block of null-terminated strings. Each string is in the form:

name=value

Because the equal sign is used as a separator, it must not be used in the name of an environment variable.

An environment block can contain Unicode or ANSI characters. If the environment block pointed to by lpEnvironment contains Unicode characters, be sure that dwCreationFlags includes CREATE_UNICODE_ENVIRONMENT.

Note that an ANSI environment block is terminated by two zero bytes: one for the last string, one more to terminate the block. A Unicode environment block is terminated by four zero bytes: two for the last string, two more to terminate the block.

To retrieve a copy of the environment block for a given user, use the CreateEnvironmentBlock function.
Und dann brauchst du das:

MSDN-Library durchsuchenCreateEnvironmentBlock
  Mit Zitat antworten Zitat