A curious MSHTML function & MSDN community content



  • Looking for a high-precision timer on Windows, I came across this MSDN article:

    http://msdn.microsoft.com/en-us/library/aa741307(VS.85).aspx

    I don't know if it's true, but the "Community Content" post on the bottom made me laugh, so I decided to share this.

    They've even tagged the page "figment" and "imagination" - a-hahahah.



  • This isn't the first time this has happened.

    A few years ago, I found a slick and shiny network API (alternative to raw sockets) on MSDN so I decided to try it out in my project. I read all about it and got some test code ready to go which... did nothing. After some debugging I noticed the return code 0x80004001 coming back everywhere. Which is, of course, the error code for E_NOTIMPL.

    Of course, the documentation failed to mention that the API had never been implemented, anywhere.

    Alas, I can't remember the name of the API...

     



  • I may be way off here, but isn't the article talking about interfaces (ITimer, ITimerService, IServiceProvider)?  The comment is complaining that you can't instantiate these.  Well yeah, they're interfaces.  They need to be implemented by something don't they? 



  • @upsidedowncreature said:

    I may be way off here, but isn't the article talking about interfaces (ITimer, ITimerService, IServiceProvider)?  The comment is complaining that you can't instantiate these.  Well yeah, they're interfaces.  They need to be implemented by something don't they?
    Awesome



  • @upsidedowncreature said:

    I may be way off here, but isn't the article talking about interfaces (ITimer, ITimerService, IServiceProvider)?  The comment is complaining that you can't instantiate these.  Well yeah, they're interfaces.  They need to be implemented by something don't they?
    Yeah, sure, and if I had a flying unicorn I could ride it to the moon — it says so right here in the IFlyingUnicorn spec.


  • ♿ (Parody)

    @upsidedowncreature said:

    They need to be implemented by something don't they?
    Well, according to TFA:

    @TFA said:

    ...the MSHTML Timer API is implemented as a service. Through this service, clients can create multiple timer objects and receive callbacks.



  •  The Real WTF is of course still that you get 80 results for "dsaflk".



  • @upsidedowncreature said:

    I may be way off here, but isn't the article talking about interfaces (ITimer, ITimerService, IServiceProvider)?  The comment is complaining that you can't instantiate these.  Well yeah, they're interfaces.  They need to be implemented by something don't they? 

    If you go up one level from the linked page to the timer API overview, you see

    @foo said:
    The Timer API provides essential timer services for Microsoft ActiveX Controls, supports external reference clocks, and enables synchronization between controls and scripts.
    So, yes.  They are implemented by COM objects instantiated in the IE core and acessible to Active-X objects embedded in web-pages viewed in IE.  Presumably the Active-X object has to query the container that embeds it in order to get a handle to first IServiceProvider, and then ITimerService and ITimer.  I'm not an IE developer but a few moments browsing through more of the related documentation(*) suggests that you can get access through the Container interface to an object called the Site, that implements the IServiceProvider interface.  IOleClientSite looks like the way to go here.  Try QueryInterface'ing it for IServiceProvider.  Or maybe you have to GetContainer, then EnumObjects in the container and look for it there.  Like I said, I'm not an IE developer, but if I can figure that out in 20 minutes browsing how hard can it really be...?
    @snafu said:
    fubar
    ROFL, what have I done here?  I think I may have cut and pasted a couple of words from an msdn page and now some CSS has come with it or something.  I had to close the earlier quote *twice* to get my text back to normal.  And then it wouldn't let me post it because of "Non matching quote blocks in post".  Oh dear.

  • ♿ (Parody)

    @PSWorx said:

     The Real WTF is of course still that you get 80 results for "dsaflk".
    Are you sure that it isn't that Google suggests "dsaflkj" instead?


  • :belt_onion:

    @vyznev said:

    Yeah, sure, and if I had a flying unicorn I could ride it to the moon — it says so right here in the IFlyingUnicorn spec.

    You're wrong about the IFlyingUnicorn spec.

    The FlyingUnicorn class derives from the Unicorn class and implements the IFlyable interface

    Just like a Swallow derives from Bird and implements the ISwallow interface



  • @bjolling said:

    @vyznev said:

    Yeah, sure, and if I had a flying unicorn I could ride it to the moon — it says so right here in the IFlyingUnicorn spec.

    You're wrong about the IFlyingUnicorn spec.

    The FlyingUnicorn class derives from the Unicorn class and implements the IFlyable interface

    Just like a Swallow derives from Bird and implements the ISwallow interface

    African or European?


  • @vyznev said:

    Just like a Swallow derives from Bird and implements the ISwallow interface


    Don't make the same mistake I made, and accidentally use ISwallowable.


  • :belt_onion:

    @pbean said:

    @vyznev said:

    Just like a Swallow derives from Bird and implements the ISwallow interface

    Don't make the same mistake I made, and accidentally use ISwallowable.
    Don't give away all my jokes at once please :-)


  • @bjolling said:

    implements the ISwallow interface
     

    I forget, does IDeepThroat extend ISwallow, or is it the other way around?



  • @cconroy said:

    @bjolling said:

    implements the ISwallow interface
     

    I forget, does IDeepThroat extend ISwallow, or is it the other way around?


    Both ISwallow and ISpit extend IDeepThroat.



  • @DaveK said:

    @bjolling said:

    Just like a Swallow derives from Bird and implements the ISwallow interface

    African or European?

    It extends from the generic ISwallow which only implents:

    public int UnladenAirSpeedVelocity(SwallowType st);
    

    IAfricanSwallow and IEuropeanSwallow also implements on the other hand:

    public int UnladenAirSpeedVelocity();
    

    Also, this is obviously about the world.animals.birds.ISwallow interface, don't even get me started about world.human.sex.ISwallow...



  • @dtech said:

    don't even get me started about world.human.sex.ISwallow...
    0x80004001 E_NOTIMPL, huh?



  • @dtech said:

    @DaveK said:

    @bjolling said:

    Just like a Swallow derives from Bird and implements the ISwallow interface

    African or European?

    It extends from the generic ISwallow which only implents:

    public int UnladenAirSpeedVelocity(SwallowType st);
    

    IAfricanSwallow and IEuropeanSwallow also implements on the other hand:

    public int UnladenAirSpeedVelocity();
    

    Also, this is obviously about the world.animals.birds.ISwallow interface, don't even get me started about world.human.sex.ISwallow...

    world.internet.website.TDWTF.badcomment.error


  •  Holy gutterthread, Batman!


Log in to reply