DLL with same conventions as VC++
Gilles G.
schaouette at free.fr
Wed Jun 20 11:17:44 PDT 2007
torhu Wrote:
> Gilles G. wrote:
> > Hello,
> > I am trying to build a dll using D.
> >
> > In my first attempt to write it in C++, I add working calls with the main application by using something like:
> > int __stdcall DLLVersion(){return 1;}
> > this also only worked with VC++ using a .def file like (couldn't manage to make it work using borland):
> > EXPORTS
> > DLLVersion
> >
> > As I read the documentation, I understand (not sure) that in order to have equivalent calls, I must use:
> > export extern(Windows) int DLLVersion(){return 1;}
> >
>
> That looks correct to me.
>
> > The problem is that the main application doesn't seem torecognize the D DLL.
> > Any help would be fantastic!
>
>
> Did you check out the example in dmd\samples\mydll?
>
> And this page?
> http://www.digitalmars.com/d/dll.html
Yes, of course!
I use the same method: export and .def file.
I understood the following:
export extern(Windows) <=> __stdcall
export extern(C) <=> __cdecl
Does anybody have any idea what could be the (subtle) difference?
Thanks!
More information about the Digitalmars-d
mailing list