no size for type nothrow extern (Windows) int()
    cal 
    callumenator at gmail.com
       
    Sat Nov 10 19:32:11 PST 2012
    
    
  
On Sunday, 11 November 2012 at 02:55:09 UTC, Alex Rønne Petersen 
wrote:
> Can you give a self-contained repro that illustrates the 
> problem?
>
> Also, please use core.sys.windows.windows instead. The std.c.* 
> package is going to be deprecated soon-ish.
import core.sys.windows.windows;
void main()
{
   FARPROC addr1, addr2;
   auto ptr = VirtualAlloc(null, addr2-addr1, 0x00001000, 0x40);
}
I just discovered while reducing it what the error message means: 
FARPROC is not void* like I thought, but (int function()), so it 
can't be used like I tried to do above. The compiler message was 
a little cryptic, but obvious in hindsight. Thanks!
    
    
More information about the Digitalmars-d-learn
mailing list