What's new
  • Visit Rebornbuddy
  • Visit Resources
  • Visit API Documentation
  • Visit Downloads
  • Visit Portal
  • Visit Panda Profiles
  • Visit LLamamMagic

How to force exit/close db through plugin?

zippysticks

New Member
Joined
Jun 14, 2012
Messages
452
Reaction score
0
Is there a command that will exit db? I know there's like CommonBot.BotMain.Stop() to stop it, but is there a similar tag that exits demonbuddy?
 
try

Code:
System.Windows.Application.Current.Shutdown();
 
try

Code:
System.Windows.Application.Current.Shutdown();

I get the following error:
Code:
The calling thread cannot access this object because a different thread owns it.

Anyway to override it and just shutdown the main bot as a whole?


Edit: Nevermind, found it myself with:
Code:
Environment.Exit(0);

Anyone see any problems of using Environment.Exit(0); instead of Application.Current.Shutdown();?
 
Last edited:
I get the following error:
Code:
The calling thread cannot access this object because a different thread owns it.

Anyway to override it and just shutdown the main bot as a whole?


Edit: Nevermind, found it myself with:
Code:
Environment.Exit(0);

Anyone see any problems of using Environment.Exit(0); instead of Application.Current.Shutdown();?

No problem, I just forgot this possibility =)
 
No problem, I just forgot this possibility =)


Thanks for that, is there a way to kill the attached diablo process? I mean if multiple DB and multiple Diablo III.exe are running, how do I know which one I should kill?
 
Thanks for that, is there a way to kill the attached diablo process? I mean if multiple DB and multiple Diablo III.exe are running, how do I know which one I should kill?

I used Environment.Exit(0); tag to replace your leavegame() tag from your gold inactivity so DB can fully exit instead of just leaving. This way, my relogger can take over because once it detects if diablo or DB isn't running concurrently, it will force kill both if they exist and relogs in for me like as if it was a fresh start.
 
I used Environment.Exit(0); tag to replace your leavegame() tag from your gold inactivity so DB can fully exit instead of just leaving. This way, my relogger can take over because once it detects if diablo or DB isn't running concurrently, it will force kill both if they exist and relogs in for me like as if it was a fresh start.

Will this code work even the notification hasn't been closed?
 
Code:
try{	foreach (Process proc in Process.GetProcessesByName("Dablo III"))            {                proc.Kill();            }}catch(Exception ex){	MessageBox.Show(ex.Message);}
that outta do it even if it is a little messy.
 
Code:
try{	foreach (Process proc in Process.GetProcessesByName("Dablo III"))            {                proc.Kill();            }}catch(Exception ex){	MessageBox.Show(ex.Message);}
that outta do it even if it is a little messy.

Would it only kill the diablo that DB is attached too? Or would it kill all process matching "Dablo III" that is running?
 
Back
Top