Hvis du vil have noget "helt præcist", så ber' du om noget meget omfattende!
For at kunne bruge Vorbis.dll, så skal du kende funktionaliteten som den tilbyder. Jeg ved ikke meget om DLL'er, men den slags er vist ikke så let at komme til - Med vis-funktionen i den fantastiske Norton Commander-klon Servant Salamander (
www.altap.cz) har jeg fået nedenstående liste hvor det bl.a. fremgår at der er 34 funktioner i tingesten. Hvilke parametre de kaldes med, kan jeg ikke se.
Når du er kommet så langt, så bør du lave en interface-unit som dit program kan kalde. Her skal du være opmærksom på om der er nogle "sjove" brug af hukommelsen (her streames der sikkert) - og på hvilken måde parametrene overføres:
register Left-to-right Routine Yes
pascal Left-to-right Routine No
cdecl Right-to-left Caller No
stdcall Right-to-left Routine No
safecall Right-to-left Routine No
Endelig skal du vel registrere at du også bruger DLL-en så den ikke slettes hvis du afinstallerer MediaPlayer.
------------------------- Servant salamander rules -------------------------
File type: WINDOWS EXECUTABLE
File Header:
Machine: 0x014C (Intel x86)
Number of Sections: 4
Time Date Stamp: 0x3CA8DC2D (01-04-2002 23:16:13)
Pointer to Symbol Table: 0x00000000
Number of Symbols: 0
Size of Optional Header: 0x00E0 (224)
Characteristics: 0x210E
File is executable.
Line numbers stripped from file.
Local symbols stripped from file.
32 bit word machine.
File is a DLL.
Optional Header:
Magic: 0x010B
Linker Version: 7.00
Size of Code: 0x00017000 (94208)
Size of Initialized Data: 0x00005000 (20480)
Size of Uninitialized Data: 0x00000000 (0)
Adress of Entry Point: 0x00001106
Base of Code: 0x00001000
Base of Data: 0x00018000
Image Base: 0x10000000
Section Align: 0x00001000
File Align: 0x00001000
Operating System Version: 4.00
Image Version: 0.00
Subsystem Version: 4.00
Size of Image: 0x0001D000 (118784)
Size of Headers: 0x00001000 (4096)
Checksum: 0x00000000
Subsystem: 0x0003 (Windows character subsytem)
DLL Characteristics: 0x0000
Size of Stack Reserve: 0x00100000 (1048576)
Size of Stack Commit: 0x00001000 (4096)
Size of Heap Reserve: 0x00100000 (1048576)
Size of Heap Commit: 0x00001000 (4096)
Loader Flags: 0x00000000
Number of Rva and Sizes: 16
Data Directory:
Export directory: VA: 0x00018620 Size: 0x00000430 (1072)
Import directory: VA: 0x00018338 Size: 0x00000050 (80)
Resource directory: VA: 0 Size: 0
Exception directory: VA: 0 Size: 0
Security directory: VA: 0 Size: 0
Base relocation table: VA: 0x0001C000 Size: 0x000007FC (2044)
Debug directory: VA: 0 Size: 0
Architecture-specific data: VA: 0 Size: 0
RVA of global pointer: VA: 0 Size: 0
Thread local storage directory: VA: 0 Size: 0
Load configuration directory: VA: 0 Size: 0
Bound import directory: VA: 0 Size: 0
Import address table: VA: 0x00018000 Size: 0x00000098 (152)
Delay load import descriptors: VA: 0 Size: 0
COM run-time descriptor: VA: 0 Size: 0
(unknown directory entry): VA: 0 Size: 0
Export Table:
Name: vorbis.dll
Time Date Stamp: 0x3CA8DC14 (01-04-2002 23:15:48)
Version: 0.00
Ordinal Base: 1
Number of Functions: 34
Number of Names: 34
Ordinal Entry Point Name
1 0x00019134 _floor_P
2 0x00019148 _mapping_P
3 0x0001913C _residue_P
4 0x00019130 _time_P
5 0x00009E70 _vi_psy_copy
6 0x00009040 residue_free_info
7 0x00017BB0 vorbis_analysis
8 0x00015230 vorbis_analysis_blockout
9 0x00015070 vorbis_analysis_buffer
10 0x0000FB30 vorbis_analysis_headerout
11 0x00015E60 vorbis_analysis_init
12 0x00015540 vorbis_analysis_wrote
13 0x00016560 vorbis_bitrate_addblock
14 0x000164B0 vorbis_bitrate_flushpacket
15 0x000159B0 vorbis_block_clear
16 0x00015A10 vorbis_block_init
17 0x0000F0B0 vorbis_comment_add
18 0x0000FA70 vorbis_comment_add_tag
19 0x0000EFE0 vorbis_comment_clear
20 0x0000F150 vorbis_comment_init
21 0x0000F9A0 vorbis_comment_query
22 0x0000F8F0 vorbis_comment_query_count
23 0x0000FD90 vorbis_commentheader_out
24 0x00015690 vorbis_dsp_clear
25 0x0000EFC0 vorbis_info_blocksize
26 0x0000F760 vorbis_info_clear
27 0x0000EF90 vorbis_info_init
28 0x00001490 vorbis_packet_blocksize
29 0x00001510 vorbis_synthesis
30 0x00014B60 vorbis_synthesis_blockin
31 0x000101A0 vorbis_synthesis_headerin
32 0x00015E30 vorbis_synthesis_init
33 0x00014B00 vorbis_synthesis_pcmout
34 0x00014AD0 vorbis_synthesis_read
Import Table:
ogg.dll
Import Adress Table: 0x00018064
Import Name Table: 0x000183EC
Time Date Stamp: 0x00000000
Index of first forwarder reference: 0x00000000
0x000184E2 31 oggpack_bits
0x000184CE 39 oggpack_readinit
0x000184BE 34 oggpack_look
0x000184B0 28 oggpack_adv
0x000184A0 37 oggpack_read
0x00018490 38 oggpack_read1
0x0001847C 43 oggpack_writeinit
0x00018466 42 oggpack_writeclear
0x00018450 33 oggpack_get_buffer
0x00018440 41 oggpack_write
0x00018430 40 oggpack_reset
0x00018420 32 oggpack_bytes
MSVCR70.dll
Import Adress Table: 0x00018008
Import Name Table: 0x00018390
Time Date Stamp: 0x00000000
Index of first forwarder reference: 0x00000000
0x00018602 65 _CIpow
0x00018532 744 memmove
0x000185C4 245 _except_handler3
0x000185BA 443 _onexit
0x000185AC 110 __dllonexit
0x0001859C 190 _adjust_fdiv
0x00018590 322 _initterm
0x0001857C 730 ldexp
0x00018572 804 toupper
0x0001856A 756 qsort
0x000184FA 770 sprintf
0x00018504 748 perror
0x0001850E 679 fopen
0x00018516 680 fprintf
0x00018520 668 fclose
0x0001852A 326 _iob
0x0001860C 55 _CIacos
0x0001853C 686 free
0x00018544 656 calloc
0x0001854E 737 malloc
0x00018558 759 realloc
0x00018562 677 floor
KERNEL32.dll
Import Adress Table: 0x00018000
Import Name Table: 0x00018388
Time Date Stamp: 0x00000000
Index of first forwarder reference: 0x00000000
0x000185D8 128 DisableThreadLibraryCalls
Section Table:
Section Header #1
Name: .text
Virtual Size: 0x00016D74 (93556)
Virtual Address: 0x00001000
Size of Raw Data: 0x00017000 (94208)
File Pointer to Raw Data: 0x00001000
File Pointer to Relocation Table: 0x00000000
File Pointer to Line Numbers: 0x00000000
Number of Relocations: 0
Number of Line Numbers: 0
Characteristics: 0x60000020
Section contains code.
Section is executable.
Section is readable.
Section Header #2
Name: .rdata
Virtual Size: 0x00000A50 (2640)
Virtual Address: 0x00018000
Size of Raw Data: 0x00001000 (4096)
File Pointer to Raw Data: 0x00018000
File Pointer to Relocation Table: 0x00000000
File Pointer to Line Numbers: 0x00000000
Number of Relocations: 0
Number of Line Numbers: 0
Characteristics: 0x40000040
Section contains initialized data.
Section is readable.
Section Header #3
Name: .data
Virtual Size: 0x0000296C (10604)
Virtual Address: 0x00019000
Size of Raw Data: 0x00003000 (12288)
File Pointer to Raw Data: 0x00019000
File Pointer to Relocation Table: 0x00000000
File Pointer to Line Numbers: 0x00000000
Number of Relocations: 0
Number of Line Numbers: 0
Characteristics: 0xC0000040
Section contains initialized data.
Section is readable.
Section is writeable.
Section Header #4
Name: .reloc
Virtual Size: 0x0000084E (2126)
Virtual Address: 0x0001C000
Size of Raw Data: 0x00001000 (4096)
File Pointer to Raw Data: 0x0001C000
File Pointer to Relocation Table: 0x00000000
File Pointer to Line Numbers: 0x00000000
Number of Relocations: 0
Number of Line Numbers: 0
Characteristics: 0x42000040
Section contains initialized data.
Section can be discarded.
Section is readable.
------------------------------- Listing ends -------------------------------
Derefter er det bare at bruge DLL'en ;-)