flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
CandyMan
whether somebody could show me how to create the library from scratch for windows in particular section export.
thanks! _________________ smaller is better |
|||
![]() |
|
RIxRIpt
I'm not sure about static library, but you can find dynamic-link library example in FASM\EXAMPLES\DLL
|
|||
![]() |
|
tthsqe
candyman, here is what the imports/exports looks like from one of my libraries. W8 seems to need reloc section to be readable and any windows seems to not like empty reloc section.
Code: section '.idata' import data readable writeable library kernel32,'KERNEL32.DLL',\ user32,'USER32.DLL',\ gdi32,'GDI32.DLL',\ gmp,'GMP.DLL' include 'api\kernel32.inc' include 'api\user32.inc' include 'api\gdi32.inc' import gmp,\ mpf_abs,'__gmpf_abs',\ mpf_add,'__gmpf_add',\ mpf_add_ui,'__gmpf_add_ui',\ mpf_clear,'__gmpf_clear',\ mpf_cmp,'__gmpf_cmp',\ mpf_div,'__gmpf_div',\ mpf_div_2exp,'__gmpf_div_2exp',\ mpf_div_ui,'__gmpf_div_ui',\ mpf_init2,'__gmpf_init2',\ mpf_mul,'__gmpf_mul',\ mpf_mul_2exp,'__gmpf_mul_2exp',\ mpf_mul_ui,'__gmpf_mul_ui',\ mpf_neg,'__gmpf_neg',\ mpf_pow_ui,'__gmpf_pow_ui',\ mpf_set,'__gmpf_set',\ mpf_set_str,'__gmpf_set_str',\ mpf_set_ui,'__gmpf_set_ui',\ mpf_set_si,'__gmpf_set_si',\ mpf_set_z,'__gmpf_set_z',\ mpf_sqrt,'__gmpf_sqrt',\ mpf_sqrt_ui,'__gmpf_sqrt_ui',\ mpf_sub,'__gmpf_sub',\ mpf_sub_ui,'__gmpf_sub_ui',\ mpf_ui_div,'__gmpf_ui_div',\ mpf_ui_sub,'__gmpf_ui_sub',\ mpz_abs,'__gmpz_abs',\ mpz_add,'__gmpz_add',\ mpz_addmul,'__gmpz_addmul',\ mpz_addmul_ui,'__gmpz_addmul_ui',\ mpz_add_ui,'__gmpz_add_ui',\ mpz_and,'__gmpz_and',\ mpz_clear,'__gmpz_clear',\ mpz_cmp,'__gmpz_cmp',\ mpz_com,'__gmpz_com',\ mpz_divexact,'__gmpz_divexact',\ mpz_divisible_p,'__gmpz_divisible_p',\ mpz_fac_ui,'__gmpz_fac_ui',\ mpz_fdiv_qr,'__gmpz_fdiv_qr',\ mpz_fdiv_q,'__gmpz_fdiv_q',\ mpz_fdiv_r,'__gmpz_fdiv_r',\ mpz_fib_ui,'__gmpz_fib_ui',\ mpz_gcd,'__gmpz_gcd',\ mpz_init,'__gmpz_init',\ mpz_init2,'__gmpz_init2',\ mpz_init_set,'__gmpz_init_set',\ mpz_init_set_str,'__gmpz_init_set_str',\ mpz_init_set_ui,'__gmpz_init_set_ui',\ mpz_ior,'__gmpz_ior',\ mpz_lcm,'__gmpz_lcm',\ mpz_mul,'__gmpz_mul',\ mpz_mul_2exp,'__gmpz_mul_2exp',\ mpz_mul_ui,'__gmpz_mul_ui',\ mpz_neg,'__gmpz_neg',\ mpz_perfect_square_p,'__gmpz_perfect_square_p',\ mpz_pow_ui,'__gmpz_pow_ui',\ mpz_set,'__gmpz_set',\ mpz_set_ui,'__gmpz_set_ui',\ mpz_sqrt,'__gmpz_sqrt',\ mpz_sub,'__gmpz_sub',\ mpz_tdiv_q_2exp,'__gmpz_tdiv_q_2exp',\ mpz_ui_pow_ui,'__gmpz_ui_pow_ui',\ mpz_xor,'__gmpz_xor',\ gmp_sprintf,'__gmp_sprintf',\ gmp_version,'__gmp_version' section '.edata' export data readable export 'MathEngine.dll',\ meClearEvalStack,'meClearEvalStack',\ meCreateState,'meCreateState',\ meDeleteState,'meDeleteState',\ meLoadLibraryFunctions,'meLoadLibraryFunctions',\ mePrintFloat,'mePrintFloat',\ mePrintFunctionsString,'mePrintFunctionsString',\ meProcessString,'meProcessString',\ \ Convert_M_INT_to_M_FP,'meConvert_M_INT_to_M_FP',\ EvalError_Fxn,'meEvalError_Fxn',\ Get_M_INT_abs_and_sign,'meGet_M_INT_abs_and_sign',\ SinCos_B_REAL,'meSinCos_B_REAL',\ SinCos_ui,'meSinCos_ui',\ Store_B_REAL,'meStore_B_REAL',\ Store_M_FP,'meStore_M_FP',\ Convert_to_M_FP,'meConvert_to_M_FP' section '.reloc' data readable discardable data fixups if ~ $-$$ dd 0,8 ;empty fixups section iff no other fixups end if end data |
|||
![]() |
|
badc0de02
File: ERRORMSG.DLL
Function: ShowErrorMessage,ShowLastError rest will you find in the export macro Code: format pe gui 4.0 dll include 'win32a.inc' section '.edata' export data readable export 'ERRORMSG.DLL',\ ShowErrorMessage,'ShowErrorMessage',\ ShowLastError,'ShowLastError' |
|||
![]() |
|
CandyMan
I meant something like that, but the thanks guys.
Code: struct tExportDirectory Characteristics dd ? TimeDateStamp dd ? MajorVersion dw ? MinorVersion dw ? Name dd ? Base dd ? NumberOfFunctions dd ? NumberOfNames dd ? AddressOfFunctions dd ? AddressOfNames dd ? AddressOfNameOrdinals dd ? ends _________________ smaller is better |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.