vb@rchiv
VB Classic
VB.NET
ADO.NET
VBA
C#
Erstellen von dynamischen Kontextmen?s - wann immer Sie sie brauchen!  
 vb@rchiv Quick-Search: Suche startenErweiterte Suche starten   Impressum  | Datenschutz  | vb@rchiv CD Vol.6  | Shop Copyright ©2000-2025
 
zurück

 Sie sind aktuell nicht angemeldet.Funktionen: Einloggen  |  Neu registrieren  |  Suchen

VB & Windows API
-> mit VB Services Konfigurieren -> 'Advapi32' API  
Autor: giusi
Datum: 12.10.03 19:10

[u]Frage zum folgenden ARTIKEL :

KANN man [u]in VB auf den "SERVICE_CONFIG_FAILURE_ACTIONS" Parameter zugreifen ?? (siehe unten Artikel von MSDN)
[oder geht des in VB gar nicht ?? ( ..müsste eigentlich gehen da zugriff auf API von -> 'Advapi32' )
Danke im voraus für einen 'klitze kleinen Tipp der Dringend benötigt wird

[ -> Library: Advapi32.lib ]

[url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/b_
  ase/changeserviceconfig2.asp[/url]
[u]ChangeServiceConfig2

The ChangeServiceConfig2 function changes the optional configuration parameters of a service.


BOOL ChangeServiceConfig2(
  SC_HANDLE hService,
  DWORD dwInfoLevel,
  LPVOID lpInfo
);
Parameters
hService
[in] Handle to the service. This handle is returned by the OpenService or CreateService function and must have the SERVICE_CHANGE_CONFIG access right. For more information, see Service Security and Access Rights.
If one of the specified service controller actions is SC_ACTION_RESTART, hService must have the SERVICE_START access right.

dwInfoLevel
[in] Configuration information to be changed. This parameter can be one of the following values. Value Meaning
SERVICE_CONFIG_DESCRIPTION The lpInfo parameter is a pointer to a SERVICE_DESCRIPTION structure.
SERVICE_CONFIG_FAILURE_ACTIONS The lpInfo parameter is a pointer to a SERVICE_FAILURE_ACTIONS structure.
If you specify SC_ACTION_REBOOT, the caller must have the SE_SHUTDOWN_NAME privilege. For more information, see Running with Special Privileges.


lpInfo
[in] Pointer to the new value to be set for the configuration information. The format of this data depends on the value of the dwInfoLevel parameter. If this value is NULL, the information remains unchanged.
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
The ChangeServiceConfig2 function changes the optional configuration information for the specified service in the service control manager database. You can obtain the current optional configuration information by using the QueryServiceConfig2 function.

You cannot set the SERVICE_CONFIG_FAILURE_ACTIONS value for a service that shares the service control manager's process. This includes all services whose executable image is "services.exe".

You can change and query additional configuration information using the ChangeServiceConfig and QueryServiceConfig functions, respectively.

Example Code
For an example, see Changing a Service Configuration.

Requirements
Client: Included in Windows XP and Windows 2000 Professional.
Server: Included in Windows Server 2003 and Windows 2000 Server.
Unicode: Implemented as Unicode and ANSI versions.
Header: Declared in Winsvc.h; include Windows.h.
Library: Use Advapi32.lib.


See Also
Services Overview, Service Functions, ChangeServiceConfig, CreateService, OpenService, QueryServiceConfig, QueryServiceConfig2, SERVICE_DESCRIPTION, SERVICE_FAILURE_ACTIONS
alle Nachrichten anzeigenGesamtübersicht  |  Zum Thema  |  Suchen

 ThemaViews  AutorDatum
-> mit VB Services Konfigurieren -> 'Advapi32...2.513giusi12.10.03 19:10
Re: -> mit VB Services Konfigurieren -> 'Adva...1.179collix05.01.04 14:04
Re: -> mit VB Services Konfigurieren -> 'Adva...938collix05.01.04 14:06
Re: -> mit VB Services Konfigurieren -> 'Adva...1.088Obi06.02.04 17:23

Sie sind nicht angemeldet!
Um auf diesen Beitrag zu antworten oder neue Beiträge schreiben zu können, müssen Sie sich zunächst anmelden.

Einloggen  |  Neu registrieren

Funktionen:  Zum Thema  |  GesamtübersichtSuchen 

nach obenzurück
 
   

Copyright ©2000-2025 vb@rchiv Dieter Otter
Alle Rechte vorbehalten.
Microsoft, Windows und Visual Basic sind entweder eingetragene Marken oder Marken der Microsoft Corporation in den USA und/oder anderen Ländern. Weitere auf dieser Homepage aufgeführten Produkt- und Firmennamen können geschützte Marken ihrer jeweiligen Inhaber sein.

Diese Seiten wurden optimiert für eine Bildschirmauflösung von mind. 1280x1024 Pixel