Results 1 to 16 of 16

Thread: [RESOLVED] DLLs: What functions they have, which ones are called by what program

  1. #1

    Thread Starter
    Not NoteMe SLH's Avatar
    Join Date
    Mar 2002
    Location
    192.168.0.1 Preferred Animal: Penguin Reason for errors: Line#38
    Posts
    3,051

    Resolved [RESOLVED] DLLs: What functions they have, which ones are called by what program

    I have a webcam which can be moved around (pan/tilt/zoom). The drivers give the option to do this, as well as when you're displaying an image from it (in any application) a little control window comes up, enabling you to move the cam or zoom in and out.

    Someone has made a DLL that allows you to control its tilt and pan functions through an application. I want to make my own to allow for zooming too. Unfortunatly, i don't know how they did it, since the website with the source is down.

    What i want to do is to try and work out how they got the functions etc. to call in that DLL.

    Logitech has applications that allow you to control the cam, and has multiple DLLs in the same folder. I want to know what the app calls, or at least what functions (and parameters of said functions) are in each of those DLLs.

    Thanks for any help!
    Last edited by SLH; Jul 21st, 2005 at 05:46 AM.
    Quotes:
    "I am getting better then you guys.." NoteMe, on his leet english skills.
    "And I am going to meat her again later on tonight." NoteMe
    "I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
    "my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
    Have I helped you? Please Rate my posts.


  2. #2
    PowerPoster abhijit's Avatar
    Join Date
    Jun 1999
    Location
    Chit Chat Forum.
    Posts
    3,228

    Re: DLLs: What functions they have, which ones are called by what program

    If its a com dll, it should be pretty simple. Add a reference to your vb project and launch the object browser.
    Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz'
    save a blobFileStreamDataTable To Text Filemy blog

  3. #3

    Thread Starter
    Not NoteMe SLH's Avatar
    Join Date
    Mar 2002
    Location
    192.168.0.1 Preferred Animal: Penguin Reason for errors: Line#38
    Posts
    3,051

    Re: DLLs: What functions they have, which ones are called by what program

    Sorry, i should have said, i'm using C++

    I don't have VB installed either, so i can't find out what the functions and parameters are that way.
    Quotes:
    "I am getting better then you guys.." NoteMe, on his leet english skills.
    "And I am going to meat her again later on tonight." NoteMe
    "I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
    "my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
    Have I helped you? Please Rate my posts.


  4. #4
    PowerPoster abhijit's Avatar
    Join Date
    Jun 1999
    Location
    Chit Chat Forum.
    Posts
    3,228

    Arrow Re: DLLs: What functions they have, which ones are called by what program

    I am not familiar with the VC++ interface. Secondly if its a C++ DLL as opposed to a COM DLL, the object browser will not be able to help you out.
    Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz'
    save a blobFileStreamDataTable To Text Filemy blog

  5. #5
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: DLLs: What functions they have, which ones are called by what program

    DLL's which have been documented should have type libraries associated with them. I will do some research as I believe there are some API's which enable you to read a DLL's type libraray.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  6. #6

    Thread Starter
    Not NoteMe SLH's Avatar
    Join Date
    Mar 2002
    Location
    192.168.0.1 Preferred Animal: Penguin Reason for errors: Line#38
    Posts
    3,051

    Re: DLLs: What functions they have, which ones are called by what program

    Ok, cool thanks adam. Thanks too abhijit, for the info.
    Quotes:
    "I am getting better then you guys.." NoteMe, on his leet english skills.
    "And I am going to meat her again later on tonight." NoteMe
    "I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
    "my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
    Have I helped you? Please Rate my posts.


  7. #7
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: DLLs: What functions they have, which ones are called by what program

    If these DLL's have type libraries you can use the following article, which shows you how to import them in C++

    http://www.codeproject.com/tips/importtlbs.asp

    You will need the program ID for the DLL. You can find this by searching the registry key HKEY_CLASSES_ROOT for the dll. For example, if I want to find the program ID for wshom.dll:
    1. Search the registry for wshom.dll. You should find it in a key called InProcServer32.
    2. The parent key the dll's class ID should contain a key called ProgID. The default value for this key is what you need.
    3. Look also for a key called VersionIndependentProgID and use this if it is present. In this case the program ID is wscript.network
    4. If the dll has a type library then there should also be a sub key called TypeLib

    N.b: a dll may have several program ID's and type libraries.

    MS also has a DLL called TlibInf32.dll which contains functions which enable you to programaticly extract information from type libraries. I have some VB code which uses these functions, let me know if you want to take a look and I'll upload it.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  8. #8

    Thread Starter
    Not NoteMe SLH's Avatar
    Join Date
    Mar 2002
    Location
    192.168.0.1 Preferred Animal: Penguin Reason for errors: Line#38
    Posts
    3,051

    Re: DLLs: What functions they have, which ones are called by what program

    Thanks for thelink, i'll check it out asap.

    Is the VB code VB6 or .net? I don't have VB6 installed, so i wouldn't be able to compile it.
    If you have a working application that can do something like that, it'd be great!

    EDIT: I get the following error

    error C3501: there is no typelib registered for ProgID 'BackWeb.ClientExt.1'

    I cut & pasted that in. I don't need to copy the DLL to my application or anything do i?

    Also, what will this do, it seems i still need to know the function names/parameters to use the DLLs i import, unless i'm mistaken???

    EDIT2: Ah, didn't see that i need to look for a typelib key in the registary, they don't have any (tried a few DLLs), that means i'm stuck i guess??
    Last edited by SLH; Jul 21st, 2005 at 05:16 PM.
    Quotes:
    "I am getting better then you guys.." NoteMe, on his leet english skills.
    "And I am going to meat her again later on tonight." NoteMe
    "I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
    "my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
    Have I helped you? Please Rate my posts.


  9. #9
    Admodistrator |2eM!x's Avatar
    Join Date
    Jan 2005
    Posts
    3,900

    Re: DLLs: What functions they have, which ones are called by what program

    use spy++ to catch the messages it sends when zooming

  10. #10

    Thread Starter
    Not NoteMe SLH's Avatar
    Join Date
    Mar 2002
    Location
    192.168.0.1 Preferred Animal: Penguin Reason for errors: Line#38
    Posts
    3,051

    Re: DLLs: What functions they have, which ones are called by what program

    Quote Originally Posted by |2eM!x
    use spy++ to catch the messages it sends when zooming
    Would that work?? Great if it does, but i don't think so, since it catches/intercepts messages going TO the window. Plus it moves the camera via DLL calls (i assume) not by sending messages to another application/window.
    Quotes:
    "I am getting better then you guys.." NoteMe, on his leet english skills.
    "And I am going to meat her again later on tonight." NoteMe
    "I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
    "my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
    Have I helped you? Please Rate my posts.


  11. #11
    Admodistrator |2eM!x's Avatar
    Join Date
    Jan 2005
    Posts
    3,900

    Re: DLLs: What functions they have, which ones are called by what program

    Whatever .exe is running it, you can see its dll calls thru spy++ (or at least thats what i thought)

  12. #12
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: DLLs: What functions they have, which ones are called by what program

    Quote Originally Posted by SLH
    Thanks for thelink, i'll check it out asap.

    Is the VB code VB6 or .net? I don't have VB6 installed, so i wouldn't be able to compile it.
    If you have a working application that can do something like that, it'd be great!

    EDIT: I get the following error

    error C3501: there is no typelib registered for ProgID 'BackWeb.ClientExt.1'

    I cut & pasted that in. I don't need to copy the DLL to my application or anything do i?

    Also, what will this do, it seems i still need to know the function names/parameters to use the DLLs i import, unless i'm mistaken???

    EDIT2: Ah, didn't see that i need to look for a typelib key in the registary, they don't have any (tried a few DLLs), that means i'm stuck i guess??
    The code is VB6 but I have a compiled .ocx which when registered is scriptable from Windows Script Host. I've attached the ocx. If you do the following then the script should work too:
    1. Copy the .ocx file to the windows directory.
    2. Type the following into Start Menu -> Run
      Code:
      regsvr32 C:\winnt\typelib.ocx"
    3. Then run the VBScript and type the entire path of the DLL into the input box.
    4. It will create a directory called C:\documentation\ with a sub folder for each dll you type. This directory will contain a bunch of HTML files which pertain to each object in the DLL.

      If any of your DLL's have type libraries, this script will find them
    5. If you want to unregister the ocx after you are done you can type the following:
      Code:
      regsvr32 /u C:\winnt\typelib.ocx"
    Attached Files Attached Files
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  13. #13

    Thread Starter
    Not NoteMe SLH's Avatar
    Join Date
    Mar 2002
    Location
    192.168.0.1 Preferred Animal: Penguin Reason for errors: Line#38
    Posts
    3,051

    Re: DLLs: What functions they have, which ones are called by what program

    Quote Originally Posted by |2eM!x
    Whatever .exe is running it, you can see its dll calls thru spy++ (or at least thats what i thought)
    Perhaps that is the case, i have only every used it for intercepting messages.
    Unfortunatly i have MSVS 2005 Beta, which doesn't come with spy++
    Quotes:
    "I am getting better then you guys.." NoteMe, on his leet english skills.
    "And I am going to meat her again later on tonight." NoteMe
    "I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
    "my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
    Have I helped you? Please Rate my posts.


  14. #14

    Thread Starter
    Not NoteMe SLH's Avatar
    Join Date
    Mar 2002
    Location
    192.168.0.1 Preferred Animal: Penguin Reason for errors: Line#38
    Posts
    3,051

    Re: DLLs: What functions they have, which ones are called by what program

    Quote Originally Posted by visualAd
    The code is VB6 but I have a compiled .ocx which when registered is scriptable from Windows Script Host. I've attached the ocx. If you do the following then the script should work too:
    1. Copy the .ocx file to the windows directory.
    2. Type the following into Start Menu -> Run
      Code:
      regsvr32 C:\winnt\typelib.ocx"
    3. Then run the VBScript and type the entire path of the DLL into the input box.
    4. It will create a directory called C:\documentation\ with a sub folder for each dll you type. This directory will contain a bunch of HTML files which pertain to each object in the DLL.

      If any of your DLL's have type libraries, this script will find them
    5. If you want to unregister the ocx after you are done you can type the following:
      Code:
      regsvr32 /u C:\winnt\typelib.ocx"
    Excellent, cheers Adam. I'l give it a go.
    Quotes:
    "I am getting better then you guys.." NoteMe, on his leet english skills.
    "And I am going to meat her again later on tonight." NoteMe
    "I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
    "my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
    Have I helped you? Please Rate my posts.


  15. #15

    Thread Starter
    Not NoteMe SLH's Avatar
    Join Date
    Mar 2002
    Location
    192.168.0.1 Preferred Animal: Penguin Reason for errors: Line#38
    Posts
    3,051

    Re: DLLs: What functions they have, which ones are called by what program

    It says activeX can not create the object. Does that mean the ocx wasn't registered correctly? because i put it in c:\windows\ and did the regsvr32 command (it said it registered the ocx successfully).

    I also tried running the script from the windows directory.
    Quotes:
    "I am getting better then you guys.." NoteMe, on his leet english skills.
    "And I am going to meat her again later on tonight." NoteMe
    "I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
    "my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
    Have I helped you? Please Rate my posts.


  16. #16

    Thread Starter
    Not NoteMe SLH's Avatar
    Join Date
    Mar 2002
    Location
    192.168.0.1 Preferred Animal: Penguin Reason for errors: Line#38
    Posts
    3,051

    Re: DLLs: What functions they have, which ones are called by what program

    Under VisualAD's instruction i used MS Access' object editor to view the DLLs TypeLibs. Unfortunatly none of the DLLs had anything usefull in them, but at least now i know.
    Quotes:
    "I am getting better then you guys.." NoteMe, on his leet english skills.
    "And I am going to meat her again later on tonight." NoteMe
    "I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
    "my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
    Have I helped you? Please Rate my posts.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width