Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 553021
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T11:33:41+00:00 2026-05-13T11:33:41+00:00

Does this code shows the methods from a dll? from ctypes import * x

  • 0

Does this code shows the methods from a dll?

from ctypes import *
x = cdll.LoadLibrary("olari.dll")
dir(x)

if not, how can we see the .dll methods in python?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T11:33:41+00:00Added an answer on May 13, 2026 at 11:33 am

    No, it doesn’t. But It can cache when you call, and will show in dir after that.

    You could take a look this SO Thread, even in Win32, seems like need to parse PE Header. I think python need to do similar way.

    UPDATE:

    I found pefile read/write module written in python, there you can find exported entries.

    for entry in pe.DIRECTORY_ENTRY_IMPORT:
      print entry.dll
      for imp in entry.imports:
        print '\t', hex(imp.address), imp.name
    Output
    comdlg32.dll
            0x10012A0L PageSetupDlgW
            0x10012A4L FindTextW
            0x10012A8L PrintDlgExW
    [snip]
    SHELL32.dll
            0x1001154L DragFinish
            0x1001158L DragQueryFileW
    

    imp.name will be the one you are looking for. You could use that name in ctypes like

    >>> ctypes.windll.comdlg32.PageSetupDlgW
    <_FuncPtr object at 0x00A97210>
    >>> ctypes.windll.comdlg32.FindTextW
    <_FuncPtr object at 0x00A97288>
    ...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can anybody see what is wrong with this code. it does not show up
For some reason, this code does not actually draw my bitmap file... or show
I have this email sending code that does not show a chooser (good). How
I have Created a DLL from ClassLibrary Project with 3 methods but it shows
Does this code always evaluate to false? Both variables are two's complement signed ints.
Does this code cause a memory leak: int main(){ int * a = new
Does this code work across all standard compliant C++ compilers (it works with g++)?
How does this code work to Find the next highest power of 2 for
Why does this code throw an Invalid Operation Exception? private SqlCommand cmd; // initialized
Why does this code int (*g)(int); int (*h)(char); h = g; In C, give

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.