Tag: Windows Development
-
Common Pitfalls in COM Components and OCX / ActiveX Development - Visual Studio 32-bit / 64-bit, Registration, and Admin-Rights Traps
A practical guide to the 32-bit / 64-bit issues, Visual Studio 2022 becoming 64-bit, regsvr32 / Regasm, admin rights, HKCR / HKCU / HKLM, and STA / MTA pitfa...
-
Where Exceptions Should Be Caught, Logged, and Handled - A Practical Guide to Boundaries and Responsibilities in the Call Hierarchy
A practical guide to deciding at each call-hierarchy boundary where exceptions should be caught, where the main log should be written, and where failures sho...
-
What ClickOnce Is: How It Works, How Updates Work, and When It Fits or Does Not Fit in Practice
A practical guide to ClickOnce for .NET Windows desktop app deployment, with Mermaid diagrams covering manifests, updates, caching, signing, and the kinds of...
-
How to Use Windows Sandbox to Speed Up Windows App Validation - Admin Rights, Clean Environments, and Reproducing Missing-Permission or Low-Resource Cases
A practical guide to using Windows Sandbox to validate Windows apps faster by separating admin-rights issues, reproducing clean-environment failures, and tes...
-
If You Have to Build Your Own Logger, What Is the Minimum You Actually Need? - Practical Requirements and Integration Test Checks
A practical guide to the minimum requirements for a custom application logger and the integration tests worth running with real files, threads, and processes.
-
Where Unit Tests End and Integration Tests Begin - A Practical Boundary Guide
A practical guide to drawing the boundary between unit tests and integration tests by separating pure logic, formatting, wiring, environment differences, and...
-
How DLL Name Resolution Works on Windows: Search Order, Known DLLs, API Sets, and SxS in Practice
A practical guide to Windows DLL name resolution, covering search order, Known DLLs, loaded-module checks, API sets, SxS manifests, and the impact of LoadLib...
-
When Windows Admin Privileges Are Actually Required: UAC, Protected Areas, and Practical Design Boundaries
A practical guide to when Windows admin privileges are truly required, covering UAC, protected locations, services, drivers, and per-user versus per-machine ...
-
What VBA Is: Limits, Future Outlook, When to Replace It, and Practical Migration Patterns
A practical guide to what VBA is, its limits, where replacement makes sense, and how to migrate existing Excel or Access assets in stages.
-
Serial Communication App Pitfalls - Framing, Timeouts, Flow Control, Reconnects, USB Adapters, and UI Freezes
A practical guide to serial communication app pitfalls in Windows, covering framing, timeouts, flow control, reconnects, USB serial adapters, and logging des...
-
How to Preserve Crash Logs in Windows Apps Even When They Die from Programming Errors - Best Practices with WER, Final Markers, and Watchdog Design
A practical guide to preserving useful crash evidence in Windows apps by combining normal logs, final crash markers, WER LocalDumps, and watchdog-style super...
-
Windows App UX Design Thinking - A Decision Table for ToC, ToB, Monitoring, Field Terminals, and Tray Tools
A practical UX decision table for Windows applications, organized by ToC / ToB context, input method, work environment, and the cost of mistakes.
-
How to Choose Between Windows Forms, WPF, and WinUI - A Decision Table for New Development, Existing Assets, Deployment, and UI Needs
A practical decision table for choosing between Windows Forms, WPF, and WinUI based on new development, existing assets, deployment, UI richness, and team cu...
-
Shared Memory Pitfalls and Best Practices - Synchronization, Visibility, Lifetime, ABI, and Security First
A practical guide to shared memory pitfalls and safer design, covering synchronization, visibility, lifetime, ABI, permissions, and recovery on Windows and P...
-
What Reg-Free COM Is - How Registration-Free COM Works, Where It Fits, and Where It Does Not
A practical introduction to registration-free COM, covering activation contexts, manifests, benefits, limits, and when it is a good fit in real Windows appli...
-
How to Build Excel Report Output: COM Automation, Open XML, and Template-Based Tradeoffs
A practical decision guide for building Excel report output in Windows applications and business systems, comparing COM automation, direct xlsx generation, t...
-
How to Burn Images and Text into MP4 Frames with Media Foundation - Source Reader, Drawing, Color Conversion, Sink Writer, and a One-File C++ Sample
A practical way to burn images and text into every MP4 frame with Media Foundation, organized as Source Reader, drawing, color conversion, and Sink Writer, w...
-
Windows Crash Dump Collection for Apps: When to Start with WER, ProcDump, or WinDbg
An introductory guide to collecting Windows application crash dumps, including when to use WER LocalDumps, ProcDump, or MiniDumpWriteDump, how to choose betw...
-
Why Windows Code Should Prefer Event Waits Over Timer Polling
A practical guide to why Windows code should prefer event-driven waits over short timer polling when waiting for work arrival, I/O completion, or stop reques...
-
Checklist for Unexpected Exceptions - Should the App Exit or Continue? A Practical Decision Table
A practical decision table for whether a Windows application should exit or continue after an unexpected exception, viewed through state corruption, external...
-
How to Isolate Only Administrator-Required Work in Windows Apps
A practical deep dive into keeping a Windows UI app at asInvoker while isolating administrator-only operations into a helper EXE, covering UAC, runas, named ...
-
DPAPI Best Practices for Keeping Secrets out of Plaintext Config in Windows Apps
A practical guide to using DPAPI and ProtectedData to keep passwords, API tokens, and other secrets out of plaintext Windows app configuration files, includi...
-
What to Check Before Migrating .NET Framework to .NET - A Practical Premigration Checklist
A practical premigration checklist for moving from .NET Framework to modern .NET, covering project types, unsupported technologies, NuGet dependencies, Packa...
-
How to Convert YUV Frames to RGB with Media Foundation - Source Reader Auto Conversion and Manual Conversion Patterns
A practical guide to converting YUV video frames to RGB with Media Foundation, covering Source Reader auto-conversion to RGB32 and manual NV12 / YUY2 convers...
-
Windows NIC Advanced Properties Guide - Jumbo Frames, RSS, LSO, RSC, Flow Control, EEE, and Wake on LAN
A practical guide to Windows NIC advanced properties, including Speed & Duplex, jumbo frames, RSS, RSC, LSO, flow control, EEE, and Wake on LAN, with advice ...
-
How to Extract a Still Image from an MP4 with Media Foundation - A Single .cpp File You Can Paste into a C++ Console App
How to use the Media Foundation Source Reader to extract the frame nearest a target timestamp from an MP4 and save it as PNG, with a final one-file .cpp samp...
-
A Minimum Security Checklist for Windows Application Development
A practical minimum security checklist for Windows desktop application development, covering permissions, signing, secrets, transport security, input validat...
-
What COM / ActiveX / OCX Are - A Practical Guide to the Differences and Relationships
A practical explanation of what COM, ActiveX, and OCX are, how they differ, how they relate to OLE, where they were used, and how to think about them today.
-
Why It Is Worth Bringing Generic Host / BackgroundService into a Desktop App - Startup, Lifetime, and Graceful Shutdown Become Much Easier to Organize
When startup logic, periodic work, shutdown handling, logging, configuration, and dependencies begin to scatter across a Windows desktop app, bringing in .NE...
-
How to Handle ActiveX / OCX Today - A Decision Table for Keep / Wrap / Replace
A practical decision guide for what to do when you find ActiveX / OCX in a real project: keep it, wrap it, or replace it, with bitness, registration, browser...
-
How to Turn C# into a Native DLL with Native AOT - Calling UnmanagedCallersOnly Exports from C/C++
A practical guide to publishing a C# class library as a native DLL with Native AOT and exposing UnmanagedCallersOnly entry points that can be called from C o...
-
When an Industrial Camera Control App Suddenly Crashes After a Month (Part 2) - What Application Verifier Is and How to Build Failure-Path Test Infrastructure
A practical explanation of Application Verifier and how to use Handles, Heaps, Low Resource Simulation, and tools such as !htrace to build a failure-path tes...
-
When an Industrial Camera Control App Suddenly Crashes After a Month (Part 1) - How to Find a Handle Leak and Design Logging for Long-Running Operation
A practical case study on how to investigate a Windows application that crashes only after long-running operation, using an industrial camera control app exa...
-
When Industrial Camera TCP Traffic Stops for Several Seconds - How to Narrow Down Retransmission Waits with RFC1323 Timestamps
A practical guide to diagnosing industrial-camera TCP pauses that last several seconds, using packet loss, RTO behavior, RFC1323 timestamps, and Wireshark ev...
-
How to Use FileSystemWatcher Safely - Lost Events, Duplicate Notifications, and the Traps Around Completion Detection
A practical guide to FileSystemWatcher that explains missed events, duplicate notifications, completion-detection traps, rescans, atomic claims, and idempote...
-
What Media Foundation Is - Why It Starts to Feel Like COM and Windows Media APIs at the Same Time
A practical introduction to Media Foundation that explains the basic terms of Windows media APIs together with COM concepts such as HRESULT, IMFSourceReader,...
-
A Practical Guide to Soft Real-Time on Windows - A Checklist for Reducing Latency
A checklist-style guide to soft real-time on ordinary Windows, covering waiting strategy, priorities, timers, power settings, queue design, and measurement.
-
Safe File Integration Locking - Best Practices for File Locks, Atomic Claims, and Idempotent Processing
A practical guide to file-integration concurrency control, organized around file locks, atomic claims, temp-to-rename publication, and idempotency.
-
Why a C++/CLI Wrapper Is Often the Best Way to Use a Native DLL from C# - A Practical Comparison with P/Invoke
When calling a native DLL from C#, there are cases where P/Invoke is enough and cases where a thin C++/CLI wrapper becomes the cleaner option. This article o...
-
COM STA/MTA Basics - Threading Models and How to Avoid Hangs
A practical introduction to COM STA/MTA covering the apartment model, UI threads, message loops, marshaling, and the kind of hang patterns that appear in Win...
-
How to Call a 64-bit DLL from a 32-bit Application - A Practical COM Bridge Case Study
When a 32-bit application cannot directly load a 64-bit DLL, an out-of-process COM bridge is often the cleanest solution. This article walks through the Wind...
-
What COM Is - Why Windows COM Still Feels Beautifully Designed
This article explains what COM is from the viewpoints of Windows COM interface design, IUnknown, GUIDs, and binary compatibility, and why the model still mat...