Programación General > Visual C++
C++ Con Dll De Fortran
LauraDiaz:
hola,
a ver te pego el resultado del dumpbin que me has comentado:
--- Código: Text --- Microsoft (R) COFF Binary File Dumper Version 6.00.8168Copyright (C) Microsoft Corp 1992-1998. All rights reserved. Dump of file tuwhbv.lib File Type: LIBRARY Archive member name at 8: / 474ABFC0 time/date Mon Nov 26 13:44:48 2007 uid gid 0 mode 78 sizecorrect header end 5 public symbols 17A __IMPORT_DESCRIPTOR_tuwhbv 482 __NULL_IMPORT_DESCRIPTOR 5B8 tuwhbv_NULL_THUNK_DATA 70A __imp_tuwhbv 70A tuwhbv Archive member name at BC: / 474ABFC0 time/date Mon Nov 26 13:44:48 2007 uid gid 0 mode 82 sizecorrect header end 4 offsets 1 17A 2 482 3 5B8 4 70A 5 public symbols 1 __IMPORT_DESCRIPTOR_tuwhbv 2 __NULL_IMPORT_DESCRIPTOR 4 __imp_tuwhbv 4 tuwhbv 3 tuwhbv_NULL_THUNK_DATA Archive member name at 17A: tuwhbv.dll/ 474ABFC0 time/date Mon Nov 26 13:44:48 2007 uid gid 0 mode 2CB sizecorrect header end FILE HEADER VALUES 14C machine (i386) 3 number of sections 474ABFC0 time date stamp Mon Nov 26 13:44:48 2007 1EB file pointer to symbol table 8 number of symbols E0 size of optional header 100 characteristics 32 bit word machine OPTIONAL HEADER VALUES 10B magic # 6.00 linker version 0 size of code 0 size of initialized data 0 size of uninitialized data 0 RVA of entry point 0 base of code 0 base of data 0 image base 1000 section alignment 200 file alignment 4.00 operating system version 0.00 image version 0.00 subsystem version 0 Win32 version 0 size of image 0 size of headers 0 checksum 3 subsystem (Windows CUI) 0 DLL characteristics 100000 size of stack reserve 1000 size of stack commit 100000 size of heap reserve 1000 size of heap commit 0 loader flags 10 number of directories 0 [ 0] RVA [size] of Export Directory 0 [ 0] RVA [size] of Import Directory 0 [ 0] RVA [size] of Resource Directory 0 [ 0] RVA [size] of Exception Directory 0 [ 0] RVA [size] of Certificates Directory 0 [ 0] RVA [size] of Base Relocation Directory 0 [ 0] RVA [size] of Debug Directory 0 [ 0] RVA [size] of Architecture Directory 0 [ 0] RVA [size] of Special Directory 0 [ 0] RVA [size] of Thread Storage Directory 0 [ 0] RVA [size] of Load Configuration Directory 0 [ 0] RVA [size] of Bound Import Directory 0 [ 0] RVA [size] of Import Address Table Directory 0 [ 0] RVA [size] of Delay Import Directory 0 [ 0] RVA [size] of Reserved Directory 0 [ 0] RVA [size] of Reserved Directory SECTION HEADER #1.debug$S name 0 physical address 0 virtual address 41 size of raw data 16C file pointer to raw data 0 file pointer to relocation table 0 file pointer to line numbers 0 number of relocations 0 number of line numbers42100040 flags Initialized Data Discardable 1 byte align Read Only RAW DATA #1 00000000: 02 00 00 00 11 00 09 00 00 00 00 00 0A 74 75 77 .............tuw 00000010: 68 62 76 2E 64 6C 6C 28 00 13 10 07 00 00 00 03 hbv.dll(........ 00000020: 00 00 00 00 00 00 00 06 00 00 00 FF 20 12 4D 69 ...........ÿ .Mi 00000030: 63 72 6F 73 6F 66 74 20 28 52 29 20 4C 49 4E 4B crosoft (R) LINK 00000040: 00 . SECTION HEADER #2.idata$2 name 0 physical address 0 virtual address 14 size of raw data 1AD file pointer to raw data 1C1 file pointer to relocation table 0 file pointer to line numbers 3 number of relocations 0 number of line numbersC0300040 flags Initialized Data 4 byte align Read Write RAW DATA #2 00000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00000010: 00 00 00 00 .... RELOCATIONS #2 Symbol Symbol Offset Type Applied To Index Name -------- ---------------- ----------------- -------- ------ 0000000C DIR32NB 00000000 3 .idata$6 00000000 DIR32NB 00000000 4 .idata$4 00000010 DIR32NB 00000000 5 .idata$5 SECTION HEADER #3.idata$6 name 0 physical address 0 virtual address C size of raw data 1DF file pointer to raw data 1C1 file pointer to relocation table 0 file pointer to line numbers 0 number of relocations 0 number of line numbersC0200040 flags Initialized Data 2 byte align Read Write RAW DATA #3 00000000: 74 75 77 68 62 76 2E 64 6C 6C 00 00 tuwhbv.dll.. COFF SYMBOL TABLE000 000420FF ABS notype Static | @comp.id001 00000000 SECT2 notype External | __IMPORT_DESCRIPTOR_tuwhbv002 C0000040 SECT2 notype Section | .idata$2003 00000000 SECT3 notype Static | .idata$6004 C0000040 UNDEF notype Section | .idata$4005 C0000040 UNDEF notype Section | .idata$5006 00000000 UNDEF notype External | __NULL_IMPORT_DESCRIPTOR007 00000000 UNDEF notype External | tuwhbv_NULL_THUNK_DATA String Table Size = 0x50 bytes Archive member name at 482: tuwhbv.dll/ 474ABFC0 time/date Mon Nov 26 13:44:48 2007 uid gid 0 mode FA sizecorrect header end FILE HEADER VALUES 14C machine (i386) 2 number of sections 474ABFC0 time date stamp Mon Nov 26 13:44:48 2007 B9 file pointer to symbol table 2 number of symbols 0 size of optional header 100 characteristics 32 bit word machine SECTION HEADER #1.debug$S name 0 physical address 0 virtual address 41 size of raw data 64 file pointer to raw data 0 file pointer to relocation table 0 file pointer to line numbers 0 number of relocations 0 number of line numbers42100040 flags Initialized Data Discardable 1 byte align Read Only RAW DATA #1 00000000: 02 00 00 00 11 00 09 00 00 00 00 00 0A 74 75 77 .............tuw 00000010: 68 62 76 2E 64 6C 6C 28 00 13 10 07 00 00 00 03 hbv.dll(........ 00000020: 00 00 00 00 00 00 00 06 00 00 00 FF 20 12 4D 69 ...........ÿ .Mi 00000030: 63 72 6F 73 6F 66 74 20 28 52 29 20 4C 49 4E 4B crosoft (R) LINK 00000040: 00 . SECTION HEADER #2.idata$3 name 0 physical address 0 virtual address 14 size of raw data A5 file pointer to raw data 0 file pointer to relocation table 0 file pointer to line numbers 0 number of relocations 0 number of line numbersC0300040 flags Initialized Data 4 byte align Read Write RAW DATA #2 00000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00000010: 00 00 00 00 .... COFF SYMBOL TABLE000 000420FF ABS notype Static | @comp.id001 00000000 SECT2 notype External | __NULL_IMPORT_DESCRIPTOR String Table Size = 0x1D bytes Archive member name at 5B8: tuwhbv.dll/ 474ABFC0 time/date Mon Nov 26 13:44:48 2007 uid gid 0 mode 115 sizecorrect header end FILE HEADER VALUES 14C machine (i386) 3 number of sections 474ABFC0 time date stamp Mon Nov 26 13:44:48 2007 D5 file pointer to symbol table 2 number of symbols 0 size of optional header 100 characteristics 32 bit word machine SECTION HEADER #1.debug$S name 0 physical address 0 virtual address 41 size of raw data 8C file pointer to raw data 0 file pointer to relocation table 0 file pointer to line numbers 0 number of relocations 0 number of line numbers42100040 flags Initialized Data Discardable 1 byte align Read Only RAW DATA #1 00000000: 02 00 00 00 11 00 09 00 00 00 00 00 0A 74 75 77 .............tuw 00000010: 68 62 76 2E 64 6C 6C 28 00 13 10 07 00 00 00 03 hbv.dll(........ 00000020: 00 00 00 00 00 00 00 06 00 00 00 FF 20 12 4D 69 ...........ÿ .Mi 00000030: 63 72 6F 73 6F 66 74 20 28 52 29 20 4C 49 4E 4B crosoft (R) LINK 00000040: 00 . SECTION HEADER #2.idata$5 name 0 physical address 0 virtual address 4 size of raw data CD file pointer to raw data 0 file pointer to relocation table 0 file pointer to line numbers 0 number of relocations 0 number of line numbersC0300040 flags Initialized Data 4 byte align Read Write RAW DATA #2 00000000: 00 00 00 00 .... SECTION HEADER #3.idata$4 name 0 physical address 0 virtual address 4 size of raw data D1 file pointer to raw data 0 file pointer to relocation table 0 file pointer to line numbers 0 number of relocations 0 number of line numbersC0300040 flags Initialized Data 4 byte align Read Write RAW DATA #3 00000000: 00 00 00 00 .... COFF SYMBOL TABLE000 000420FF ABS notype Static | @comp.id001 00000000 SECT2 notype External | tuwhbv_NULL_THUNK_DATA String Table Size = 0x1C bytes Archive member name at 70A: tuwhbv.dll/ 474ABFC0 time/date Mon Nov 26 13:44:48 2007 uid gid 0 mode 26 sizecorrect header end Version : 0 Machine : 14C (i386) TimeDateStamp: 474ABFC0 Mon Nov 26 13:44:48 2007 SizeOfData : 00000012 DLL name : tuwhbv.dll Symbol name : tuwhbv Type : code Name type : name Hint : 0 Name : tuwhbv Exports ordinal name tuwhbv Summary C3 .debug$S 14 .idata$2 14 .idata$3 4 .idata$4 4 .idata$5 C .idata$6
debería llamar a la función con otro nombre "decorado"? algo así como imp_tuwhbv??
gracias!
Laura.
Eternal Idol:
--- Cita de: "LauraDiaz" ---debería llamar a la función con otro nombre "decorado"? algo así como imp_tuwhbv??
--- Fin de la cita ---
Es probable, la manera normal es hacer esto:
--- Código: Text --- extern "C"{ [B]__declspec(dllimport)[/B] void tuwhbv(long,float&,float&,float&,float&,float&,float&,float&,float&,long,float&,float&,float&,float&);};[/quote] Pero en teoria no deberia funcionar por ser lo que busca:__imp[COLOR=red]__[/COLOR]tuwhbvy lo que hay en el lib:__imp[COLOR=red]_[/COLOR]tuwhbv Asi que tal vez una forma sea:extern "C"{ void _imp_tuwhbv(long,float&,float&,float&,float&,float&,float&,float&,float&,long,float&,float&,float&,float&); #define tuwhbv _imp_tuwhbv};
No se que convencion de llamada usa FORTRAN ... asi que puede fallar tranquilamente sino usa C. La persona encargada de esta DLL seguramente sabra mas al respecto, por cierto ese prototipo es vomitivo ...
LauraDiaz:
Pues al final ha funcionado, con la declaracion
extern "C"
{
void _imp_tuwhbv(long,float&,float&,float&,float&,float&,float&,float&,float&,long,float&,float&,float&,float&);
};
ha linkado bien y me ha generado la DLL. Ahora ya estoy en "otro nivel" :)
despues de general esta DLL y ejecutar el código desde java que llama indirectamente a l de fortran a traves de este método obtengo un "EXCEPTION_ACCESS_VIOLATION" que creo que debe ser algo con el paso de parametros y punteros con los que no trabajaba desde hace mucho tiempo.
bueno, pues muchas gracias por la ayuda!
Laura.
Eternal Idol:
--- Cita de: "LauraDiaz" --- Pues al final ha funcionado, con la declaracion
extern "C"
{
void _imp_tuwhbv(long,float&,float&,float&,float&,float&,float&,float&,float&,long,float&,float&,float&,float&);
};
ha linkado bien y me ha generado la DLL. Ahora ya estoy en "otro nivel" :)
despues de general esta DLL y ejecutar el código desde java que llama indirectamente a l de fortran a traves de este método obtengo un "EXCEPTION_ACCESS_VIOLATION" que creo que debe ser algo con el paso de parametros y punteros con los que no trabajaba desde hace mucho tiempo.
--- Fin de la cita ---
Si, me imagine que con eso la iba a resolver si o si pero como decis tenes una excepcion no controlada que tal vez este relacionada con lo que te decia antes: la convencion de llamada de fortran.
Tal vez un dumpbin /disasm de la DLL nos de una idea mas clara de que convencion de llamada usa.
LauraDiaz:
Haciendo lo que me dices del dumpbin /disasm tuwhbv.lib (la libreria de fortran) obtengo esto, te copio solo una parte del principio
--- Código: Text --- Microsoft (R) COFF Binary File Dumper Version 6.00.8168Copyright (C) Microsoft Corp 1992-1998. All rights reserved. Dump of file tuwhbv.dll File Type: DLL 10001000: 55 push ebp 10001001: 8B EC mov ebp,esp 10001003: 83 EC 14 sub esp,14h 10001006: 53 push ebx 10001007: 56 push esi 10001008: 57 push edi 10001009: 8B 05 B8 80 00 10 mov eax,dword ptr ds:[100080B8h] 1000100F: 8B 75 0C mov esi,dword ptr [ebp+0Ch] 10001012: 89 45 FC mov dword ptr [ebp-4],eax 10001015: BF 64 00 00 00 mov edi,64h 1000101A: BB 01 00 00 00 mov ebx,1 1000101F: 89 5D F8 mov dword ptr [ebp-8],ebx 10001022: 89 5D F4 mov dword ptr [ebp-0Ch],ebx 10001025: DB 45 F8 fild dword ptr [ebp-8] 10001028: 8D 45 F8 lea eax,[ebp-8] 1000102B: D8 0D 98 80 00 10 fmul dword ptr ds:[10008098h] 10001031: D8 35 C4 80 00 10 fdiv dword ptr ds:[100080C4h] 10001037: D9 5D F8 fstp dword ptr [ebp-8] 1000103A: DB 45 F4 fild dword ptr [ebp-0Ch] 1000103D: D8 25 98 80 00 10 fsub dword ptr ds:[10008098h] 10001043: D8 35 C4 80 00 10 fdiv dword ptr ds:[100080C4h] 10001049: D9 5D F4 fstp dword ptr [ebp-0Ch] 1000104C: 83 EC 04 sub esp,4 1000104F: DD C0 ffree st(0) 10001051: 50 push eax 10001052: 56 push esi 10001053: FF 75 08 push dword ptr [ebp+8] 10001056: E8 27 04 00 00 call 10001482 1000105B: D9 5D F0 fstp dword ptr [ebp-10h] 1000105E: 8D 45 F4 lea eax,[ebp-0Ch] 10001061: 50 push eax 10001062: 56 push esi 10001063: FF 75 08 push dword ptr [ebp+8] 10001066: E8 17 04 00 00 call 10001482 1000106B: 83 C4 04 add esp,4 1000106E: B8 00 00 00 00 mov eax,0 10001073: D8 6D F0 fsubr dword ptr [ebp-10h] 10001076: D8 0D C0 80 00 10 fmul dword ptr ds:[100080C0h] 1000107C: DD D1 fst st(1) 1000107E: D8 5D FC fcomp dword ptr [ebp-4] 10001081: DF E0 fnstsw ax 10001083: 80 E4 41 and ah,41h 10001086: 75 03 jne 1000108B 10001088: D9 55 FC fst dword ptr [ebp-4] 1000108B: 43 inc ebx 1000108C: 4F dec edi 1000108D: 85 FF test edi,edi 1000108F: 7F 8E jg 1000101F 10001091: 8B 4D 18 mov ecx,dword ptr [ebp+18h] 10001094: 8B 45 14 mov eax,dword ptr [ebp+14h] 10001097: 8B 55 10 mov edx,dword ptr [ebp+10h] 1000109A: 8B 5D 14 mov ebx,dword ptr [ebp+14h] 1000109D: D9 01 fld dword ptr [ecx] 1000109F: BF 01 00 00 00 mov edi,1 100010A4: D8 20 fsub dword ptr [eax] 100010A6: DD D9 fstp st(1) 100010A8: D9 02 fld dword ptr [edx] 100010AA: D8 23 fsub dword ptr [ebx] 100010AC: D8 F1 fdiv st,st(1) 100010AE: D8 0D C0 80 00 10 fmul dword ptr ds:[100080C0h] 100010B4: 66 D9 7D EC fnstcw word ptr [ebp-14h] 100010B8: 8B 45 EC mov eax,dword ptr [ebp-14h] 100010BB: 0D 00 0C 00 00 or eax,0C00h 100010C0: 66 89 45 EE mov word ptr [ebp-12h],ax 100010C4: 66 D9 6D EE fldcw word ptr [ebp-12h] 100010C8: DB 5D F0 fistp dword ptr [ebp-10h] 100010CB: 8B 45 F0 mov eax,dword ptr [ebp-10h] 100010CE: 85 C0 test eax,eax 100010D0: 66 D9 6D EC fldcw word ptr [ebp-14h] 100010D4: 7E 02 jle 100010D8 100010D6: 8B F8 mov edi,eax 100010D8: 83 FF 64 cmp edi,64h 100010DB: 7E 05 jle 100010E2 100010DD: BF 64 00 00 00 mov edi,64h 100010E2: 8D 55 F8 lea edx,[ebp-8] 100010E5: 89 7D F0 mov dword ptr [ebp-10h],edi 100010E8: DB 45 F0 fild dword ptr [ebp-10h] 100010EB: 89 7D F0 mov dword ptr [ebp-10h],edi 100010EE: 8D 7D F4 lea edi,[ebp-0Ch] 100010F1: D8 0D 98 80 00 10 fmul dword ptr ds:[10008098h] 100010F7: D8 35 C4 80 00 10 fdiv dword ptr ds:[100080C4h] 100010FD: D9 5D F8 fstp dword ptr [ebp-8] 10001100: DB 45 F0 fild dword ptr [ebp-10h] 10001103: D8 25 98 80 00 10 fsub dword ptr ds:[10008098h] 10001109: D8 35 C4 80 00 10 fdiv dword ptr ds:[100080C4h] 1000110F: D9 5D F4 fstp dword ptr [ebp-0Ch] 10001112: 83 EC 04 sub esp,4 10001115: DD C0 ffree st(0) 10001117: 52 push edx 10001118: 56 push esi 10001119: FF 75 08 push dword ptr [ebp+8] 1000111C: E8 61 03 00 00 call 10001482 10001121: D9 5D F8 fstp dword ptr [ebp-8] 10001124: 57 push edi 10001125: 56 push esi 10001126: FF 75 08 push dword ptr [ebp+8] 10001129: E8 54 03 00 00 call 10001482 1000112E: 83 C4 04 add esp,4 10001131: 8B 5D 1C mov ebx,dword ptr [ebp+1Ch] 10001134: D8 6D F8 fsubr dword ptr [ebp-8] 10001137: D8 0D C0 80 00 10 fmul dword ptr ds:[100080C0h] 1000113D: D8 6D FC fsubr dword ptr [ebp-4] 10001140: 5F pop edi 10001141: 5E pop esi 10001142: D9 1B fstp dword ptr [ebx] 10001144: 5B pop ebx 10001145: 8B E5 mov esp,ebp 10001147: 5D pop ebp 10001148: C2 18 00 ret 18h 1000114B: 55 push ebp 1000114C: 8B EC mov ebp,esp 1000114E: 83 EC 14 sub esp,14h 10001151: 53 push ebx 10001152: 56 push esi 10001153: 57 push edi 10001154: 8B 05 B8 80 00 10 mov eax,dword ptr ds:[100080B8h] 1000115A: 8B 75 0C mov esi,dword ptr [ebp+0Ch] 1000115D: 89 45 FC mov dword ptr [ebp-4],eax 10001160: BF 64 00 00 00 mov edi,64h 10001165: BB 01 00 00 00 mov ebx,1 1000116A: 89 5D F8 mov dword ptr [ebp-8],ebx 1000116D: 89 5D F4 mov dword ptr [ebp-0Ch],ebx 10001170: DB 45 F8 fild dword ptr [ebp-8] 10001173: 8D 45 F8 lea eax,[ebp-8] 10001176: D8 0D 98 80 00 10 fmul dword ptr ds:[10008098h] 1000117C: D8 35 C4 80 00 10 fdiv dword ptr ds:[100080C4h] 10001182: D9 5D F8 fstp dword ptr [ebp-8] 10001185: DB 45 F4 fild dword ptr [ebp-0Ch] 10001188: D8 25 98 80 00 10 fsub dword ptr ds:[10008098h] 1000118E: D8 35 C4 80 00 10 fdiv dword ptr ds:[100080C4h] 10001194: D9 5D F4 fstp dword ptr [ebp-0Ch] 10001197: 83 EC 04 sub esp,4 1000119A: DD C0 ffree st(0) 1000119C: 50 push eax 1000119D: 56 push esi 1000119E: FF 75 08 push dword ptr [ebp+8] 100011A1: E8 DC 02 00 00 call 10001482 100011A6: D9 5D F0 fstp dword ptr [ebp-10h] 100011A9: 8D 45 F4 lea eax,[ebp-0Ch] 100011AC: 50 push eax 100011AD: 56 push esi 100011AE: FF 75 08 push dword ptr [ebp+8] 100011B1: E8 CC 02 00 00 call 10001482 100011B6: 83 C4 04 add esp,4 100011B9: B8 00 00 00 00 mov eax,0 100011BE: D8 6D F0 fsubr dword ptr [ebp-10h] 100011C1: D8 0D C0 80 00 10 fmul dword ptr ds:[100080C0h] 100011C7: DD D1 fst st(1) 100011C9: D8 5D FC fcomp dword ptr [ebp-4] 100011CC: DF E0 fnstsw ax 100011CE: 80 E4 41 and ah,41h 100011D1: 75 03 jne 100011D6 100011D3: D9 55 FC fst dword ptr [ebp-4] 100011D6: 43 inc ebx 100011D7: 4F dec edi 100011D8: 85 FF test edi,edi 100011DA: 7F 8E jg 1000116A 100011DC: 8B 4D 18 mov ecx,dword ptr [ebp+18h] 100011DF: 8B 45 14 mov eax,dword ptr [ebp+14h] 100011E2: 8B 55 10 mov edx,dword ptr [ebp+10h] 100011E5: 8B 5D 14 mov ebx,dword ptr [ebp+14h] 100011E8: D9 01 fld dword ptr [ecx] 100011EA: BF 01 00 00 00 mov edi,1 100011EF: D8 20 fsub dword ptr [eax] 100011F1: DD D9 fstp st(1) 100011F3: D9 02 fld dword ptr [edx] 100011F5: D8 23 fsub dword ptr [ebx] 100011F7: D8 F1 fdiv st,st(1) 100011F9: D8 0D C0 80 00 10 fmul dword ptr ds:[100080C0h] 100011FF: 66 D9 7D F0 fnstcw word ptr [ebp-10h] 10001203: 8B 45 F0 mov eax,dword ptr [ebp-10h] 10001206: 0D 00 0C 00 00 or eax,0C00h 1000120B: 66 89 45 F2 mov word ptr [ebp-0Eh],ax 1000120F: 66 D9 6D F2 fldcw word ptr [ebp-0Eh] 10001213: DB 5D FC fistp dword ptr [ebp-4] 10001216: 8B 45 FC mov eax,dword ptr [ebp-4] 10001219: 85 C0 test eax,eax 1000121B: 66 D9 6D F0 fldcw word ptr [ebp-10h] 1000121F: 7E 02 jle 10001223 10001221: 8B F8 mov edi,eax 10001223: 83 FF 64 cmp edi,64h 10001226: 7E 05 jle 1000122D 10001228: BF 64 00 00 00 mov edi,64h 1000122D: 8D 55 F8 lea edx,[ebp-8] 10001230: 89 7D FC mov dword ptr [ebp-4],edi 10001233: DB 45 FC fild dword ptr [ebp-4] 10001236: 89 7D FC mov dword ptr [ebp-4],edi 10001239: 8D 7D F4 lea edi,[ebp-0Ch] 1000123C: D8 0D 98 80 00 10 fmul dword ptr ds:[10008098h] 10001242: D8 35 C4 80 00 10 fdiv dword ptr ds:[100080C4h] 10001248: D9 5D F8 fstp dword ptr [ebp-8] 1000124B: DB 45 FC fild dword ptr [ebp-4] 1000124E: D8 25 98 80 00 10 fsub dword ptr ds:[10008098h] 10001254: D8 35 C4 80 00 10 fdiv dword ptr ds:[100080C4h] 1000125A: D9 5D F4 fstp dword ptr [ebp-0Ch] 1000125D: 83 EC 04 sub esp,4 10001260: DD C0 ffree st(0) 10001262: 52 push edx 10001263: 56 push esi 10001264: FF 75 08 push dword ptr [ebp+8] 10001267: E8 16 02 00 00 call 10001482 1000126C: DD C0 ffree st(0) 1000126E: D9 F7 fincstp 10001270: 57 push edi 10001271: 56 push esi 10001272: FF 75 08 push dword ptr [ebp+8] 10001275: E8 08 02 00 00 call 10001482 1000127A: DD C0 ffree st(0) 1000127C: D9 F7 fincstp 1000127E: 83 C4 04 add esp,4 10001281: 8B 5D 1C mov ebx,dword ptr [ebp+1Ch] 10001284: 8B 7D F8 mov edi,dword ptr [ebp-8] 10001287: 89 3B mov dword ptr [ebx],edi 10001289: 5F pop edi 1000128A: 5E pop esi 1000128B: 5B pop ebx 1000128C: 8B E5 mov esp,ebp 1000128E: 5D pop ebp 1000128F: C2 18 00 ret 18h 10001292: 55 push ebp 10001293: 8B EC mov ebp,esp 10001295: 83 EC 0C sub esp,0Ch 10001298: 53 push ebx 10001299: 56 push esi 1000129A: 57 push edi 1000129B: 8B 7D 10 mov edi,dword ptr [ebp+10h] 1000129E: 8B 05 B8 80 00 10 mov eax,dword ptr ds:[100080B8h] 100012A4: BB E8 03 00 00 mov ebx,3E8h 100012A9: 89 07 mov dword ptr [edi],eax 100012AB: BE 01 00 00 00 mov esi,1 100012B0: 89 75 FC mov dword ptr [ebp-4],esi 100012B3: 89 75 F8 mov dword ptr [ebp-8],esi 100012B6: DB 45 FC fild dword ptr [ebp-4] 100012B9: 8D 45 FC lea eax,[ebp-4] 100012BC: D8 0D 98 80 00 10 fmul dword ptr ds:[10008098h] 100012C2: D8 35 BC 80 00 10 fdiv dword ptr ds:[100080BCh] 100012C8: D9 5D FC fstp dword ptr [ebp-4] 100012CB: DB 45 F8 fild dword ptr [ebp-8] 100012CE: D8 25 98 80 00 10 fsub dword ptr ds:[10008098h] 100012D4: D8 35 BC 80 00 10 fdiv dword ptr ds:[100080BCh] 100012DA: D9 5D F8 fstp dword ptr [ebp-8] 100012DD: 83 EC 04 sub esp,4 100012E0: DD C0 ffree st(0) 100012E2: 50 push eax 100012E3: FF 75 0C push dword ptr [ebp+0Ch] 100012E6: FF 75 08 push dword ptr [ebp+8] 100012E9: E8 94 01 00 00 call 10001482 100012EE: D9 5D F4 fstp dword ptr [ebp-0Ch] 100012F1: 8D 45 F8 lea eax,[ebp-8] 100012F4: 50 push eax 100012F5: FF 75 0C push dword ptr [ebp+0Ch] 100012F8: FF 75 08 push dword ptr [ebp+8] 100012FB: E8 82 01 00 00 call 10001482 10001300: 83 C4 04 add esp,4 10001303: B8 00 00 00 00 mov eax,0 10001308: D8 6D F4 fsubr dword ptr [ebp-0Ch] 1000130B: 8B 4D 14 mov ecx,dword ptr [ebp+14h] 1000130E: DD D1 fst st(1) 10001310: D8 1F fcomp dword ptr [edi] 10001312: DF E0 fnstsw ax 10001314: 80 E4 41 and ah,41h 10001317: 75 07 jne 10001320 10001319: D9 17 fst dword ptr [edi] 1000131B: 8B 45 FC mov eax,dword ptr [ebp-4] 1000131E: 89 01 mov dword ptr [ecx],eax 10001320: 46 inc esi 10001321: 4B dec ebx 10001322: 85 DB test ebx,ebx 10001324: 7F 8A jg 100012B0 10001326: DD C0 ffree st(0) 10001328: 5F pop edi 10001329: 5E pop esi 1000132A: 5B pop ebx 1000132B: 8B E5 mov esp,ebp 1000132D: 5D pop ebp 1000132E: C2 10 00 ret 10h 10001331: 55 push ebp 10001332: 8B EC mov ebp,esp 10001334: 83 EC 1C sub esp,1Ch 10001337: 53 push ebx 10001338: 8B 45 08 mov eax,dword ptr [ebp+8] 1000133B: D9 05 98 80 00 10 fld dword ptr ds:[10008098h] 10001341: 8B 55 0C mov edx,dword ptr [ebp+0Ch] 10001344: 8B 4D 10 mov ecx,dword ptr [ebp+10h] 10001347: DD D9 fstp st(1) 10001349: D9 05 98 80 00 10 fld dword ptr ds:[10008098h] 1000134F: 8B 1D 98 80 00 10 mov ebx,dword ptr ds:[10008098h] 10001355: DD DA fstp st(2)
y la DLL en C++ que genero y que hace referencia a esta de fortran con el dumpbin
--- Código: Text --- Microsoft (R) COFF Binary File Dumper Version 6.00.8168Copyright (C) Microsoft Corp 1992-1998. All rights reserved. Dump of file hbvmodelapi.dll File Type: DLL 10001000: 56 push esi 10001001: 8B 74 24 08 mov esi,dword ptr [esp+8] 10001005: 57 push edi 10001006: 8B 7C 24 14 mov edi,dword ptr [esp+14h] 1000100A: 8B 06 mov eax,dword ptr [esi] 1000100C: 6A 00 push 0 1000100E: 57 push edi 1000100F: 56 push esi 10001010: FF 90 A4 02 00 00 call dword ptr [eax+000002A4h] 10001016: 50 push eax 10001017: 68 30 80 00 10 push 10008030h 1000101C: E8 9F 00 00 00 call 100010C0 10001021: 8B 0E mov ecx,dword ptr [esi] 10001023: 83 C4 08 add esp,8 10001026: 6A 00 push 0 10001028: 57 push edi 10001029: 56 push esi 1000102A: FF 91 A8 02 00 00 call dword ptr [ecx+000002A8h] 10001030: 5F pop edi 10001031: B0 01 mov al,1 10001033: 5E pop esi 10001034: C2 0C 00 ret 0Ch 10001037: 90 nop 10001038: 90 nop 10001039: 90 nop 1000103A: 90 nop 1000103B: 90 nop 1000103C: 90 nop 1000103D: 90 nop 1000103E: 90 nop 1000103F: 90 nop 10001040: 68 4C 80 00 10 push 1000804Ch 10001045: E8 76 00 00 00 call 100010C0 1000104A: 68 34 80 00 10 push 10008034h 1000104F: E8 6C 00 00 00 call 100010C0 10001054: DD 44 24 1C fld qword ptr [esp+1Ch] 10001058: 83 C4 08 add esp,8 1000105B: C2 18 00 ret 18h 1000105E: 90 nop 1000105F: 90 nop 10001060: 8D 44 24 48 lea eax,[esp+48h] 10001064: 8D 4C 24 44 lea ecx,[esp+44h] 10001068: 50 push eax 10001069: 8D 54 24 44 lea edx,[esp+44h] 1000106D: 51 push ecx 1000106E: 8B 4C 24 3C mov ecx,dword ptr [esp+3Ch] 10001072: 8D 44 24 44 lea eax,[esp+44h] 10001076: 52 push edx 10001077: 50 push eax 10001078: 8D 54 24 40 lea edx,[esp+40h] 1000107C: 51 push ecx 1000107D: 8D 44 24 40 lea eax,[esp+40h] 10001081: 52 push edx 10001082: 8D 4C 24 40 lea ecx,[esp+40h] 10001086: 50 push eax 10001087: 8D 54 24 40 lea edx,[esp+40h] 1000108B: 51 push ecx 1000108C: 8D 44 24 40 lea eax,[esp+40h] 10001090: 52 push edx 10001091: 8D 4C 24 40 lea ecx,[esp+40h] 10001095: 50 push eax 10001096: 8D 54 24 40 lea edx,[esp+40h] 1000109A: 51 push ecx 1000109B: 8B 4C 24 38 mov ecx,dword ptr [esp+38h] 1000109F: 8D 44 24 40 lea eax,[esp+40h] 100010A3: 52 push edx 100010A4: 50 push eax 100010A5: 51 push ecx 100010A6: E8 29 60 00 00 call 100070D4 100010AB: 83 C4 38 add esp,38h 100010AE: C2 48 00 ret 48h 100010B1: 90 nop 100010B2: 90 nop 100010B3: 90 nop 100010B4: 90 nop 100010B5: 90 nop 100010B6: 90 nop 100010B7: 90 nop 100010B8: 90 nop 100010B9: 90 nop 100010BA: 90 nop 100010BB: 90 nop 100010BC: 90 nop 100010BD: 90 nop 100010BE: 90 nop 100010BF: 90 nop 100010C0: 53 push ebx 100010C1: 56 push esi 100010C2: BE A0 80 00 10 mov esi,100080A0h 100010C7: 57 push edi 100010C8: 56 push esi 100010C9: 6A 01 push 1 100010CB: E8 15 03 00 00 call 100013E5 100010D0: 56 push esi 100010D1: E8 84 03 00 00 call 1000145A 100010D6: 8B F8 mov edi,eax 100010D8: 8D 44 24 20 lea eax,[esp+20h] 100010DC: 50 push eax 100010DD: FF 74 24 20 push dword ptr [esp+20h] 100010E1: 56 push esi 100010E2: E8 2A 04 00 00 call 10001511 100010E7: 56 push esi 100010E8: 57 push edi 100010E9: 8B D8 mov ebx,eax 100010EB: E8 F7 03 00 00 call 100014E7 100010F0: 56 push esi 100010F1: 6A 01 push 1 100010F3: E8 3F 03 00 00 call 10001437 100010F8: 83 C4 28 add esp,28h 100010FB: 8B C3 mov eax,ebx 100010FD: 5F pop edi 100010FE: 5E pop esi 100010FF: 5B pop ebx 10001100: C3 ret 10001101: E8 13 00 00 00 call 10001119 10001106: E8 60 0C 00 00 call 10001D6B 1000110B: A3 F4 8F 00 10 mov [10008FF4],eax 10001110: E8 06 0C 00 00 call 10001D1B 10001115: DB E2 fnclex 10001117: C3 ret
yo sinceramente, no soy capaz de ver en este código lo de la convención de llamada que comentas, si pudieras apuntarme algo sería genial.
y gracias de nuevo!
Navegación
[#] Página Siguiente
[*] Página Anterior
Ir a la versión completa