Native Binary Scanning Tool (NanoServerApiScan.exe) for Nano Server

This blog post is now obsolete. Please go to the new one here: http://blogs.technet.com/b/nanoserver/archive/2016/04/27/nanoserverapiscan-exe-updated-for-tp5.aspx

 

If you developed a 64-bit application, tool, or agent for Windows Server in C/C++, you can use NanoServerApiScan.exe to check if your app will also run on Nano Server. Remember that Nano Server is 64-bit only and won’t run 32-bit binaries.

NanoServerApiScan.exe scans a directory containing your binaries and reports an error if it finds an API that is not available in Nano Server. It even provides replacement API suggestions in many cases. NanoServerApiScan.exe requires .NET Framework version 4.0 or higher.

Syntax

NanoServerApiScan.exe /BinaryPath: <directory containing your binaries> /WindowsKitsPath: <Windows SDK directory> /ReverseForwardersPath: <directory containing Reverse Forwarders binaries>

/BinaryPath (Mandatory): The directory containing your binaries. NanoServerApiScan.exe will parse all sub-directories as well.

/WindowsKitsPath (Optional): If you install a newer version of the Windows 10 SDK and would prefer to use the OneCore.lib file that came with this newer SDK, instead of the version bundled with NanoServerApiScan.exe, use this parameter to specify the Windows 10 SDK directory.

/ReverseForwardersPath (Optional): The directory containing the extracted Reverse Forwarders binaries. If you will use your tool with the Nano Server Reverse Forwarders package, you can extract the binaries from this package (by unzipping the cab file) to a local folder and specify the path to this folder as the argument to this parameter.

Example

NanoServerApiScan.exe /BinaryPath:e:\Temp\Test

Sample output from NanoServerApiScan.exe:

=== e:\Temp\Test\LrmApi.dll ===

ERRORS:

 

  KERNEL32.dll

    GetStartupInfoA (Proc not found)

      Please use API GetStartupInfoW as substitution.

    SetHandleCount (Proc not found)

 

For a list of supported APIs in Nano Server, please go to: https://msdn.microsoft.com/en-us/library/mt588480(v=vs.85).aspx

 

ref@