home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.os.development      Operating system development chatter      4,255 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 2,823 of 4,255   
   mutazilah@gmail.com to Tavis Ormandy   
   Re: DLL   
   28 Aug 21 22:20:20   
   
   From: muta...@gmail.com   
      
   On Sunday, August 29, 2021 at 9:26:50 AM UTC+10, Tavis Ormandy wrote:   
   > On 2021-08-28, muta...@gmail.com wrote:   
   > > But the DLL being produced is very small and doesn't   
   > > contain the functions I want, and that is confirmed   
   > > by the link map.   
      
   > You need to mark the symbols you want exported, or the compiler will   
   > assume it's dead code and remove them - they're not visible outside of   
   > the current compilation unit, and you never called them...so why keep   
   > them!   
   >   
   > The easy solution is to just add __declspec(dllexport) to the functions   
   > you want exported. Alternatively, you can make a def file to tell the   
   > linker precisely what you wanted.   
      
   Hi Tavis. Thanks for your reply.   
      
   That solved the problem!   
      
   My next problem is that my functions appear to have an   
   underscore in front of them (from kernel32.map):   
      
   0001:00000040       _WriteFile@20              10001040 f   kernel32.obj   
      
   What will Microsoft be doing to suppress that?   
      
   Here is how each function I define looks like:   
      
   #define WINAPI __declspec(dllexport) __stdcall   
      
   I'm guessing that Microsoft has done something special   
   to avoid namespace pollution. Any idea what?   
      
   Thanks. Paul.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca