Opened 11 years ago

Last modified 10 years ago

#228 new defect

ProcessIdToSessionId missing in KERNEL32

Reported by: Silvan Scherrer Owned by:
Priority: major Milestone: Enhanced
Component: icedtea-web Version: 1.6.0 Build 27 GA5
Severity: high Keywords:
Cc:

Description

While starting a Java app i get the following mesasage:
The application has called the non-existing api KERNEL32->ProcessIdToSessionId (loaded by JUNIPEREXT.EXE)

Change History (6)

comment:1 by dmik, 11 years ago

Summary: Missing KERNEL32 entry pointProcessIdToSessionId missing in KERNEL32

comment:2 by dmik, 11 years ago

And which java app is that?

comment:3 by Silvan Scherrer, 11 years ago

It's a cirtix based Terminalsession app. I can give you access to it of course.

comment:4 by dmik, 11 years ago

Ok, we will look into that soon.

comment:5 by Silvan Scherrer, 10 years ago

proposed fix for that in src/kernel32/process.cpp:

/***********************************************************************
 * ProcessIdToSessionId   (KERNEL32.@)
 * This function is available on Terminal Server 4SP4 and Windows 2000
 */
BOOL WINAPI ProcessIdToSessionId( DWORD procid, DWORD *sessionid_ptr )
{
    /* According to MSDN, if the calling process is not in a terminal
     * services environment, then the sessionid returned is zero.
     */
    *sessionid_ptr = 0;
    return TRUE;
}

comment:6 by dmik, 10 years ago

That patch should definitely solve the unresolved API error. But judging from MSDN comments and from the app you need it for (TerminalSession) I suppose they want a real session ID in order to do something with it. The rest depends how they handle the NULL situation: can they work w/o a session ID or not.

Note: See TracTickets for help on using tickets.