Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Start service with VB
scotty wrote:
> Anyone know if it's possible to start Oracle service with VB?
Lost the Win32 API manual?
==
The StartService function starts the execution of a service.
BOOL StartService(
SC_HANDLE hService, // handle of service
DWORD dwNumServiceArgs, // number of arguments LPCTSTR *lpServiceArgVectors // address of array of argument string pointers
);
Parameters
hService
Identifies the service. This handle is returned by the OpenService or CreateService function, and it must have SERVICE_START access.
dwNumServiceArgs
Specifies the number of argument strings in the lpServiceArgVectors array. If lpServiceArgVectors is NULL, this parameter can be zero.
lpServiceArgVectors
Points to an array of pointers that point to null-terminated argument strings passed to a service. Driver services do not receive these arguments. If no arguments are passed to the service being started, this parameter can be NULL. The service accesses these arguments through its ServiceMain function. Note that in the array of arguments passed to the ServiceMain function, the first argument (argv[0]) is the name of the service by default, followed by the arguments, if any, in the lpServiceArgVectors array.
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.
<snipped>
==
As for how well VB is suited for this type of programming.. it is not. VB is not what I consider a serious programming language. You can polish a turd and make it all shiny. It stays a turd however.
-- BillyReceived on Tue Nov 19 2002 - 05:21:22 CST
![]() |
![]() |