Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Home NTDEV

More Info on Driver Writing and Debugging


The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.


Check out The OSR Learning Library at: https://www.osr.com/osr-learning-library/


Before Posting...

Please check out the Community Guidelines in the Announcements and Administration Category.

Writing app to build HLK submission: How to load results from another test controller?

edharfmannedharfmann Member Posts: 3
edited September 3 in NTDEV

I've gone through the HLK API and do not understand how to import/load the merge from another controller. I've gone through the forums here and searched online.

We need to run the tests on one set of controller machines, gather the results and build the final package on another. I see how to build the tests, run the tests, export from each controller, but I cannot find anything to 'import' those test results (.hlkx) onto another controller for merger and signing for submission.

I'm trying to do this in C#. I'm not opposed to PowerShell, but what I've found leaves gaps of how to do things.

Thank you in advance,
Ed

Comments

  • Peter_Viscarola_(OSR)Peter_Viscarola_(OSR) Administrator Posts: 8,663

    And you think this should be posted in the Announcements and Administration forum??

    I think you want your query to be in NTDEV... I'll move it for you.

    Peter

    Peter Viscarola
    OSR
    @OSRDrivers

  • edharfmannedharfmann Member Posts: 3

    Thank you. None of the forums really sounded right.

    Apologies and thank you.

  • CaptainFlintCaptainFlint Member Posts: 66

    @edharfmann
    You can use the PackageWriter.Merge() method to merge hlkx packages together. The procedure looks like this:

    If merging is performed on one of the controllers involved in testing, then you already have a driver testing project, and you can start with it by creating a PackageWriter instance initialized by this project. If you have a clear dedicated machine, you get the first hlkx package, initialize a PackageManager instance using the path to hlkx as initizlizer, and then use PackageManager.GetProject() to use as initializer for PackageWriter. Either way, you now have a PackageWriter instance.

    Now you just enumerate the rest of the hlkx packages, open each of them using PackageManager, and merge their projects into your PackageWriter using the Merge() method. Keep in mind that attached drivers and supplemental files will not be merged automatically. If you need them, you have to extract them from those packages and later you can add them into your new merged package using the respective methods. You will need to keep track which drivers correspond to which targets, if they are different (like 32- and 64-bit versions, or even different OS versions).

    Finally, dump the merged package onto disk using the Save() method, and there you go.

  • edharfmannedharfmann Member Posts: 3

    Thank you very much. That's the info I needed to get started.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. Sign in or register to get started.

Upcoming OSR Seminars
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead!
Internals & Software Drivers 15 November 2021 Live, Online
Writing WDF Drivers TBD Live, Online
Developing Minifilters 7 February 2022 Live, Online
Kernel Debugging 21 March 2022 Live, Online