Discussion:
[ctypes-users] How to list functions in a Windows DLL
ST Tsao
2003-07-19 18:29:21 UTC
Permalink
I was having problem importing CryptAcquireContextA, so I need to know what functions are actually in crypto32.dll.

I was looking for this information and I finally found it on the web. I am sure many of you know it already, but I though I'd share it with everyone anyway:

http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/Q135/3/38.asp&NoWebContent=1
Microsoft Knowledge Base Article - 135338
HOWTO: View Exported Functions in a DLL

The short answer is to use

LINK /DUMP /EXPORTS XXXX.DLL or
DUMPBIN -EXPORTS XXX.DLL.

Which are part of Microsoft Visual C++.

BTW, turns out that CryptAcquireContextA is in advapi32.dll.

ST



Need a new email address that people can remember
Check out the new EudoraMail at
http://www.eudoramail.com
Jimmy Retzlaff
2003-07-19 19:47:19 UTC
Permalink
Post by ST Tsao
I was having problem importing CryptAcquireContextA, so I need to know
what
Post by ST Tsao
functions are actually in crypto32.dll.
...
Post by ST Tsao
The short answer is to use
LINK /DUMP /EXPORTS XXXX.DLL or
DUMPBIN -EXPORTS XXX.DLL.
Which are part of Microsoft Visual C++.
...

You can also try http://www.dependencywalker.com/ if you want a GUI
approach. Older versions of Dependency Walker have shipped with various
MS development tools for years.

Jimmy
Chris Liechti
2003-07-19 20:12:30 UTC
Permalink
Post by Jimmy Retzlaff
You can also try http://www.dependencywalker.com/ if you want a GUI
approach. Older versions of Dependency Walker have shipped with various
MS development tools for years.
it's also shipped with standard Win XP. you have to install the windows
support tools that are on the CD (choose full install)

chris
Paul Moore
2003-07-20 11:03:03 UTC
Permalink
Post by Jimmy Retzlaff
Post by ST Tsao
I was having problem importing CryptAcquireContextA, so I need to
know what functions are actually in crypto32.dll.
...
Post by ST Tsao
The short answer is to use
LINK /DUMP /EXPORTS XXXX.DLL or
DUMPBIN -EXPORTS XXX.DLL.
Which are part of Microsoft Visual C++.
...
You can also try http://www.dependencywalker.com/ if you want a GUI
approach. Older versions of Dependency Walker have shipped with
various MS development tools for years.
If you're using mingw32, the equivalent is

objdump -p XXX.dll

which gives a whole load of informtion, including the exported
symbols. One day, I'll write some Python wrappers to pick out the bits
I want for particular cases...

Paul.
--
This signature intentionally left blank
Thomas Heller
2003-07-21 15:03:18 UTC
Permalink
Post by Paul Moore
Post by Jimmy Retzlaff
Post by ST Tsao
I was having problem importing CryptAcquireContextA, so I need to
know what functions are actually in crypto32.dll.
...
Post by ST Tsao
The short answer is to use
LINK /DUMP /EXPORTS XXXX.DLL or
DUMPBIN -EXPORTS XXX.DLL.
Which are part of Microsoft Visual C++.
...
You can also try http://www.dependencywalker.com/ if you want a GUI
approach. Older versions of Dependency Walker have shipped with
various MS development tools for years.
If you're using mingw32, the equivalent is
objdump -p XXX.dll
which gives a whole load of informtion, including the exported
symbols. One day, I'll write some Python wrappers to pick out the bits
I want for particular cases...
I still have some code lying around which parses the PE format (PE =
portable executable, the format of win32 dlls and exe files).
That should give a start to find the exported symbols. If anyone wants
it, I can post it.

Thomas
Jim Vickroy
2004-02-19 15:41:31 UTC
Permalink
Hello,

The following error:

servicemanager.startup_error: PrepareToHostMultiple failed!
processor-monitor -install
is entered for one of 2 binaries built using ctypes-0.6.1.win32-py2.2.exe.

The other binary installs and runs satisfactorily.

The problematic binary (processor-monitor) can be installed and run from its python source file.

I'm using Python 2.3.3 and win32all build 163.

Here is the relevant portion of the setup script:

setup(
name = name,
version = this_version,
description = 'copies SAO data to a relational store',
service = ['data-processor', 'processor-monitor'],
console = ['installation-tester.py'],
windows = [],
data_files = [datastores, ] #> documentation]
)

Any suggestions would be appreciated.

Thanks.
Thomas Heller
2004-02-19 17:05:29 UTC
Permalink
Post by Jim Vickroy
Hello,
servicemanager.startup_error: PrepareToHostMultiple failed!
processor-monitor -install
is entered for one of 2 binaries built using ctypes-0.6.1.win32-py2.2.exe.
Doesn't really seem to be a ctypes question ;-).

Anyway, do you try to host multiple services in a single exe-file
(python module)? According to a comment in boot_service.py, this has
not yet been tested. Mark Hammond wrote the code in question.

Currently I'm not able to say more - is the above error message the only
thing you get?

Thomas

Loading...