Winelib Program with DLL problem

Dmitry Timoshkov dmitry at baikal.ru
Thu Dec 25 05:29:27 CST 2003


"Boaz Harrosh" <boaz at hishome.net> wrote:

> I did, I have tried both your suggestions.
> 
> What ever you do. any thing after the @ sign gets truncated in the 
> import process and will not
> Reach the Import table.
> 
> Note that in any way we need a split. asm(.data section) needs a 
> none-decorated name and the Import table needs a Decorated one. What 
> ever you do to winebuild it will not write two separate names. right?

I don't know what exactly you did try, but here is my results, based
on your code:

Foo.spec:

@ stdcall fnFooSTD at 8@8(long long) fnFooSTD
@ cdecl   fnFooC  (long long) fnFooC

resulted Foo.spec.c:

asm(".data\n"
    "\t.align 4\n"
    "__wine_spec_exports:\n"
    "\t.long 0\n"
    "\t.long 0\n"
    "\t.long 0\n"
    "\t.long __wine_spec_exp_names\n"
    "\t.long 1\n"
    "\t.long 2\n"
    "\t.long 2\n"
    "\t.long __wine_spec_exports_funcs\n"
    "\t.long __wine_spec_exp_name_ptrs\n"
    "\t.long __wine_spec_exp_ordinals\n"
    "__wine_spec_exports_funcs:\n"
    "\t.long fnFooC\n"
    "\t.long fnFooSTD\n"
    "__wine_spec_exp_name_ptrs:\n"
    "\t.long __wine_spec_exp_names+8\n"
    "\t.long __wine_spec_exp_names+15\n"
    "\t.text\n"
    "__wine_spec_exp_names:\n"
    "\t.string \"Foo.dll\"\n"
    "\t.string \"fnFooC\"\n"
    "\t.string \"fnFooSTD at 8\"\n"
                 ^^^^^^^^^^<----------------------------<<<<<<<<<
    "\t.data\n"
    "__wine_spec_exp_ordinals:\n"
    "\t.short 0\n"
    "\t.short 1\n"
    "\tjmp fnFooC\n"
    "\tret\n"
    "\t.short 8\n"
    "\t.long fnFooC,0x00000000\n"
    "\tjmp fnFooSTD\n"
    "\tret $8\n"
    "\t.long fnFooSTD,0x00000000\n"
    "\t.text\n"
    "\t.align 4\n"
);

As you can see it works for me.

-- 
Dmitry.





More information about the wine-devel mailing list