- Determining required DLLs that need to be included in the asset package
- Determine required DLLs
- Compare required DLLs with those included in container
- Windows Startup Error “load needed DLLs for kernel”.
- How do I find out which dlls an executable will load?
- 10 Answers 10
- Not the answer you’re looking for? Browse other questions tagged dll executable or ask your own question.
- Linked
- Related
- Hot Network Questions
- Subscribe to RSS
- How to Determine Which Dll Dependency is Failing to Load in Windows Store/Universal Apps?
- 1 Answer 1
- Determine the loaded path for DLLs
- 3 Answers 3
Determining required DLLs that need to be included in the asset package
This article helps you generate a list of DLLs required to run your Windows game server in PlayFab Multiplayer Servers. By default, the managed container image includes many commonly used DLLs. To determine which additional DLLs are needed, compare the list of DLLs for your game server with the list of DLLs included in the manged container image. Any additional DLLs must be included in your asset zip file.
Determine required DLLs
Use the ListDlls utility to list all of the DLLs that are loaded when you run your game server locally. To generate the list:
- Download ListDlls from sysinternals.
- Run your game server executable on your local machine by using the instructions found in local debug steps in process mode or as a standalone process without using the LocalMultiplayerAgent.
- Run listdlls and specify your running game server as a parameter. Example: listdlls ServerLoadSimulator.exe
- Compare the list that is output against the list of DLLs included in your asset zip file (typically everything in the same folder as your executable). The delta between the lists are the system DLLs that are required by your game server.
Compare required DLLs with those included in container
With the list of system DLLs determined, the next step is to determine which of these system DLLs are already included in the container.
- Download the PlayFab multiplayer container image. To download the container image, run the setup.ps1 script referenced in local debug steps. Alternatively, allocate a new MPS instance and connect via Remote Desktop. All Windows MPS instances will have the container image downloaded.
- Start a command line session in a new docker container by running the following command. You might need to run an administrator command window.
Replace «wsc-10.0.17134.950» with the tag of the docker image you downloaded in step 1. If you are not sure of the correct tag, run docker images to list the downloaded images.
- From the command line, locate the folders that correspond to the folders of the required DLLs on your local machine. List the DLLs present in the container and compare to the list of required DLLs that you generated. Any DLLs in the required list, but not present in the container, must be included in your asset zip file.
- To end the cmd process and cause the container to stop, type exit .
—>
Windows Startup Error “load needed DLLs for kernel”.
Original Title: I have a toshiba satellite that says load needed DLLs for kernel (xp)
It has a toshiba MK6021GAS the model is a toshiba satellite A35-S159
If you mean you are seeing a message like this:
Windows could not start because of an error in the software.
Please report this problem as :
load needed DLLs for kernel.
Please contact your support person to report this problem.
. and when you choose to boot in Safe Mode, the last thing you will see loading is:
then you will see the same message as before:
Windows could not start because of an error in the software.
Please report this problem as :
load needed DLLs for kernel.
Please contact your support person to report this problem.
The meaning is that this file is probably missing or corrupt:
Since that is one of the 3498 files that Windows File Protection cares about, it should never be missing. If it really is missing, it was probably quarantined (effectively deleted) by your unspecified antivirus/antimalware application.
There are likely to be good copies of the file on your system here:
There is also one on my SkyDrive that you can download to a working machine and sneakernet it using a floppy or USB memory device to the afflicted machine and copy it to where it belongs.
Depending on your registry setup, you may not be able to access the floppy or USB stick once you get into the Recovery Console, but you will always be able to using a Hiren’s BootCD (it has it’s own registry), but try the easy stuff first.
The kdcom.dll is the same for SP2 and SP3 so somehow or another you need to boot on something to replace your missing or corrupted one.
You can create a bootable XP Recovery Console CD (no XP media required) and then when you do, you would enter a command like this:
copy c:\windows\system32\dllcache\kdcom.dll c:\windows\system32
or (depending how SP3 was installed).
copy c:\windows\ServicePackFiles\i386\kdcom.dll c:\windows\system32
Respond in the affirmative if asked to overwrite and existing file and you should see a message the one file(s) was copied.
Make yourself a bootable XP Recovery Console first since that is easy and something you can always use on some other rainy day. If that doesn’t get it for you, or the file is nowhere to be found on your system, you can download it from my SkyDrive, but try the easy stuff first.
Here is how to make a bootable XP Recovery Console CD (no XP media required):
If you have no bootable XP media (or are not sure what you have) create a bootable XP Recovery Console CD and be sure what you have (no XP media required).
This is not the same as any recovery disks that might have come with a store bought system.
You can make a bootable Recovery Console CD by downloading an ISO file and burning it to a CD.
The bootable ISO image file you need to download is called:
Download the ISO file from here:
Use a new CD and this free and easy program to burn your ISO file and create your bootable CD (do not install UniBlue or the Ask Toolbar — ever!):
Here are some instructions for ImgBurn:
It would be a good idea to test your bootable CD on a computer that is working.
You may need to adjust the computer BIOS settings to use the CD ROM drive as the first boot device instead of the hard disk. These adjustments are made before Windows tries to load. If you miss it, you will have to reboot the system again.
When you boot on the CD, follow the prompts:
Press any key to boot from CD.
The Windows Setup. will proceed.
Press ‘R’ to enter the Recovery Console.
Select the installation you want to access (usually 1: C:\WINDOWS)
You may be asked to enter the Administrator password (usually empty).
You should be in the C:\WINDOWS folder. This is the same as the
C:\WINDOWS folder you see in explorer.
The Recovery Console allows basic file commands like: copy, rename, replace, delete, cd, chkdsk, fixboot, fixmbr, etc.
For a list of Recovery Console commands, enter help at the prompt or read about the XP Recovery Console here:
A good idea before starting things is to first verify the integrity of your file system using the chkdsk command.
From the command prompt window run the chkdsk command on the drive where Windows is installed to try to repair any problems on the afflicted drive.
Running chkdsk is fine even if it doesn’t find any problems. It will not hurt anything to run it.
Assuming your boot drive is C, run the following command:
Let chkdsk finish and correct any problems it might find.
It may take a long time for chkdsk to complete or it may appear to be ‘stuck’. Be patient. If the HDD light is still flashing, chkdsk is doing something. Keep an eye on the percentage amount to be sure it is still making progress. It may even appear to go backwards sometimes.
You should run chkdsk /r again until it finds no errors to correct.
How do I find out which dlls an executable will load?
If I have a Windows executable, how can I find out which dlls it will load?
I’m just talking about which ones that will be loaded statically, not ones it might load dynamically with something like LoadLibrary.
10 Answers 10
There are utilities that will do this for you.
In the past I’ve used the MS tool (depends.exe) that came with (I think) VB.:
VS2010 VS2012 VS2013 VS2015 Current
and probably others as well.
dumpbin is a tool that comes with VC++.
To see what DLLs a program will import:
- Open Visual Studio
- Menu Item Tools | Visual Studio Command prompt
- cd to folder containing executable
- dumpbin /dependents whatever.exe
To see what functions (and DLLs) it will import, use
Open the command prompt and then type below command
tasklist /m /fi «imagename eq netbeans.exe»
Type instead netbeans.exe whatever name your exe file name.
Just go to the command prompt and type tasklist /m , you will see the list of dll files used by specific program.
Dependency Walker can help you determine which .dll will be loaded.
Solution for Microsoft .Net:
There is a handy tool called NDepend that will give you all DLL dependencies.
Benefits: allows to explore the process that is already running (I have not found a was to attach the dependency walker to the existing process)
Dependencies — An open-source modern Dependency Walker shows which DLLs a Windows executable will load and it works well in modern Windows 10.
It is a little less powerful than Dependency Walker, but the latter may or may not work in Windows 10 as it was last updated in 2006. (Newer versions of Dependency Walker were bundled with some versions of Windows Development Kit for Windows 10, but not any more.)
Not the answer you’re looking for? Browse other questions tagged dll executable or ask your own question.
Linked
Related
Hot Network Questions
Subscribe to RSS
To subscribe to this RSS feed, copy and paste this URL into your RSS reader.
site design / logo © 2021 Stack Exchange Inc; user contributions licensed under cc by-sa. rev 2021.4.16.39093
By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.
How to Determine Which Dll Dependency is Failing to Load in Windows Store/Universal Apps?
When running a UWP project I’m working on I receive the following dialog.
«Unable to activate Windows Store app ‘MyAppsMangledName’. The ‘MyExeName’ process started, but the activation request failed with error ‘The App didn’t start’.»
The Visual Studio output has the following.
The thread 0x3d4c has exited with code -1073741515 (0xc0000135). The thread 0x3b50 has exited with code -1073741515 (0xc0000135). The program ‘MyExeName’ has exited with code -1073741515 (0xc0000135) ‘A dependent dll was not found’.
The Event Viewer has 3 events that basically restate the popup dialog in 3 different ways and nothing else.
Running Process Monitor during the startup shows me many dlls being successfully loaded but nothing indicating failure besides some NAMENOTFOUND events which unfortunately don’t show what name wasn’t found.
In Win32 a helpful dialog usually indicates which dll could not be loaded. And of course with .Net apps the fusion logs make tracing this very straight forward. But for Store/UWP apps I can’t seem to find a good way to track down the offending dependency.
1 Answer 1
This just hit me too on a project I’m working on. And after much digging, someone on my team was able to figure it out. So figured I’d share it for others struggling with the same issue.
We’re doing UWP with C++ using VS2015. So with that in mind, there is a program called gflags located for me at C:\program Files (x86)\Windows Kits 10\Debuggers\x64\gflags.exe
So you’ll want a cmd window with admin, and run the command gflags.exe -i your-program-name.exe +sls
Note: gflags wasn’t in my path so either add the path or navigate to where it is before executing the command.
Just pass in the name of the exe without directories. What it does is sets a registry setting for VS that turns on sls (show loader snaps) for exe’s matching that name. Then run your application in VS and and you’ll get a large amount of dll loading information including names of the dlls that fail to load in your output window. In our case it was this:
Determine the loaded path for DLLs
I wish to have my application in the following structure.
My EXE will load the DLLs through
DLL.dll and DLL2.dll project will link against common.dll through lib file. There will be 2 different versions of common.dll though.
However, during execution, Exe expected me to place common.dll same directory as Exe , but not same directory as DLL and DLL2 . Is there any way I can resolve this, by able to have the above directory structure. Yet, still use lib to link against DLL/DLL2 with common .
3 Answers 3
You want to load two different DLLs with the same name (common.dll) into the same process.
That seems like a bad idea to me. Is it really necessary? Could one of them be renamed?
Ensuring the DLLs you load can find other DLLs which aren’t in the search path.
(If you were not dynamically loading DLL.dll and DLL2.dll then I’m not sure what the would be. Luckily, I see you are. :))
If you are dynamically loading DLL.dll and DLL2.dll (that is, using LoadLibrary at runtime instead of linking to their .lib files at build time), then you can call SetDllDirectory beforehand to explicitly add the DLL or DLL2 directories to the search path. You would want to only have one directory in the path at once to ensure the right common.dll was loaded.
Note that it is good practice, unless it breaks a poorly-written component, to call SetDllDirectory(«») at the start of your program to remove the current-working-directory (not the program’s directory, don’t worry) from the DLL search path. This mitigates security issues where your code can be tricked into loading DLLs. But also note that if you reset the search path by calling SetDllDirectory(NULL) then you need to call SetDllDirectory(«») again afterwards.
So you’d have code like this:
(Untested so apologies for any mistakes or missing arguments. Should give you the idea, though.)
(You should calculate the C:\MyExePath at runtime. Hard-coding it would be bad, obviously.)