On 21/07/2015 10:14 p.m., Baz wrote:
---
import std.process;
import core.thread;
import std.random;
void main(string[] args)
{
string on = "netsh interface set interface \"Connexion au réseau
local\" Enable";
string off = "netsh interface set interface \"Connexion au réseau
local\" Disable";
while(true)
{
executeShell(on);
Thread.sleep(dur!("msecs")(uniform(2000, 5000)));
executeShell(off);
Thread.sleep(dur!("msecs")(2000));
}
}
---
It's stable if i remove the random time after connecting, otherwise in
the current shape it crashes Windows. Don't know why. Any idea ?
Note that you can test by replacing the name of my interface by yours
('Connexion au réseau local').
This shouldn't be a D bug, it's reasonable D code.
Can you give us the BSOD text?
Also OS version + platform would be nice.
I've asked a friend who knows Windows better then anybody should and
basically relaying this to him FYI.