I'm reading the import table of a PE file and I'm able to get the names of the DLLs it imports from the IMAGE_IMPORT_DESCRIPTOR structures but I can't find where the DLLs paths are. How can I read them?
You have to wait until runtime to be able to get hold of the paths to imported DLLs. This is because the answer depends upon the runtime environment at the point at which the library is loaded.
For example, two different programs could have two different DLL search paths. And so the paths to the imported DLLs could be different for those two programs.