google chrome - How to get windows Session id using javascript -


any ideas how win os user session id google chrome using javascript or plugins ?

task manager screenshot session id:
http://tinypic.com/view.php?pic=15rfklu&s=8#.vgs7h_mszqk

in screenshot showing session id, in title of question mention process id. these different things, i'll assume interested in session id.

the session id windows concept, highly unlikely ever exposed browser. have use win32 api retrieve it.

and use win32 api require use chrome's native messaging mechanism.

so session id retrieved using following mechanism:

1. write win32 .exe retrieves session id current process.

this work because native messaging application launched in same session chrome.

write routine retrieves session id using getcurrentprocessid , processsidtosessionid api calls.

2. use chrome.nativemessaging launch native messaging application , send command invoke above code.

you can read writing native messaging application here: https://developer.chrome.com/extensions/messaging#native-messaging


Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -