PInvoke.net

Duncan (and a few other MS bloggers) have mentioned the new PInvoke.net site that surfaced recently. This looks to be promising and I, like everyone else, look forward to seeing how the development community contributes to this.

If you're wondering how to obtain a list of the operations of an unmanaged dynamic linked library, you can use the DUMPBIN Visual C++ command line tool that comes packaged with Visual Studio. Below is a quick example of how DUMPBIN provides you with a list of the different methods that exist in cards.dll, which is the native card library used by all of the card games in Windows.

C:\WINDOWS\system32>dumpbin -exports cards.dll
Microsoft (R) COFF/PE Dumper Version 7.10.3077
Copyright (C) Microsoft Corporation. All rights reserved.

Dump of file cards.dll

File Type: DLL

  Section contains the following exports for CARDS.dll

    00000000 characteristics
3B7D782E time date stamp Fri Aug 17 13:01:50 2001
0.00 version
1 ordinal base
6 number of functions
6 number of names

    ordinal hint RVA name

          1 0 000013E0 WEP
2 1 0000118A cdtAnimate
3 2 00001813 cdtDraw
4 3 000014F3 cdtDrawExt
5 4 000013E6 cdtInit
6 5 0000138B cdtTerm