Members

Technology Zones

IBM Learning Center

Articles

Hosted By

MaximumASP

Info

Rated
Read 49,580 times

Contents

Related Categories

API Programming Series #4 - The code

sreejath

The code

Now, add a new procedure to the form, called "MakeMeService". Add the following code to this procedure:

Dim pid As Long
Dim regserv As Long

pid = GetCurrentProcessId()
regserv = RegisterServiceProcess(pid, RSP_SIMPLE_SERVICE)

Add another procedure to the form, called "UnMakeMeService". Add the following code to this procedure:

Dim pid As Long
Dim regserv As Long
pid = GetCurrentProcessId()
regserv = RegisterServiceProcess(pid, RSP_UNREGISTER_SERVICE)

Comments

  • Re: Unable to find an entry Point

    Posted by anubhava on 12 Aug 2008

    I have got a Problem in code. Unable to find an entry point named 'RegisterServiceProcess' in DLL 'kernel32.dll'.

  • same wit me

    Posted by yumicken on 04 Nov 2004

    i got teh same problem!!!:(

  • Can't find DLL entry point RegisterServiceProcess

    Posted by MathiasRav on 25 Mar 2004

    I get the error: 453: Can't find DLL entry point RegisterServiceProcess in kernel32.
    What does this mean?
    How do I fix it?

    You have written this:
    "As always, mail me if you have any comments or ...

  • Posted by sreejath on 24 Jul 2003

    Yes, it is.
    The reason I didnt code it that way was to keep the example simpler, though I admit that this did make it a little longer and less elegant.
    Primarily, I wanted to focus on the API call I...

  • is this an improvement?

    Posted by DrNo on 10 Jun 2003

    Private Sub MakeUnmake(MakeOrNot As Boolean)

    Dim pid As Long
    Dim regserv As Long

    If MakeOrNot = True Then
    pid = GetCurrentProcessId()
    regserv = RegisterServiceProcess(pid, RSP_SIMPLE_SER...