Jump to content

noob trying to edit dll file dependencies


cov3rt

Recommended Posts

i am trying to get a working driver for the mobility m6 graphics on windows 95, i tried certain drivers and couldn't get it work before so i was trying to get older ones and i found two of them that are older to test but i noticed that there might be something else preventing the drivers from working, based on this thread here below -

 

http://www.msfn.org/board/topic/132611-mobility-radeon-9200-on-win95c/

 

post #7, the person mentions "make sure that Windows 98/ME ONLY API call USER32.EnumDisplayMonitors is NOT present so such driver CAN support Windows 95.".

 

so going by this, all i would need to do is open up the dll file in dependency walker ( which im new to ) and remove or delete the information mentioning the above? the thing is, i can't expand the dl_ file  so i can open the dll file in dependency walker as explained in post #7 of the above thread, it just mentions can't open input file...

Link to comment
Share on other sites


Well, it doesn't work that way. :no:

 

"Make sure that API call USER32.EnumDisplayMonitors is NOT present" does not mean "Make sure that API call USER32.EnumDisplayMonitors is NOT present, if it is just edit the .dll removing the call" and BTW Dependency Walker has NO editing capabilities.

If you prefer what was described in the mentioned post was just a "diagnostic method", not a "cure".

 

To expand a .dl_ file usually 7-zip will do nicely, if it doesn't try Universal Extractor.

 

jaclaz

Link to comment
Share on other sites

Well, it doesn't work that way. :no:

 

"Make sure that API call USER32.EnumDisplayMonitors is NOT present" does not mean "Make sure that API call USER32.EnumDisplayMonitors is NOT present, if it is just edit the .dll removing the call" and BTW Dependency Walker has NO editing capabilities.

If you prefer what was described in the mentioned post was just a "diagnostic method", not a "cure".

 

To expand a .dl_ file usually 7-zip will do nicely, if it doesn't try Universal Extractor.

 

jaclaz

thanks for the info, i download 7-zip and opened the dl_ file and then copied the dll file into the desktop, opened it up with eXeScope 6.00, checked the info in header, export, import, and resource bullets and there were no names under enumdisplaymonitors, does this mean the driver might work on windows 95? what way would cure the problem? and what program would i need to edit the dl_ file or whatever file(s) to make a working driver?

Link to comment
Share on other sites

opened the dl_ file and then copied the dll file into the desktop, opened it up with eXeScope 6.00, checked the info in header, export, import, and resource bullets and there were no names under enumdisplaymonitors, does this mean the driver might work on windows 95?

Not really-really :no:plainly it means that you weren't able to find in that .dll you examined a reference to USER32.EnumDisplayMonitors.

 

what way would cure the problem?

Writing a new driver.

 

and what program would i need to edit the dl_ file or whatever file(s) to make a working driver?

I am not sure you understand the way a .dll works.

 

A .dll is nothing but a container with a number of fuctions inside.

You can think of it as a number of small .exe files inside a .zip archive.

What happens transparently when the .dll is in use. i.e. a function in it is called, is that the archive is opened, a single small executable is loaded into memory and executed and the archive is closed again.

The issue here is that this archive is (besides read only) indexed/assembled in such a way that you cannot insert (add) in it anything, not even a single byte.

You can normally replace the whole archive with a new version (including the added needed function), but this poses a problem, you need to re-write from scratch all the other functions besides the one you need and rebuild the whole archive :w00t: or you need to find a function that is never used, that has a suitable name and size and manage to replace it with your new function, and fix checksums/indexes/etc..

This in the case of a "system .dll" such as USER32.DLL is in practice very, very difficult. :ph34r:

 

The question is not really "what program", but rather "How/where can I learn how to edit a .dll" and the answer to this other question is "you study the windows OS in depth, including a bit of low-level (assembly) programming, a lot of reverse engineering and debugging, try and get familiar with each and every available related tool, you try hacking non-system .dll's first and after due time you will know what to do (and also which program to use or you write your own)".

 

jaclaz

Link to comment
Share on other sites

EnumDisplayMonitors would be present under Import->USER32.dll. If it is not, this driver file will not have that particular problem but still might not work.

If EnumDisplayMonitors is present, you could try using Importpatcher or a hex editor to change it to another four-parameter function that is available in Win95's User32.dll such as CreateDC, CreateIC, EnumObjects, or DrawEscape, but with low chance of success.

Link to comment
Share on other sites

thanks guys for the info, getting into the depth of all this and understanding would be quite difficult, i was simply trying to check a particular thing and apparently that has been cleared now. the only thing left now is to test the drivers, if they work, then good, if not, well, i can still use the laptop with a different operating system such as windows 98 that would support the driver.

Link to comment
Share on other sites

thanks guys for the info, getting into the depth of all this and understanding would be quite difficult, i was simply trying to check a particular thing and apparently that has been cleared now. the only thing left now is to test the drivers, if they work, then good, if not, well, i can still use the laptop with a different operating system such as windows 98 that would support the driver.

Yes, but maybe if you pose the real problem, which is - I believe - something *like*:

 

I have a PC <insert here the DETAILED make/model/etc.> on which I would like to run Windows 95, more specifically I am trying to find suitable graphic card drivers for  <insert here EXACT data of the hardware, including VEN/PID. etc.> but I cannot find suitable ones.

I already tried <insert here EXACT description of the tested drivers INCLUDING - when available - a link to where they can be found> but they don't work as they <insert here EXACT description of what happened in the test or what makes you think they don't work> .

Where can I find suitable drivers?

Maybe, just maybe, someone might help you.

jaclaz

Link to comment
Share on other sites

I am not sure you understand the way a .dll works.

A .dll is nothing but a container with a number of fuctions inside.

You can think of it as a number of small .exe files inside a .zip archive.

What happens transparently when the .dll is in use. i.e. a function in it is called, is that the archive is opened, a single small executable is loaded into memory and executed and the archive is closed again.

A DLL contains a number of Functions but they are not separable blocks. They are loaded and if not shared unloaded as a single block. You may be thinking of LIB Files that contain separate executable modules that can be individually compiled into a program.

The issue here is that this archive is (besides read only) indexed/assembled in such a way that you cannot insert (add) in it anything, not even a single byte.

They can be patched to some degree and normally only the Code Segments are Read Only and then only when in memory.
Link to comment
Share on other sites

Not only I never said they were separable blocks, but the paragon/explanation was EXACTLY to convey the idea that they are NOT separable blocks and that making even minor edits is a huge PITA and requires a deep knowledge on the matter.

The idea of providing a comparison to something the OP may be more familiar with is not that it should be 100% accurate, it is to help him understand the behaviour rather than the technicalities involved.

jaclaz

Edited by jaclaz
Link to comment
Share on other sites

Not only I never said they were separable blocks, but the paragon/explanation was EXACTLY to convey the idea that they are NOT separable blocks and that making even minor edits is a huge PITA and requires a deep knowledge on the matter.

The idea of providing a comparison to something the OP may be more familiar with is not that it should be 100% accurate, it is to help him understand the behaviour rather than the technicalities involved.

jaclaz

I was referring to your statement that only a single executable subsection is loaded into memory. I was not referring to the DLL itself.

Less than 100% accuracy is not good, especially since the OP is not the only one reading the thread.

Link to comment
Share on other sites

Less than 100% accuracy is not good, especially since the OP is not the only one reading the thread.

Well, then you should also be 100% accurate when nitpicking, now hopefully everything is clear for all the readers. :yes:

jaclaz

Link to comment
Share on other sites

Less than 100% accuracy is not good, especially since the OP is not the only one reading the thread.

Well, then you should also be 100% accurate when nitpicking, now hopefully everything is clear for all the readers. :yes:

jaclaz

I would hope so. All the nits have been picked.
Link to comment
Share on other sites

hi guys, i tested drivers 4.13.7112 and 4.13.7115 for the mobility m6 driver on windows 95 and both did not work, the problem is similar to what i experienced when trying to get the intel extreme graphics 2 driver or 845g, 865g or similar driver to install on windows 95, i was able to find a driver that mentioned "working" in device manager after installation but it would constantly ask to set the resolution or adapter type upon reboot that shows the resolution and color bit mode, i do not wish to go further in diagnosis or detailed info, im moving on with this build anyways and trying something different, if there is something that i can check out or provide info that is very specific, then i may provide that. i simply wanted to make it known that based on my experience, i was not able to get the drivers to work. if there are other things that could be done or checked out, then i may try these solutions in the future if i want to. the laptop i was using with windows 95 installed was gateway 450rog. the hardware id of the gpu was "PCI\VEN_1002&DEV_4C59". the 4.13.7112 driver seemed to not even install anything, its as if it was a blank driver, the 4.13.7115 installed and mentioned working in device manager but had the problem with the display adapter and resolution setting. i hope i helped out addressing at least part of the issues.

Link to comment
Share on other sites

here is what's interesting, with windows 98SE installed on the same laptop, the hardware id mentioned the gpu as mobility m7 or mobility 7500 instead of mobility m6. i used the windows 95 driver i had for mobility 7500 and its working fine in windows 98SE. maybe perhaps if i used this same driver i have on 98SE on w95, then it would've worked, strange though, i never had this issue on other computers, they would always display the same hardware id for the gpu when experimenting on different operating systems on the same laptop.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...