Saturday, December 26, 2020

Screen capture sample, clarified

Few years ago, Microsoft introduced so called UI Composition API, and even provided a dedicated GitHub repository for that https://github.com/microsoft/Windows.UI.Composition-Win32-Samples
And as usual, "just a code" is not always enough. Especially if we're talking about an API that is not that documented. Now, it's time to close some gaps about screen sharing API.

Monday, November 18, 2019

WPF .NET Core 3.0 can not add a user control

WPF .NET Core 3.0 can not add a user control
Disclaimer: I loved WPF for Win32. I love UWP for Windows Phones. And I do suspect I will love WPF for .NET Core. So, yesterday I created a test project. And...

Monday, October 24, 2016

Cisco AnyConnect VPN and Remote Desktop Connection (VPN establishment capability from a remote desktop is disabled. A VPN connection will not be established.)

Preface: today's post is not a particular one. As you can see, usual topic of the posts here is software development and non-obvious caveats you can meet along the way. This post is about "software taming": how to tweak the software written not by you.

Thursday, October 8, 2015

WPF Application.Current.FindResource() and uncaughtable exceptions

One more time to remind about The Old New Thing blog and trend to blame yourself first instead of Windows.
Today it was a trivial day with trivial task: find a resource by its name at a WPF app. What can be a problem, really? The plan was simple:
  1. Call Application.Current.FindResource()
  2. Wrap it into try...catch block as MSDN says we can meet ResourceReferenceKeyNotFoundException if the resource is absent or somehow missed in the app package.

Tuesday, May 21, 2013

Detective story: sendto() and 10014 WSAEFAULT error


Time to time I read The Old New Thing blog (authored by Raymond Chen, one of Microsoft old-timers). On his brilliant notes, he often describes pathetic customers who observe unexpected Windows API behavior and pretend this is Microsoft's bug. What a naive people, I would exclaim. And every time few paragraphs later Raymond Chen explains that root of such issue is the customer failure: neglection to documentation details, wrong assumptions etc. Ironically, I got pretty strange behavior at WinSock API recently. So what should be my first reaction? Indeed, I started from myself...

Tuesday, January 29, 2013

Socket Option: Multicast Interface


Disclaimer: this is a short description of a code snippet primarily for myself because I had failed to find corresponding details in MSDN as well as on Google about SocketOptionName.MulticastInterface parameter values. Feel free to use it if you're experiencing the same lack of luck.

Multicasts... You have to learn them right after generic sockets (aka unicasts) and massive spam-like broascasts. According to their nature, multicasts gather one-shot-to-many strength of broadcasting and can pass boundaries of nested networks like unicasts. The only weak side is knowledge "how to tune the socket".

Friday, January 4, 2013

How to launch Windows Phone 8 emulator on virtual machine


One of most remarkable events at 2012 was Windows roll-out: desktop Windows 8, tablet Windows RT and mobile Windows Phone 8 (here and after, WP8). Personally I'm a bit of Windows Phone evangelist and Windows Phone 8 launch, even delayed for few months, was a big interest for me, so I was eager to try it.
After WP8 SDK installation attempt, I learned that my Windows 7 workplace is obsolete. Almost no surprise here: if you need Win7 instead of old good WinXP to do WP7 development, why don't you need to upgrade your PC to Win8 before starting with WP8? Anyway, it was no reason (and no time, as usual) to re-settle my working environment from Win7 to Win8 just to try the new technology. The answer was stright-forward: let use virtual machine! So, the toolchain was obvious from the first glance: Win7 as a host, Win8 as a guest on virtual machine, then WP8 emulator to try the new SDK. After a long-enough time installing all the staff, the toolchain just failed on very last step. WP8 emulator been failed to launch, accompanied with incomprehensible error messages (very famous Microsoft-style, you can say).
Finally, if you're looking just for working solution, I can redirect you to one of proven ways to fix the problem: http://stackoverflow.com/questions/13148828/unable-to-create-the-virtual-machine. But if you're interested to take a deeper look, welcome to this note...