Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DLL Talk / How to look into Dll's, finding useful functions

Author
Message
Mason
20
Years of Service
User Offline
Joined: 20th Mar 2004
Location: Arizona
Posted: 2nd Jun 2007 21:50 Edited at: 2nd Jun 2007 21:50
I see a lot of people tapping into dll's such as urlmon.dll, kernal.dll, and other dll's that windows has. How do I look up the functions and their parameters to find usefull dll's? I have Dependency Walker that opens up a dll and shows functions, but I don't believe it shows the parameters and or their use. Any idea's? example:



IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 2nd Jun 2007 22:35
Google. Or MSDN, but mostly Google since MSDN2 was introduced.

I find it's very useful to look for Delphi related sites. Delphi API documentation is easier to read for a BASIC programmer than C++ documentation.

Mason
20
Years of Service
User Offline
Joined: 20th Mar 2004
Location: Arizona
Posted: 2nd Jun 2007 22:40
I googled for about 30 minutes before I started this topic. I must be searching wrong or something because I check google and msdn first. What are good search keywords? I'm typing "urlmon.dll documentation" "urlmon documentation" "urlmon functions". Since I don't know much about the topic, I believe my keywords are pretty off


IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 3rd Jun 2007 00:43
If you know specific functions that you are looking for, then google for those.

If you need to find out what's actually available in urlmon.dll, then you need to google for "urlmon delphi" or "urlmon wine".

I forgot to mention the Wine project before - that's the windows emulator, and you can usually locate code that emulates the standard windows DLLs. The base URL for the DLL section of their code is http://source.winehq.org/source/dlls

Mason
20
Years of Service
User Offline
Joined: 20th Mar 2004
Location: Arizona
Posted: 3rd Jun 2007 06:04 Edited at: 3rd Jun 2007 06:06
So I tried the source place, looked into urlmon, and came up with this code.



It runs and the dll returns a 1. When I replace google with some website that doesn't exist, it still returns a one... I'm looking at the return type and I'm thinking that might be why. Any ideas? Heres the function I'm Using: http://source.winehq.org/source/dlls/urlmon/urlmon_main.c
Scroll down about half way and you'll see info on the function.

I'm pretty sure the function is supposed to identify if its a valid url, but now that I think about it, I may have just assumed this..


Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 3rd Jun 2007 13:58
Quote: "When I replace google with some website that doesn't exist, it still returns a one"

Well if it's still valid (the syntax of it is correct), then that's why. It doesn't return 0 for sites that don't exist.

Tempest (DBP/DBCe)
Multisync V1 (DBP/DBCe)
Mason
20
Years of Service
User Offline
Joined: 20th Mar 2004
Location: Arizona
Posted: 4th Jun 2007 01:19
Well I put this in
and it still gave me a one. I don't think you can have some of those characters in your url, hence invalid?


IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 4th Jun 2007 16:25
The first fault with your code is that the string needs to be UNICODE, not ANSI, so you can't call it with a plain string like that.

The next is that IsValidURL returns a HRESULT and can return 1 of 3 values:

0 - OK
1 - Failed
0x80070057 - Invalid argument

You need to read the API documentation for these commands too!

Login to post a reply

Server time is: 2024-11-22 21:46:42
Your offset time is: 2024-11-22 21:46:42