Announcement

Collapse
No announcement yet.

RegisterServiceProcess

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • RegisterServiceProcess

    hi,

    to hide an application in the taskbar I used

    CALL RegisterServiceProcess(process, %RSP_SIMPLE_SERVICE

    which works fine.

    for some reasons I want to make this call indirectly using the following

    Y = %RSP_SIMPLE_SERVICE
    process = GetCurrentProcessId()
    hLib& = LoadLibrary("KERNEL32.DLL")
    IF hLib& THEN
    pRegisterServiceProcess = GetProcAddress(hLib&, "RegisterServiceProcess")
    IF pRegisterServiceProcess THEN
    CALL DWORD pRegisterServiceProcess CDECL (process, y)
    END IF
    CALL FreeLibrary(hLib&)
    END IF

    it works without any failure message, but also witout any result (the applicationis is still visible). what's wrong?

    thanks
    Wolfgang

    ------------------

  • #2
    Without searching in MSDN 99,9% sure that (ByVal process, ByVal y)

    ------------------
    E-MAIL: [email protected]

    Comment


    • #3
      Also, RegisterServiceProcess uses the default calling method (STDCALL),
      not the C calling method (CDECL).

      ------------------
      Tom Hanlin
      PowerBASIC Staff

      Comment

      Working...
      X