Opened 6 years ago

Last modified 5 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 Changed 6 years ago by dmik

Summary: Missing KERNEL32 entry pointProcessIdToSessionId missing in KERNEL32

comment:2 Changed 6 years ago by dmik

And which java app is that?

comment:3 Changed 6 years ago by Silvan Scherrer

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

comment:4 Changed 6 years ago by dmik

Ok, we will look into that soon.

comment:5 Changed 5 years ago by Silvan Scherrer

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 Changed 5 years ago by dmik

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.