How can I request smthg related to the Win run-time ?

Mike Parker aldacron at gmail.com
Tue Mar 5 00:08:26 PST 2013


On Monday, 4 March 2013 at 18:27:47 UTC, cal wrote:
> On Monday, 4 March 2013 at 16:28:36 UTC, D-ratiseur wrote:
>> Ok, thx, I've created the prototype and also tried to 
>> dynamically
>> link the method. It's true that SetEndOfFile is not used at all
>> in Phobos, that's explain well why the proto is not declared.
>
> Note you shouldn't need to dynamically link, dmd will link 
> against Kernel32.lib anyway. Declaring the proto is enough.

In this particular instance that is true, but I've found that 
it's not always the case. The Win32 link libraries that ship with 
DMD seem to be rather old (unless they've been updated in the 
last year or so). I haven't dug into it too deeply, but I'm 
guessing they're based on the XP era of the API and anything 
added since Vista isn't going to be exposed. That will cause link 
errors. I encountered this with some of the post-XP functions in 
shell32.lib and had to resort to loading them dynamically.


More information about the Digitalmars-d mailing list