Giter Club home page Giter Club logo

dll-diagnostics's Introduction

DLL Diagnostic Tools

The dlldiag command-line tool provides functionality to assist in identifying the DLL dependencies of an application or library and diagnosing dependency loading issues. It is primarily intended for use when migrating existing applications to Windows containers, where traditional GUI-based tools are unavailable. Identifying the minimal set of dependencies for an application facilitates a workflow where the required DLL files can be copied from the mcr.microsoft.com/windows base image into the mcr.microsoft.com/windows/servercore base image, thus maximising application compatibility whilst maintaining the minimum possible image size.

Contents

Requirements and installation

The dll-diagnostics Python package requires the following:

You can install the package by running the following command:

pip install dll-diagnostics

If you don't need the package on your host system then you can download a prebuilt container image from Docker Hub to start using the dlldiag command inside a Windows container.

Usage

The dlldiag command-line tool provides the following subcommands:

  • dlldiag deps: this subcommand lists the direct dependencies for a module (DLL/EXE) and checks if each one can be loaded. Delay-loaded dependencies are also listed, but indirect dependencies (i.e. dependencies of dependencies) are not.

  • dlldiag docker this subcommand generates a Dockerfile suitable for using the dlldiag command inside a Windows container, allowing the user to optionally specify the base image to be used in the Dockerfile's FROM clause. This is handy when you want to extend an existing image of your choice, rather than simply extending the Windows Server Core image as the prebuilt images from Docker Hub do.

  • dlldiag trace: this subcommand uses the Windows debugger to trace a LoadLibrary() call for a module (DLL/EXE) and provide detailed reports of the results. The trace makes use of the Windows kernel loader snaps feature to obtain fine-grained information, as discussed in Junfeng Zhang's blog post "Debugging LoadLibrary Failures". The trace captures information about both indirect dependencies and delay-loaded dependencies.

Legal

Copyright © 2019, Adam Rehn. Licensed under the MIT License, see the file LICENSE for details.

dll-diagnostics's People

Contributors

adamrehn avatar sammydre avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.