GUI's gotta be doing it for some .DLL
-
Holy fuck how OLD is that article... 1994!?
You think Microsoft has a cadre of people whose job it is to periodically scour MSDN looking for obsolete stuff, perhaps?
-
This is hardly the first time FrostCat's been confused by some extremely simple text. I still remember that time he thought I was a crazy-person because I flew to the UK to watch a movie, despite me saying nothing of the sort.
-
Does it even apply to NT, or is it talking about Win95 stuff?
Yes. Since it mentions the posix and os/2 subsystems, the field was probably intended mainly to help the loader know which subsystem to initialize the application to work with. Since both subsystems are more or less obsolete, it's probably a useless leftover these days, except for the console/windows options.
Does this guy even work for Microsoft?
Do you even read the shit you supposedly read? It says right there at the top: "Matt Pietrek is the author of Windows Internals"
"As of April 2004 he has been working at Microsoft, initially on Visual Studio."
-
Is the PE header the same in a managed cli application?
All[1] exes and DLLs have a PE header.
[1] ETA anti-pendantry
Obviously this only applies to 32- and 64-bit Windows applications, and not 16-bit WIndows applications, DOS applications, and programs on other platforms like Linux.
-
You are not the only one who did that.
It's amazing that after all this time, people still make the mistake of not responding to what he wrote, not what they think he meant[1]. You're probably going to get insulted either way, but he has to work at it more if you don't try to parse what he meant.
[1] yes, I do this too, but sometimes just for fun. I actually thought about addressing the words he wrote as such in my first post, but decided not to make the effort. You gotta leave him some crumbs to rant about or he doesn't have a reason to live.
-
I still remember that time he thought I was a crazy-person because I flew to the UK to watch a movie
I don't think I didn't know you didn't live in the US at that point, O Holder of Ridiculously-Long Grudges Over Trivial Things.
-
I love a long memory for moron.
-
I love a long memory for moron.
It's hard to believe you don't have a romantic partner.
-
It's amazing that after all this time, people still make the mistake of not responding to what he wrote, not what they think he meant[1].
I'm not sure what you think I wasn't responding to (this is me responding to what you wrote!). But I was responding to both what he wrote and what I thought he meant.
-
I'm not sure what you think I wasn't responding to
I wasn't necessarily implicating @boomzilla there, more speaking in general terms.
It's not worth tracking what @blakeyrat says too closely anyway, because it'll eventually all turn to shouting anyway. Until you manage to prove him wrong and he stops talking about whatever it was. Like he has here[1], and has switched to generic insults. blakey's motto: "When the facts aren't on your side, pound the table!"
[1] don't think I didn't notice that,
-
Until you manage to prove him wrong
Still waiting for that in this thread. All I see is you misunderstanding him
-
Still waiting for that in this thread. All I see is you misunderstanding him
I've already covered multiple possible reasonable meanings for what he wrote, and shown that he was wrong with them.
Also, you're forgetting the basic fact that he stopped arguing with me about it, which is prima facie evidence he knows he was wrong, as has been repeatedly demonstrated in the past.
<trolling, trolling, trolling, keep those forumers growling, rawhide!
-
Also, you're forgetting the basic fact that he stopped arguing with me about it, which is prima facie evidence he knows he was wrong, as has been repeatedly demonstrated in the past.
KafkaBlakeytrapping!
-
KafkaBlakeytrapping!It's almost like you read the raw.
Hey, he's had lots of opportunity to console spew about how he's secretly right about $topic.
-
Also, you're forgetting the basic fact that he stopped arguing with me about it, which is prima facie evidence he knows he was wrong, as has been repeatedly demonstrated in the past.
Or like he's tired of arguing against someone who can't read what he actually wrote.
-
he always ends conversations abruptly, being right or wrong
-
"a Service opened a window, click Ok to go to the alternative desktop and view it"
http://blogs.msdn.com/blogfiles/patricka/WindowsLiveWriter/WhatisInteractiveServicesDetectionandWhy_10926/image1.png
But why is it that
- it can't just simply display the window on the regular desktop
- and the alternative (session 0) desktop looks all Win95-y?
-
- it can't just simply display the window on the regular desktop
It could in theory if the Service happened to be running in the same user account as the logged-in user. In fact it might, that would be an interesting experiment for someone less lazy than me to try.
- and the alternative (session 0) desktop looks all Win95-y?
Service users don't have desktop backgrounds set, and it's not running
explorer.exe
. Not sure what you expected to see...
-
why is it that it can't just simply display the window on the regular desktop
-
But why is it that- it can't just simply display the window on the regular desktop
Security. Interacting with a user's desktop is an opportunity for privilege escalation and information theft.
-
-
The program might need information form you
Does it need to inform me, or does it need information from me? Way to go, Windows.
-
See also:
The way sessions are instantiated was redesigned in Windows Vista and Windows Server 2008 to provide additional protection against shatter attacks. Local user logins were moved from Session 0 to Session 1, thus separating the user's processes from system services that could be vulnerable.
This creates backward compatibility issues, however, as some software was designed with the assumption that the service is running in the same session as the logged-in user. To support this view, Windows Vista and Windows Server 2008 include a Windows service called "Interactive Services Detection" that enables access to dialogs created by interactive services when they appear. The interactive user is shown a dialog box and is offered the ability to switch to Session 0 to access the dialog box.
-
Security. Interacting with a user's desktop is an opportunity for privilege escalation and information theft.
That's the answer I wanted. Session 0-s and running explorer.exe-s are technical stuff that don't explain anything on their own, such as why the UX should be compromised and contorted in a user-confusing way.
To elaborate, I think the Windows developers could very well create a way to "teleport" the dialog that the service wants do display, to the normal desktop, and also with some effort, make it look like the rest of Windows. If that didn't pose a security risk.
If I understood correctly.
-
Matt Pietrek
Heh heh, Matt Pietrek.
Paging @Maciejasjmj, @Gaska and @wft.
http://i1.memy.pl/obrazki/23dd895583_pietrek_uczy.jpg
edit
This is a historic photo, it's from back when Pietrek was writing the Windows internals.
-
Generally true, but it's convenient for logging. Especially because console spew to when there's no console simply goes into the bit bucket.
Why would you want to do that, when better tools are available? Such as
Trace.WriteLine
or a nifty logging framework such as NLog? Sure, it's a bit more work that popping in aConsole.WriteLine
but it is soooo much more useful in the long run.
-
To elaborate, I think the Windows developers could very well create a way to "teleport" the dialog that the service wants do display, to the normal desktop, and also with some effort, make it look like the rest of Windows. If that didn't pose a security risk.
Why would they even start working on that when accessing the UI from a background process is ?
-
@marczellm said:
To elaborate, I think the Windows developers could very well create a way to "teleport" the dialog that the service wants do display, to the normal desktop, and also with some effort, make it look like the rest of Windows. If that didn't pose a security risk.
Why would they even start working on that when accessing the UI from a background process is ?
Technically it's already possible, Microsoft has that technology for RemoteApp which is basically what Citrix offers, but then a much more shitty version.
But why would you want to do it? Direct UI interaction with a service is wrong in so many levels, that it can't be emphasized enough.
-
Even worse, if they made it better, developers would actually start doing it on purpose.
In a few years, you'd have some front-page article here saying, "running our software as a service and drawing windows anyway is the best way to achieve secure multi-mediation of all webbing."
-
1,000x this. People are like this.
-
In a few years, you'd have some front-page article here saying, "running our software as a service and drawing windows anyway is the best way to achieve secure multi-mediation of all webbing."
Chrome-as-a-Service. ;(
-
@JBert said:
@marczellm said:
To elaborate, I think the Windows developers could very well create a way to "teleport" the dialog that the service wants do display, to the normal desktop, and also with some effort, make it look like the rest of Windows. If that didn't pose a security risk.
Why would they even start working on that when accessing the UI from a background process is ?
Technically it's already possible, Microsoft has that technology for RemoteApp which is basically what Citrix offers, but then a much more shitty version.
But why would you want to do it? Direct UI interaction with a service is wrong in so many levels, that it can't be emphasized enough.
They are already doing it! For background compatibility, they still allow creating dialogs from a service, just not on the normal desktop. What I was asking is, why not draw that dialog on the normal desktop then? Just put those goddam pixels on my screen!
http://i.imgur.com/4zW0cGc.jpg
http://i.imgur.com/ztjTxxC.jpg
-
Read blakey's post. If it appears to work fine, some developer will use it until years later a server with 0.00001% of login time stalls on an Error: OK popup.
EDIT: And while that may also happen today, at least Windows will show that extra "Somebody's doing something naughty in the backyard" dialog so that "works on my machine" is changed to "works weird on my machine". Anything which would make the bad way look harder is welcome.
-
What I was asking is
in the sense that I already gotthe answer I wanted
but thanks anyway.
-
Heh heh, Matt Pietrek.
What? Pietreks are cool.Random story time: my grandfather's given name was Adolf. For obvious reasons, it was changed after WW2 started - his new name was Peter. My grandma didn't like that name, so she called him Lucas instead. Fuck knows why.
-
[1] by way of choosing a particular entry point from the set of available ones.
Aw, you were doing good until this point.Microsoft publishes the source code of the CRT, which includes all possible entry points. From memory, none of them calls AllocConsole() nor AttachConsole(): It's Windows that does or doesn't give your process a console for free, if that flag from the PE header asks for one.
However, the console application entry points probably do the job of attaching the standard C or C++ streams to it.
-
-
You are not the only one who did that.
It's amazing that after all this time, people still make the mistake of not responding to what he wrote, not what they think he meant[1].
Maybe because it's what makes the most sense in the light of ambiguous wording? Or maybe our crime is assuming someone you don't like meant to say something that made sense?
-
My grandma didn't like that name, so she called him Lucas instead.
A guy with the username
Jim
entered my chat room at one point, and I declared that we're already at our variants-of-James capacity, so his name is now Bruce.
-
The first person who links that Monty Python skit will be skinned as an example for the others.
-
Or like he's tired of arguing against someone who can't read what he actually wrote.
You seem to be operating under a bit of confusion in that you think he's actually interested in a reasoned argument, as opposed to just insulting people. It's not worth actually getting every little detail of what he meant right, especially since he will sometimes write sloppy stuff, and then complain that people didn't understand exactly what he meant, which wasn't what he wrote.
And then he complains that everyone else does that. No, I've already said like three times, that any reasonable way you interpret what he said, he's wrong.
-
it can't just simply display the window on the regular desktop
Because Microsoft changed it so they can't: https://msdn.microsoft.com/en-us/library/windows/desktop/ms683502(v=vs.85).aspx
Services cannot directly interact with a user as of Windows Vista. Therefore, the techniques mentioned in the section titled Using an Interactive Service should not be used in new code.
Basically it's for security reasons, but if you want to understand the details you'll have to look it up for yourself.
-
-
-
Why would you want to do that, when better tools are available? [...] Sure, it's a bit more work
Ah, look, you answered your own question!
Maybe you need just some temporary logs to debug a problem and you just spit out some "i am in this if block" or teh contents of a variable.
-
What I was asking is, why not draw that dialog on the normal desktop then?
You've already been told! To prevent other programs from attacking the service.
-
Aw, you were doing good until this point.
Microsoft publishes the source code of the CRT
I certainly hope you're not laboring under the delusion I'm going to dig up the CRT source just to further an argument I already won. I was just quoting the documentation.
-
Or maybe our crime is assuming someone you don't like meant to say something that made sense?
YMBNH. Trying to guess what he meant is an exercise in futility. His entire schtick is talking just sloppy enough so that people misunderstand him so he can call them names for not understand what he really meant, and doing the latter is a mug's game.
-
A guy with the username Jim entered my chat room at one point, and I declared that we're already at our variants-of-James capacity, so his name is now Bruce.
My high school had 3 jennifers or something out of ~60 girls total, so I suggested prefixing their names with numbers. We'd have 1jen, 2jen, and so on. Oddly, the philistines, who clearly hadn't read Neuromancer, didn't go for it.
-
The first person who links that Monty Python skit will be skinned as an example for the others.
This one? I'm asking for a friend.