Results 1 to 11 of 11

Thread: dllImport... how do you figure out the function names

  1. #1

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428

    dllImport... how do you figure out the function names

    I wanna use a c++ dll with dllImport and I dont really know what functions there are in the dll

    Is there a tool that would let me to list the function names in a dll?
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    I don't think so. You'd need the documentation for that DLL. Now, if it were a .NET DLL, you could use System.Reflection.

  3. #3

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    tricky bastards! so there is no way to get a list of the functions? this is indeed very suspicous. are they afraid of intellectual theft?
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  4. #4
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    You can get the method names using the dependency walker, but you can't get the params.
    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  5. #5
    Frenzied Member Mike Hildner's Avatar
    Join Date
    Jul 2002
    Location
    Des Moines, NM
    Posts
    1,690
    You can also use the dumpbin utility shipped with VS.

  6. #6

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    Originally posted by Mike Hildner
    You can also use the dumpbin utility shipped with VS.
    hmm what's dumpbin? I dont think I have it installed. is it under the c++ tools?


    uuh there should be a possible way to brute force it for paramters too ha?
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  7. #7
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    Originally posted by MrPolite
    uuh there should be a possible way to brute force it for paramters too ha?
    Nope. The format was designed with that in mind. Its not possible.
    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  8. #8
    Frenzied Member Mike Hildner's Avatar
    Join Date
    Jul 2002
    Location
    Des Moines, NM
    Posts
    1,690
    My installation has dumpbin.exe in C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin. I have VS Enterprise Architect and have installed VC++, not really sure if it's part of that install or what. When I goto Start\All Programs\Microsoft VS 2003 .NET\Visual Studio .NET Tools\VS Command Prompt, that folder is in the %PATH%, so you can navigate to ...\System32 or whatever and run it.

  9. #9
    Frenzied Member Mike Hildner's Avatar
    Join Date
    Jul 2002
    Location
    Des Moines, NM
    Posts
    1,690
    FWIW, I was googling to see if it's possible to figure out the arguments to a dll. Apparently, for "native" windows dlls, what gets encoded is the number of bytes for the arguments, but you can't tell what type of arg is expected. One post suggested "The way to go
    here is to disassemble the dll and check what the function actually is
    doing."

    Best of luck,
    Mike

  10. #10

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    hmm interesting. thank you
    reverse engineering is always cool (ofcourse I dont have the knowledge for it haha)
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  11. #11
    Frenzied Member Mike Hildner's Avatar
    Join Date
    Jul 2002
    Location
    Des Moines, NM
    Posts
    1,690
    I do not mean to advocate dissasembling anyone's compiled code. That's usually illegal. Not that you'd get caught .

    But if you can't get the API docs, why bother with messing around with a propriatry API? Sometimes you can't help it, but there's usually alternatives

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