From: Henning on
Hi,

Now I've tried all I could find that say "VB6 RunAsService", with no luck.

NTSvc.ocx: Can't Start service from controlpnel applet. Service did not
respond....

Sergeys Service-approach: 1:st Start = ok, 1:st Stop = ok, 2:nd and on Start
= fail...

Nokia NT Service Module: Start = MyService has encounterd an error.... when
calling StartServiceCtrlDispatcher in
Public Function RunService(serviceName As String) As Boolean
Dim ServiceTableEntry As SERVICE_TABLE_ENTRY
Dim b As Boolean
ServiceTableEntry.lpServiceName = serviceName
SERVICE_NAME = serviceName
ServiceTableEntry.lpServiceProc = FncPtr(AddressOf ServiceMain)
Beep
b = StartServiceCtrlDispatcher(ServiceTableEntry)
RunService = b
' MessageBox 0&, "RunService." & b, App.Title, vbInformation Or vbOKOnly Or
vbMsgBoxSetForeground

End Function

See if I can find NTSvcocx.dll somwhere, but no luck so far.

/Henning



From: Schmidt on

"Henning" <computer_hero(a)coldmail.com> schrieb im Newsbeitrag
news:huk7gm$pmq$1(a)news.eternal-september.org...

> Sergeys Service-approach: 1:st Start = ok,
> 1:st Stop = ok, 2:nd and on Start = fail...

Any error-message in the service-log?
How does the original example behave (compiled BTW)
- does it show the same symptoms?

If not, what did you change?

Olaf


From: Henning on

"Schmidt" <sss(a)online.de> skrev i meddelandet
news:hukktv$ng7$1(a)speranza.aioe.org...
>
> "Henning" <computer_hero(a)coldmail.com> schrieb im Newsbeitrag
> news:huk7gm$pmq$1(a)news.eternal-september.org...
>
>> Sergeys Service-approach: 1:st Start = ok,
>> 1:st Stop = ok, 2:nd and on Start = fail...
>
> Any error-message in the service-log?
> How does the original example behave (compiled BTW)
> - does it show the same symptoms?
>
> If not, what did you change?
>
> Olaf
>
>
I just ran the original samples, no changes.
System log just shows "Service did not respond to a start or control
request" (freely translated from swedish).

The latset test with NT Service Module.
Felaktigt program neatdtectservice.exe, version 1.0.0.0, felaktig modul
msvbvm60.dll, version 6.0.97.97, felaktig adress 0x000cc0d5.

Don't know if it's readable in swedish, but it shows as if MSVBVM60.dll is
throwing the error.

When reading the forums there seems to be some 50/50 running ok/same errors
that I have for all methods to runasaservice.

/Henning


From: Schmidt on

"Henning" <computer_hero(a)coldmail.com> schrieb im Newsbeitrag
news:hulb1a$aps$1(a)news.eternal-september.org...

> I just ran the original samples, no changes.

Googling for 'RunAsService' now told me, that
you perhaps try to use such a separate "Service-
Upstarter-Proggie" for your Service - and IMO
such Apps as RunAsService are there, to treat
a *normal* Application (not implementing the
Service-Control-messagehandling) as a service.

So, is that the case (using RunAsService as an
"upstarter")?

If yes, this is not needed - Sergeys Code implements
a real ServiceApp - start- and stoppable over the
System-Management-Console (e.g. with the Play-
and Stop-Buttons there).

He also offered Code for a small Service-Controller-App,
which you can use, to remotely control your written
Service (in the same way as the System-Management-
Console) directly from a second VB-App, which
can run "in Desktop-Mode" (usually having a SysTray-
Icon there).

Olaf


From: Henning on

"Schmidt" <sss(a)online.de> skrev i meddelandet
news:hulrtq$esm$1(a)speranza.aioe.org...
>
> "Henning" <computer_hero(a)coldmail.com> schrieb im Newsbeitrag
> news:hulb1a$aps$1(a)news.eternal-september.org...
>
>> I just ran the original samples, no changes.
>
> Googling for 'RunAsService' now told me, that
> you perhaps try to use such a separate "Service-
> Upstarter-Proggie" for your Service - and IMO
> such Apps as RunAsService are there, to treat
> a *normal* Application (not implementing the
> Service-Control-messagehandling) as a service.
>
> So, is that the case (using RunAsService as an
> "upstarter")?
>
> If yes, this is not needed - Sergeys Code implements
> a real ServiceApp - start- and stoppable over the
> System-Management-Console (e.g. with the Play-
> and Stop-Buttons there).
>
> He also offered Code for a small Service-Controller-App,
> which you can use, to remotely control your written
> Service (in the same way as the System-Management-
> Console) directly from a second VB-App, which
> can run "in Desktop-Mode" (usually having a SysTray-
> Icon there).
>
> Olaf
>
>

{8>()

Don't know what happened before, i recompiled Sergeys Service vrapper, and
now it runs extremly well :))

/Henning