That said, on re-reading your original post, I can guess what you're
doing wrong: trying to work around the missing extern (C) attributes in
ras.d instead of fixing them. And consequently, merely renaming the
functions and not actually fixing the calling convention. I got it to
link by fixing this error, and then....
It works now! I have Win XP.
It works, but not with extern(C) (although it links and runs - but runs
with errors if you, for example, try to print names of entries, - looks
like there are memory collisions or something of that).
Look at the output (extern(C)):
OPTLINK (R) for Win32 Release 8.00.1
Copyright (C) Digital Mars 1989-2004 All rights reserved.
rasapi32.lib
Warning 2: File Not Found rasapi32.lib
dialer.obj(dialer)
Error 42: Symbol Undefined _RasGetConnectStatusA
dialer.obj(dialer)
Error 42: Symbol Undefined _RasGetErrorStringA
dialer.obj(dialer)
Error 42: Symbol Undefined _RasEnumEntriesA
and of the extern(Windows):
--- errorlevel 3
OPTLINK (R) for Win32 Release 8.00.1
Copyright (C) Digital Mars 1989-2004 All rights reserved.
rasapi32.lib
Warning 2: File Not Found rasapi32.lib
dialer.obj(dialer)
Error 42: Symbol Undefined _rasgetconnectstat...@8
dialer.obj(dialer)
Error 42: Symbol Undefined _rasgeterrorstri...@12
dialer.obj(dialer)
Error 42: Symbol Undefined _rasenumentri...@20
--- errorlevel 3
P.S.
Thank you for explanation! (I've thought there can't be any error in
win32/ras.d (last commit was about 3 years ago!), and was trying to find
it elsewhere :)