D - winsamp.d
- imr1984 (17/17) Jan 13 2004 Can someone explain to me why Win32 programs need these 5 externs? Cant ...
- Walter (8/25) Jan 13 2004 extern (C) sets the calling convention. export sets the special protocal...
- Matthew (2/32) Jan 13 2004
- imr1984 (3/33) Jan 14 2004 so are those 5 externs like prototypes to tell the compiler to reference...
- Walter (5/8) Jan 14 2004 the D
- J Anderson (3/21) Jan 14 2004 Why no have a dwindows (or something), which imports all the related
- J C Calvarese (17/49) Jan 14 2004 Are you thinking of something like this?
- J Anderson (9/59) Jan 14 2004 Exactly. Or parhaps.
- Sean L. Palmer (17/63) Jan 15 2004 Why has nobody suggested:
Can someone explain to me why Win32 programs need these 5 externs? Cant they be put into the std.c.windows.windows import file? Also, what is the difference between extern and export?, because they both seem to be used to import functions from a dll/lib. Sorry for the loads of the questions but the spec file isnt that clear. extern (C) void gc_init(); extern (C) void gc_term(); extern (C) void _minit(); extern (C) void _moduleCtor(); extern (C) void _moduleUnitTests(); extern (Windows) int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { ..
Jan 13 2004
extern (C) sets the calling convention. export sets the special protocall used to export functions from a DLL. They are not in their own import because they are internal names and may change. "imr1984" <imr1984_member pathlink.com> wrote in message news:bu1hbv$m74$1 digitaldaemon.com...Can someone explain to me why Win32 programs need these 5 externs? Cantthey beput into the std.c.windows.windows import file? Also, what is thedifferencebetween extern and export?, because they both seem to be used to import functions from a dll/lib. Sorry for the loads of the questions but thespec fileisnt that clear. extern (C) void gc_init(); extern (C) void gc_term(); extern (C) void _minit(); extern (C) void _moduleCtor(); extern (C) void _moduleUnitTests(); extern (Windows) int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { ..
Jan 13 2004
extern (C) sets the calling convention. export sets the special protocall used to export functions from a DLL. They are not in their own import because they are internal names and may change.Can we still export functions marked extern(C) but not marked export via a .DEF file, or other means?"imr1984" <imr1984_member pathlink.com> wrote in message news:bu1hbv$m74$1 digitaldaemon.com...Can someone explain to me why Win32 programs need these 5 externs? Cantthey beput into the std.c.windows.windows import file? Also, what is thedifferencebetween extern and export?, because they both seem to be used to import functions from a dll/lib. Sorry for the loads of the questions but thespec fileisnt that clear. extern (C) void gc_init(); extern (C) void gc_term(); extern (C) void _minit(); extern (C) void _moduleCtor(); extern (C) void _moduleUnitTests(); extern (Windows) int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { ..
Jan 13 2004
"Matthew" <matthew.hat stlsoft.dot.org> wrote in message news:bu2i9h$2cn0$1 digitaldaemon.com...protocallextern (C) sets the calling convention. export sets the specialThe same rules apply as for C. After all, a .DEF file is a command to the linker, not the compiler, and the linker knows nothing about languages.used to export functions from a DLL. They are not in their own import because they are internal names and may change.Can we still export functions marked extern(C) but not marked export via a .DEF file, or other means?
Jan 14 2004
"Walter" <walter digitalmars.com> wrote in message news:bu2v2k$1r8$1 digitaldaemon.com..."Matthew" <matthew.hat stlsoft.dot.org> wrote in message news:bu2i9h$2cn0$1 digitaldaemon.com...aprotocallextern (C) sets the calling convention. export sets the specialused to export functions from a DLL. They are not in their own import because they are internal names and may change.Can we still export functions marked extern(C) but not marked export viaThought so. Just checking. :).DEF file, or other means?The same rules apply as for C. After all, a .DEF file is a command to the linker, not the compiler, and the linker knows nothing about languages.
Jan 14 2004
so are those 5 externs like prototypes to tell the compiler to reference the D library? If so why cant they be put into the windows.d import file? In article <bu1u4s$1brd$1 digitaldaemon.com>, Walter says...extern (C) sets the calling convention. export sets the special protocall used to export functions from a DLL. They are not in their own import because they are internal names and may change. "imr1984" <imr1984_member pathlink.com> wrote in message news:bu1hbv$m74$1 digitaldaemon.com...Can someone explain to me why Win32 programs need these 5 externs? Cantthey beput into the std.c.windows.windows import file? Also, what is thedifferencebetween extern and export?, because they both seem to be used to import functions from a dll/lib. Sorry for the loads of the questions but thespec fileisnt that clear. extern (C) void gc_init(); extern (C) void gc_term(); extern (C) void _minit(); extern (C) void _moduleCtor(); extern (C) void _moduleUnitTests(); extern (Windows) int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { ..
Jan 14 2004
"imr1984" <imr1984_member pathlink.com> wrote in message news:bu3lbl$15fl$1 digitaldaemon.com...so are those 5 externs like prototypes to tell the compiler to referencethe Dlibrary?Yes.If so why cant they be put into the windows.d import file?I want to keep windows.d an analogue of windows.h
Jan 14 2004
Walter wrote:"imr1984" <imr1984_member pathlink.com> wrote in message news:bu3lbl$15fl$1 digitaldaemon.com...Why no have a dwindows (or something), which imports all the related stuff for windows?so are those 5 externs like prototypes to tell the compiler to referencethe Dlibrary?Yes.If so why cant they be put into the windows.d import file?I want to keep windows.d an analogue of windows.h
Jan 14 2004
J Anderson wrote:Walter wrote:Are you thinking of something like this? // ----------------------------------- // module std.windows.windows; extern (C) void gc_init(); extern (C) void gc_term(); extern (C) void _minit(); extern (C) void _moduleCtor(); extern (C) void _moduleUnitTests(); // ----------------------------------- // Seems like a good idea to me. I like to keep the mysterious stuff underneath the hood. I prefer one line with "import std.windows.windows;" to five cryptic lines that make it easy for me to mess up something. -- Justin http://jcc_7.tripod.com/d/"imr1984" <imr1984_member pathlink.com> wrote in message news:bu3lbl$15fl$1 digitaldaemon.com...Why no have a dwindows (or something), which imports all the related stuff for windows?so are those 5 externs like prototypes to tell the compiler to referencethe Dlibrary?Yes.If so why cant they be put into the windows.d import file?I want to keep windows.d an analogue of windows.h
Jan 14 2004
J C Calvarese wrote:J Anderson wrote:Exactly. Or parhaps. module std.d.windows; import std.c.windows; extern (C) void gc_init(); extern (C) void gc_term(); extern (C) void _minit(); extern (C) void _moduleCtor(); extern (C) void _moduleUnitTests();Walter wrote:Are you thinking of something like this? // ----------------------------------- // module std.windows.windows; extern (C) void gc_init(); extern (C) void gc_term(); extern (C) void _minit(); extern (C) void _moduleCtor(); extern (C) void _moduleUnitTests(); // ----------------------------------- // Seems like a good idea to me. I like to keep the mysterious stuff underneath the hood. I prefer one line with "import std.windows.windows;" to five cryptic lines that make it easy for me to mess up something."imr1984" <imr1984_member pathlink.com> wrote in message news:bu3lbl$15fl$1 digitaldaemon.com...Why no have a dwindows (or something), which imports all the related stuff for windows?so are those 5 externs like prototypes to tell the compiler to referencethe Dlibrary?Yes.If so why cant they be put into the windows.d import file?I want to keep windows.d an analogue of windows.h
Jan 14 2004
"J Anderson" <REMOVEanderson badmama.com.au> wrote in message news:bu4ne6$2t0a$1 digitaldaemon.com...J C Calvarese wrote:Why has nobody suggested: extern (C) { void gc_init(); void gc_term(); void _minit(); void _moduleCtor(); void _moduleUnitTests(); } ? It seems C should allow something like this: void gc_init(), gc_term(), _minit(), _moduleCtor(),_moduleUnitTests(); But I don't think it does. ? SeanJ Anderson wrote:Exactly. Or parhaps. module std.d.windows; import std.c.windows; extern (C) void gc_init(); extern (C) void gc_term(); extern (C) void _minit(); extern (C) void _moduleCtor(); extern (C) void _moduleUnitTests();Walter wrote:Are you thinking of something like this? // ----------------------------------- // module std.windows.windows; extern (C) void gc_init(); extern (C) void gc_term(); extern (C) void _minit(); extern (C) void _moduleCtor(); extern (C) void _moduleUnitTests(); // ----------------------------------- // Seems like a good idea to me. I like to keep the mysterious stuff underneath the hood. I prefer one line with "import std.windows.windows;" to five cryptic lines that make it easy for me to mess up something."imr1984" <imr1984_member pathlink.com> wrote in messageWhy no have a dwindows (or something), which imports all the related stuff for windows?If so why cant they be put into the windows.d import file?I want to keep windows.d an analogue of windows.h
Jan 15 2004