gamedevlists-windows Mailing List for gamedev (Page 15)
Brought to you by:
vexxed72
You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(48) |
Oct
(58) |
Nov
(49) |
Dec
(38) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(124) |
Feb
(83) |
Mar
(17) |
Apr
(37) |
May
(12) |
Jun
(20) |
Jul
(47) |
Aug
(74) |
Sep
(62) |
Oct
(72) |
Nov
(54) |
Dec
(13) |
2003 |
Jan
(36) |
Feb
(8) |
Mar
(38) |
Apr
(3) |
May
(6) |
Jun
(133) |
Jul
(20) |
Aug
(18) |
Sep
(12) |
Oct
(4) |
Nov
(28) |
Dec
(36) |
2004 |
Jan
(22) |
Feb
(51) |
Mar
(28) |
Apr
(9) |
May
(20) |
Jun
(9) |
Jul
(37) |
Aug
(20) |
Sep
(23) |
Oct
(15) |
Nov
(23) |
Dec
(27) |
2005 |
Jan
(22) |
Feb
(20) |
Mar
(5) |
Apr
(14) |
May
(10) |
Jun
|
Jul
(6) |
Aug
(6) |
Sep
|
Oct
(12) |
Nov
(1) |
Dec
|
2006 |
Jan
(18) |
Feb
(4) |
Mar
(3) |
Apr
(6) |
May
(4) |
Jun
(3) |
Jul
(16) |
Aug
(40) |
Sep
(6) |
Oct
(1) |
Nov
|
Dec
(2) |
2007 |
Jan
(5) |
Feb
(2) |
Mar
(4) |
Apr
(1) |
May
(13) |
Jun
|
Jul
(26) |
Aug
(3) |
Sep
(10) |
Oct
|
Nov
(4) |
Dec
(5) |
2008 |
Jan
(1) |
Feb
|
Mar
(4) |
Apr
|
May
|
Jun
(5) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Lewin, G. <gl...@ea...> - 2004-09-23 01:05:24
|
Ok, another option is http://msdn.microsoft.com/library/default.asp?url=3D/library/en-us/termse= r v/termserv/wtssession_notification_str.asp But that's xp only. :(=20 _________________________________________ Gareth Lewin - http://www.garethlewin.com "Facts are useless. You can use facts to prove anything that's even remotely true. Facts shmacts!" -- Homer Jay Simpson. -----Original Message----- From: Brian Hook [mailto:ho...@bo...]=20 Sent: Wednesday, September 22, 2004 5:12 PM To: gam...@li... Subject: RE: [GD-Windows] Detecting locked screen > What you want are winlogon notification events Which require installing a DLL which I believe requires Admin privileges (the stuff I've seen requires you to edit HKLM in the registry). So unfortunate I can't use that =3D/ Brian ------------------------------------------------------- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php _______________________________________________ Gamedevlists-windows mailing list Gam...@li... https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows Archives: http://sourceforge.net/mailarchive/forum.php?forum_idU5 |
From: Brian H. <ho...@bo...> - 2004-09-23 00:11:59
|
> What you want are winlogon notification events Which require installing a DLL which I believe requires Admin privileges (the stuff I've seen requires you to edit HKLM in the registry). So unfortunate I can't use that =3D/ Brian |
From: Lewin, G. <gl...@ea...> - 2004-09-22 22:18:46
|
What you want are winlogon notification events http://msdn.microsoft.com/library/default.asp?url=3D/library/en-us/secaut= h n/security/winlogon_notification_packages.asp=20 _________________________________________ Gareth Lewin - http://www.garethlewin.com "Facts are useless. You can use facts to prove anything that's even remotely true. Facts shmacts!" -- Homer Jay Simpson. -----Original Message----- From: Brian Hook [mailto:ho...@bo...]=20 Sent: Wednesday, September 22, 2004 1:56 PM To: gam...@li... Subject: RE: [GD-Windows] Detecting locked screen > You can check if it has happened: Thanks, that helps, but it doesn't quite solve it. SwitchDesktop() will still fail if the screen saver has turned on but the actual lock hasn't occurred. There is a very brief interval (under a couple seconds) when the screen saver kicks in and it WON'T lock the desktop, and SwitchDesktop() will fail then even if the desktop hasn't actually been locked (i.e. you can tap a key or move the mouse and the screensaver turns off and there's no logon box). Basically I'm looking for a fictitious API that is like: if ( WorkstationLocked() ) .... Failing that, being able to process a LockWorkstation() or whatever would do the trick as well. Thanks, Brian ------------------------------------------------------- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php _______________________________________________ Gamedevlists-windows mailing list Gam...@li... https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows Archives: http://sourceforge.net/mailarchive/forum.php?forum_idU5 |
From: Brian H. <ho...@bo...> - 2004-09-22 20:56:21
|
> You can check if it has happened: Thanks, that helps, but it doesn't quite solve it. SwitchDesktop() will still fail if the screen saver has turned on but the actual lock hasn't occurred. There is a very brief interval (under a couple seconds) when the screen saver kicks in and it WON'T lock the desktop, and SwitchDesktop() will fail then even if the desktop hasn't actually been locked (i.e. you can tap a key or move the mouse and the screensaver turns off and there's no logon box). Basically I'm looking for a fictitious API that is like: if ( WorkstationLocked() ) .... Failing that, being able to process a LockWorkstation() or whatever would do the trick as well. Thanks, Brian |
From: Steve L. <st...@mi...> - 2004-09-22 18:48:17
|
You can check if it has happened: bool CheckForDesktopAvailable(void) { bool bAvailable =3D false; =20 // Check to see if the desktop is locked HDESK hDesk =3D OpenDesktop("Default", 0, FALSE, DESKTOP_SWITCHDESKTOP); if (hDesk) { if (SwitchDesktop(hDesk) !=3D 0) { bAvailable =3D true; } CloseDesktop(hDesk); } return (bAvailable); } =20 AFAIK there is no message to tell you when it happens... -----Original Message----- From: gam...@li... [mailto:gam...@li...] On Behalf Of Brian Hook Sent: Wednesday, September 22, 2004 11:33 AM To: gam...@li... Subject: [GD-Windows] Detecting locked screen I'm trying to detect when the user has chosen to lock their workstation (via Task Manager or an app that calls LockWorkStation() directly), and I can't seem to find a simple way of doing this. I don't need to do anything, I just need to know if it's occurred or not. I was hoping there was some WM_LOCKWORKSTATION or something equivalent, but the nearest I can find is WM_ENDSESSION which isn't quite what I'm looking for. There is no WM_SYSCOMMAND type that is appropriate as well. Most stuff I see recommend installing a GINA DLL, but that may not be possible since the workstation user might have limited rights. If it's something as cheezy as doing a FindWindow for the Logon screen, that would work too, but I'm not sure what that window is called or if it's present all the time and just invisible unless locked, etc. Any pointers appreciated. Thanks, Brian ------------------------------------------------------- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php _______________________________________________ Gamedevlists-windows mailing list Gam...@li... https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows Archives: http://sourceforge.net/mailarchive/forum.php?forum_idU5 |
From: Brian H. <ho...@bo...> - 2004-09-22 18:32:41
|
I'm trying to detect when the user has chosen to lock their workstation (via Task Manager or an app that calls LockWorkStation() directly), and I can't seem to find a simple way of doing this. I don't need to do anything, I just need to know if it's occurred or not. I was hoping there was some WM_LOCKWORKSTATION or something equivalent, but the nearest I can find is WM_ENDSESSION which isn't quite what I'm looking for. There is no WM_SYSCOMMAND type that is appropriate as well. Most stuff I see recommend installing a GINA DLL, but that may not be possible since the workstation user might have limited rights. If it's something as cheezy as doing a FindWindow for the Logon screen, that would work too, but I'm not sure what that window is called or if it's present all the time and just invisible unless locked, etc. Any pointers appreciated. Thanks, Brian |
From: Jon W. <hp...@mi...> - 2004-09-09 05:14:16
|
hPrevInstance is only available under the Win16 execution environment, as far as I know. You can create a global Event or other named primitive in exclusive-named mode, and if that fails, some other process already created the thing. On NT-based kernels, cleaning up of named primitives when processes go away is pretty solid. (I'll let you work out what I actually implied when saying that :-) This is often used to prevent multiple execution of an application. Using OpenHandle() will fail if the event is not already created. You could use this to hand-shake between the two processes, and then get a handle to the starting process and wait on that to complete. You can use OpenProcess() followed by GetExitCodeProcess() to poll for another process to complete, or just pass the process handle to WaitForSingleObject( , INFINITE ); Cheers, / h+ -----Original Message----- From: gam...@li... [mailto:gam...@li...]On Behalf Of Dan Thompson Sent: Wednesday, September 08, 2004 6:29 PM To: gam...@li... Subject: Re: [email] RE: [GD-Windows] Restarting game exe Haven't tried this, but I'm sure there's a way to spin on the previous HINSTANCE that is passed in on WinMain - that is, if you are worried about dual execution. Something like if (hPrevInstance != NULL) { // Can't remember what to use to get the module handle. // You may be able to just straight up do WaitForSingleObject(hPrevInstance, 100 /*timeout in case the other doesn't exit*/ ); // But that doesn't feel right. (be sure to check for timeout, in case the // user actually executed it twice } Something like that. There's probably a few steps to get the correct handle to Wait() on. -Dan ----- Original Message ----- From: "George Geczy (BattleGoat) (E-mail)" <ge...@ba...> To: <gam...@li...> Sent: Wednesday, September 08, 2004 6:05 PM Subject: [email] RE: [GD-Windows] Restarting game exe > Yeah, CreateProcess() was on the list of possibles (that and ShellExecute(), > though the latter is not available in Win98). It just seems a bit kludgy - > ie, for an unknown amount of time you have two instances of your game > running, depending upon how Windows dishes out the execution. > > Maybe that's why I couldn't find a better way - there is no better way :-) > > -- George. > > > - George Geczy > - Lead Programmer, BattleGoat Studios > - www.supremeruler2010.com > - "Designing the Next Generation of Intelligent Strategy Games" > > > > > -----Original Message----- > > From: gam...@li... > > [mailto:gam...@li...]On Behalf Of > > Jon Watte > > Sent: Wednesday, September 08, 2004 5:45 PM > > To: gam...@li... > > Subject: RE: [GD-Windows] Restarting game exe > > > > > > > > Get your EXE path by getting the module path of your main module. > > > > Then use CreateProcess() to create the new process, and > > ExitProcess() your > > current process. > > > > If you're looking for "exec()" then there might be emulation > > of that, but > > the basic NT kernel primitive is somewhat different, so it > > won't be quite > > what you'd be used to from UNIX. > > > > Cheers, > > > > / h+ > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by BEA Weblogic Workshop > FREE Java Enterprise J2EE developer tools! > Get your free copy of BEA WebLogic Workshop 8.1 today. > http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > _______________________________________________ > Gamedevlists-windows mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=555 > ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click _______________________________________________ Gamedevlists-windows mailing list Gam...@li... https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=555 |
From: Dan T. <da...@ar...> - 2004-09-09 02:30:14
|
Ah, I knew something smelled fishy when I wrote that. Musta been pulling from the olden days. ----- Original Message ----- From: "Grills, Jeff" <jg...@so...> To: <gam...@li...> Sent: Wednesday, September 08, 2004 7:19 PM Subject: RE: [email] RE: [GD-Windows] Restarting game exe hPrevInstance is always NULL in Win32 based systems. Our game creates a semaphore to know whether it's already running or not. You could check for it's existence, and block until it's gone (or some timer expires). HANDLE semaphore = CreateSemaphore(NULL, 0, 1, "MyApplicationName"); j -----Original Message----- From: gam...@li... [mailto:gam...@li...] On Behalf Of Dan Thompson Sent: Wednesday, September 08, 2004 8:29 PM To: gam...@li... Subject: Re: [email] RE: [GD-Windows] Restarting game exe Haven't tried this, but I'm sure there's a way to spin on the previous HINSTANCE that is passed in on WinMain - that is, if you are worried about dual execution. Something like if (hPrevInstance != NULL) { // Can't remember what to use to get the module handle. // You may be able to just straight up do WaitForSingleObject(hPrevInstance, 100 /*timeout in case the other doesn't exit*/ ); // But that doesn't feel right. (be sure to check for timeout, in case the // user actually executed it twice } Something like that. There's probably a few steps to get the correct handle to Wait() on. -Dan ----- Original Message ----- From: "George Geczy (BattleGoat) (E-mail)" <ge...@ba...> To: <gam...@li...> Sent: Wednesday, September 08, 2004 6:05 PM Subject: [email] RE: [GD-Windows] Restarting game exe > Yeah, CreateProcess() was on the list of possibles (that and ShellExecute(), > though the latter is not available in Win98). It just seems a bit kludgy - > ie, for an unknown amount of time you have two instances of your game > running, depending upon how Windows dishes out the execution. > > Maybe that's why I couldn't find a better way - there is no better way > :-) > > -- George. > > > - George Geczy > - Lead Programmer, BattleGoat Studios > - www.supremeruler2010.com > - "Designing the Next Generation of Intelligent Strategy Games" > > > > > -----Original Message----- > > From: gam...@li... > > [mailto:gam...@li...]On Behalf > > Of Jon Watte > > Sent: Wednesday, September 08, 2004 5:45 PM > > To: gam...@li... > > Subject: RE: [GD-Windows] Restarting game exe > > > > > > > > Get your EXE path by getting the module path of your main module. > > > > Then use CreateProcess() to create the new process, and > > ExitProcess() your > > current process. > > > > If you're looking for "exec()" then there might be emulation of > > that, but the basic NT kernel primitive is somewhat different, so it > > won't be quite > > what you'd be used to from UNIX. > > > > Cheers, > > > > / h+ > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by BEA Weblogic Workshop > FREE Java Enterprise J2EE developer tools! > Get your free copy of BEA WebLogic Workshop 8.1 today. > http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > _______________________________________________ > Gamedevlists-windows mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=555 > ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click _______________________________________________ Gamedevlists-windows mailing list Gam...@li... https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=555 ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_idP47&alloc_id808&op=ick _______________________________________________ Gamedevlists-windows mailing list Gam...@li... https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows Archives: http://sourceforge.net/mailarchive/forum.php?forum_idU5 |
From: Grills, J. <jg...@so...> - 2004-09-09 02:19:16
|
hPrevInstance is always NULL in Win32 based systems. Our game creates a semaphore to know whether it's already running or not. You could check for it's existence, and block until it's gone (or some timer expires). HANDLE semaphore =3D CreateSemaphore(NULL, 0, 1, "MyApplicationName"); j -----Original Message----- From: gam...@li... [mailto:gam...@li...] On Behalf Of Dan Thompson Sent: Wednesday, September 08, 2004 8:29 PM To: gam...@li... Subject: Re: [email] RE: [GD-Windows] Restarting game exe Haven't tried this, but I'm sure there's a way to spin on the previous HINSTANCE that is passed in on WinMain - that is, if you are worried about dual execution. Something like if (hPrevInstance !=3D NULL) { // Can't remember what to use to get the module handle. // You may be able to just straight up do WaitForSingleObject(hPrevInstance, 100 /*timeout in case the other doesn't exit*/ ); // But that doesn't feel right. (be sure to check for timeout, in case the // user actually executed it twice } Something like that. There's probably a few steps to get the correct handle to Wait() on. -Dan ----- Original Message -----=20 From: "George Geczy (BattleGoat) (E-mail)" <ge...@ba...> To: <gam...@li...> Sent: Wednesday, September 08, 2004 6:05 PM Subject: [email] RE: [GD-Windows] Restarting game exe > Yeah, CreateProcess() was on the list of possibles (that and ShellExecute(), > though the latter is not available in Win98). It just seems a bit kludgy - > ie, for an unknown amount of time you have two instances of your game=20 > running, depending upon how Windows dishes out the execution. > > Maybe that's why I couldn't find a better way - there is no better way > :-) > > -- George. > > > - George Geczy > - Lead Programmer, BattleGoat Studios > - www.supremeruler2010.com > - "Designing the Next Generation of Intelligent Strategy Games" > > > > > -----Original Message----- > > From: gam...@li... > > [mailto:gam...@li...]On Behalf=20 > > Of Jon Watte > > Sent: Wednesday, September 08, 2004 5:45 PM > > To: gam...@li... > > Subject: RE: [GD-Windows] Restarting game exe > > > > > > > > Get your EXE path by getting the module path of your main module. > > > > Then use CreateProcess() to create the new process, and > > ExitProcess() your > > current process. > > > > If you're looking for "exec()" then there might be emulation of=20 > > that, but the basic NT kernel primitive is somewhat different, so it > > won't be quite > > what you'd be used to from UNIX. > > > > Cheers, > > > > / h+ > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by BEA Weblogic Workshop > FREE Java Enterprise J2EE developer tools! > Get your free copy of BEA WebLogic Workshop 8.1 today.=20 > http://ads.osdn.com/?ad_id=3D5047&alloc_id=3D10808&op=3Dclick > _______________________________________________ > Gamedevlists-windows mailing list=20 > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=3D555 > ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=3D5047&alloc_id=3D10808&op=3Dclick _______________________________________________ Gamedevlists-windows mailing list Gam...@li... https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=3D555 |
From: Dan T. <da...@ar...> - 2004-09-09 01:28:51
|
Haven't tried this, but I'm sure there's a way to spin on the previous HINSTANCE that is passed in on WinMain - that is, if you are worried about dual execution. Something like if (hPrevInstance != NULL) { // Can't remember what to use to get the module handle. // You may be able to just straight up do WaitForSingleObject(hPrevInstance, 100 /*timeout in case the other doesn't exit*/ ); // But that doesn't feel right. (be sure to check for timeout, in case the // user actually executed it twice } Something like that. There's probably a few steps to get the correct handle to Wait() on. -Dan ----- Original Message ----- From: "George Geczy (BattleGoat) (E-mail)" <ge...@ba...> To: <gam...@li...> Sent: Wednesday, September 08, 2004 6:05 PM Subject: [email] RE: [GD-Windows] Restarting game exe > Yeah, CreateProcess() was on the list of possibles (that and ShellExecute(), > though the latter is not available in Win98). It just seems a bit kludgy - > ie, for an unknown amount of time you have two instances of your game > running, depending upon how Windows dishes out the execution. > > Maybe that's why I couldn't find a better way - there is no better way :-) > > -- George. > > > - George Geczy > - Lead Programmer, BattleGoat Studios > - www.supremeruler2010.com > - "Designing the Next Generation of Intelligent Strategy Games" > > > > > -----Original Message----- > > From: gam...@li... > > [mailto:gam...@li...]On Behalf Of > > Jon Watte > > Sent: Wednesday, September 08, 2004 5:45 PM > > To: gam...@li... > > Subject: RE: [GD-Windows] Restarting game exe > > > > > > > > Get your EXE path by getting the module path of your main module. > > > > Then use CreateProcess() to create the new process, and > > ExitProcess() your > > current process. > > > > If you're looking for "exec()" then there might be emulation > > of that, but > > the basic NT kernel primitive is somewhat different, so it > > won't be quite > > what you'd be used to from UNIX. > > > > Cheers, > > > > / h+ > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by BEA Weblogic Workshop > FREE Java Enterprise J2EE developer tools! > Get your free copy of BEA WebLogic Workshop 8.1 today. > http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > _______________________________________________ > Gamedevlists-windows mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=555 > |
From: George G. \(BattleGoat\) \(E-mail\) <ge...@ba...> - 2004-09-09 01:05:21
|
Yeah, CreateProcess() was on the list of possibles (that and ShellExecute(), though the latter is not available in Win98). It just seems a bit kludgy - ie, for an unknown amount of time you have two instances of your game running, depending upon how Windows dishes out the execution. Maybe that's why I couldn't find a better way - there is no better way :-) -- George. - George Geczy - Lead Programmer, BattleGoat Studios - www.supremeruler2010.com - "Designing the Next Generation of Intelligent Strategy Games" > -----Original Message----- > From: gam...@li... > [mailto:gam...@li...]On Behalf Of > Jon Watte > Sent: Wednesday, September 08, 2004 5:45 PM > To: gam...@li... > Subject: RE: [GD-Windows] Restarting game exe > > > > Get your EXE path by getting the module path of your main module. > > Then use CreateProcess() to create the new process, and > ExitProcess() your > current process. > > If you're looking for "exec()" then there might be emulation > of that, but > the basic NT kernel primitive is somewhat different, so it > won't be quite > what you'd be used to from UNIX. > > Cheers, > > / h+ > |
From: Jon W. <hp...@mi...> - 2004-09-08 21:44:55
|
Get your EXE path by getting the module path of your main module. Then use CreateProcess() to create the new process, and ExitProcess() your current process. If you're looking for "exec()" then there might be emulation of that, but the basic NT kernel primitive is somewhat different, so it won't be quite what you'd be used to from UNIX. Cheers, / h+ -----Original Message----- From: gam...@li... [mailto:gam...@li...]On Behalf Of George Geczy (BattleGoat) (E-mail) Sent: Wednesday, September 08, 2004 2:28 PM To: gam...@li... Subject: [GD-Windows] Restarting game exe I thought this would be a really easy thing to do, but for some reason I can't seem to trip on the right functions. I want to give an option to restart the game 'from the top' to re-initialize resolution, graphics etc, so I thought I would just exit the app and re-launch the EXE. But I can't really see what would be the best way to do this. Is there something that I'm missing as far as an 'exit and then start up another exe' command, or what would be the best way to do this without messing things up? -- George. - George Geczy - Lead Programmer, BattleGoat Studios - www.supremeruler2010.com - "Designing the Next Generation of Intelligent Strategy Games" ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click _______________________________________________ Gamedevlists-windows mailing list Gam...@li... https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=555 |
From: George G. \(BattleGoat\) \(E-mail\) <ge...@ba...> - 2004-09-08 21:37:03
|
In the old days this was a great idea, of course, but the customer support issues have now far outweighed the benefits. Memory is cheap, telephone support is not :-) And on top of incompatible dll update versions and other stability issues, there is the whole new ballgame of security. So to the original question - yes, everyone is intended to keep their own DLLs, and in their own directories. -- George. - George Geczy - Lead Programmer, BattleGoat Studios - www.supremeruler2010.com - "Designing the Next Generation of Intelligent Strategy Games" > -----Original Message----- > From: gam...@li... > [mailto:gam...@li...]On Behalf Of > Jon Watte > Sent: Wednesday, September 08, 2004 4:30 PM > To: gam...@li... > Subject: RE: [GD-Windows] Mysterious DLL's > > > > There days, MS has pretty much capitulated on the "sharing" aspect. > > http://msdn.microsoft.com/library/default.asp?url=/library/en- > us/dnsetup/htm > l/dlldanger1.asp > http://msdn.microsoft.com/library/default.asp?url=/library/en- > us/dnsetup/htm > l/sidebyside.asp > > Cheers, > > / h+ > > > -----Original Message----- > From: gam...@li... > [mailto:gam...@li...]On Behalf Of > Chris Raine > Sent: Wednesday, September 08, 2004 1:21 PM > To: gam...@li... > Subject: [GD-Windows] Mysterious DLL's > > > Coming from a console background and being more of a > 3D-programmer than > a systems coder, I had a quite confusing moment today. After > finishing a > large chunk of rendering code I decided to try out my code on other > machines before checking in - with the result that every > machine without > visual studio installed complained about missing dlls (msvcp71.dll and > msvcr71.dll in particular). A quick search for files showed > that several > programs (photoshop, etc) all include their own copies of these and > other dlls in their own directories. > > What is the sense of having a dynamically linked lib if every program > provides it's own copy? Back in the old days of my unix/linux > background > I thought dll meant one image of the instruction code of the lib in > memory for multiple programs - by providing several copies of the same > library this benefit is destroyed. > > Another question I had today was if I were to distribute my > program, am > I to include my own copies of the same libraries as other programs do, > or is there any common practice I missed for dealing with these dlls? > > I hope these questions are not too simple - MSDN had provided > me with a > wealth of information regarding everything, except answers to my > specific questions. > > > many thanks, > Chris |
From: George G. \(BattleGoat\) \(E-mail\) <ge...@ba...> - 2004-09-08 21:28:26
|
I thought this would be a really easy thing to do, but for some reason I can't seem to trip on the right functions. I want to give an option to restart the game 'from the top' to re-initialize resolution, graphics etc, so I thought I would just exit the app and re-launch the EXE. But I can't really see what would be the best way to do this. Is there something that I'm missing as far as an 'exit and then start up another exe' command, or what would be the best way to do this without messing things up? -- George. - George Geczy - Lead Programmer, BattleGoat Studios - www.supremeruler2010.com - "Designing the Next Generation of Intelligent Strategy Games" |
From: mike w. <mi...@ge...> - 2004-09-08 21:21:26
|
yeah the big issue is when people install programs that use older versions of said dll's - if windows loads a previous 'older' version into memory, it causes all kinds of issues. even though it MIGHT be the same dll name, it might not be the same date of build. i recall this being a major problem with the vbrun300.dll and similar dll's 'way back when'. i worked tech support for a visual basic CRM application at the time and we had never ending problems with people having multiple copies of dll's all over the machine and windows not unloading them properly... we do ship these particular dll's with our own engine runtime, simply for this very reason - there is a chance that someone doesn't have it, or simply doesn't have them in their system path, so better safe than sorry, ship it if your app needs it. cheers mike w www.gekidodesigns.com Jon Watte wrote: > There days, MS has pretty much capitulated on the "sharing" aspect. > > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsetup/htm > l/dlldanger1.asp > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsetup/htm > l/sidebyside.asp > > Cheers, > > / h+ > > > -----Original Message----- > From: gam...@li... > [mailto:gam...@li...]On Behalf Of > Chris Raine > Sent: Wednesday, September 08, 2004 1:21 PM > To: gam...@li... > Subject: [GD-Windows] Mysterious DLL's > > > Coming from a console background and being more of a 3D-programmer than > a systems coder, I had a quite confusing moment today. After finishing a > large chunk of rendering code I decided to try out my code on other > machines before checking in - with the result that every machine without > visual studio installed complained about missing dlls (msvcp71.dll and > msvcr71.dll in particular). A quick search for files showed that several > programs (photoshop, etc) all include their own copies of these and > other dlls in their own directories. > > What is the sense of having a dynamically linked lib if every program > provides it's own copy? Back in the old days of my unix/linux background > I thought dll meant one image of the instruction code of the lib in > memory for multiple programs - by providing several copies of the same > library this benefit is destroyed. > > Another question I had today was if I were to distribute my program, am > I to include my own copies of the same libraries as other programs do, > or is there any common practice I missed for dealing with these dlls? > > I hope these questions are not too simple - MSDN had provided me with a > wealth of information regarding everything, except answers to my > specific questions. > > > many thanks, > Chris > > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by BEA Weblogic Workshop > FREE Java Enterprise J2EE developer tools! > Get your free copy of BEA WebLogic Workshop 8.1 today. > http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > _______________________________________________ > Gamedevlists-windows mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=555 > > |
From: Jon W. <hp...@mi...> - 2004-09-08 20:30:30
|
There days, MS has pretty much capitulated on the "sharing" aspect. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsetup/htm l/dlldanger1.asp http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsetup/htm l/sidebyside.asp Cheers, / h+ -----Original Message----- From: gam...@li... [mailto:gam...@li...]On Behalf Of Chris Raine Sent: Wednesday, September 08, 2004 1:21 PM To: gam...@li... Subject: [GD-Windows] Mysterious DLL's Coming from a console background and being more of a 3D-programmer than a systems coder, I had a quite confusing moment today. After finishing a large chunk of rendering code I decided to try out my code on other machines before checking in - with the result that every machine without visual studio installed complained about missing dlls (msvcp71.dll and msvcr71.dll in particular). A quick search for files showed that several programs (photoshop, etc) all include their own copies of these and other dlls in their own directories. What is the sense of having a dynamically linked lib if every program provides it's own copy? Back in the old days of my unix/linux background I thought dll meant one image of the instruction code of the lib in memory for multiple programs - by providing several copies of the same library this benefit is destroyed. Another question I had today was if I were to distribute my program, am I to include my own copies of the same libraries as other programs do, or is there any common practice I missed for dealing with these dlls? I hope these questions are not too simple - MSDN had provided me with a wealth of information regarding everything, except answers to my specific questions. many thanks, Chris |
From: Chris R. <c....@gm...> - 2004-09-08 20:05:37
|
Coming from a console background and being more of a 3D-programmer than a systems coder, I had a quite confusing moment today. After finishing a large chunk of rendering code I decided to try out my code on other machines before checking in - with the result that every machine without visual studio installed complained about missing dlls (msvcp71.dll and msvcr71.dll in particular). A quick search for files showed that several programs (photoshop, etc) all include their own copies of these and other dlls in their own directories.=20 What is the sense of having a dynamically linked lib if every program provides it's own copy? Back in the old days of my unix/linux background I thought dll meant one image of the instruction code of the lib in memory for multiple programs - by providing several copies of the same library this benefit is destroyed.=20 Another question I had today was if I were to distribute my program, am I to include my own copies of the same libraries as other programs do, or is there any common practice I missed for dealing with these dlls? I hope these questions are not too simple - MSDN had provided me with a wealth of information regarding everything, except answers to my specific questions.=20 many thanks, Chris=20 |
From: Jon W. <hp...@mi...> - 2004-09-06 15:40:15
|
LUA does not use a JIT, so that's not what it is. Bytecodes are not native x86 instructions; they're just data that the LUA interpreter loop reads and (basically) does a big switch on. Further, the DEP is implemented using hardware traps, the same way as non-writable (or non-mapped) memory is. Thus, the OS doesn't need to spend extra time on it; it flips a bit in the page table, and if you ever try to execute on that page, the CPU will get an interrupt, similar to a segv if you write to un-mapped memory. Sadly, only the very newest, most expensive CPUs support the executable permission bit on the x86 architecture, so most CPUs don't have the ability to trap data execution. Thus, Microsoft added something they call Software-enforced data execution prevention. However, that code only gets run when an exception is triggered (SegV, etc), AND if the binary that triggers the exception is re-compiled to support the checks; all this does is making sure that the exception handler is an address that's a bona fide function export from your binary. If the idle thread is busy, it means that your process is blocked on some blocking primitive (synchronization somewhere) held by some other process. Thus, if there's a high idle CPU utilization, try removing specific calls to Windows APIs until the problem goes away; then you know what changed. Cheers, / h+ -----Original Message----- From: gam...@li... [mailto:gam...@li...]On Behalf Of Brett Bibby Sent: Monday, September 06, 2004 4:12 AM To: gam...@li... Subject: Re: [GD-Windows] XP2 slowdowns? I came across this: http://www.microsoft.com/technet/prodtechnol/winxppro/maintain/sp2mempr.mspx Since our game is script driven (Lua) I'm wondering if that other 50% of Windows CPU time is being used to check the execute permissions of the software Data Execution Prevention (DEP) permission? It specifically cautions JIT code may be broken. We don't mark the page block as executable and load the Lua bytecodes into RAM allocated form the heap. Has anybody else using scripts noticed any performance penalties? Can anybody see any reason why the DEP could be the cause? Thanks, Brett ----- Original Message ----- From: "mike wuetherick" <mi...@ge...> To: <gam...@li...> Sent: Monday, September 06, 2004 12:06 PM Subject: Re: [GD-Windows] XP2 slowdowns? > i've read other reports online about similar slowdowns related to sp2, but > nothing pointing to a specific issue. > > i think it's just windows twiddling with the swap file and other crap - > there needs to be a way to tell windows 'the computer is busy now, dont do > anything until further notice'...i've seen situations where windows > decides to random start defragging mid-game that type of thing. > > just idiotic behavior from such a so-called 'smart os' but i digress. > > unfortunately the only way to probably fix this is to shut down services > that are running maintenance or whatever, which isn't exactly an > 'end-user' fix... > > we updated one machine to sp2 and it was an all-day nightmare, haven't > even considered putting it onto anything else yet. > > the college i teach at isn't going near it for a long time i know as well. > > mike w > www.realityfactory.ca > > Brett Bibby wrote: > >> Hello, >> We upgraded some of our development machines using XP to SP2 and the >> upgraded machines _sometimes_ run our game slower now. When I watch the >> processes while the game runs, the game frequently drops to 20-50% of >> CPU, with the windows idle occupying the other 50%, so our game is >> sometimes not consuming as much of the CPU as desired. Has anybody else >> noticed any speed problems with their games? >> Thanks, >> Brett >> > > > ------------------------------------------------------- > This SF.Net email is sponsored by BEA Weblogic Workshop > FREE Java Enterprise J2EE developer tools! > Get your free copy of BEA WebLogic Workshop 8.1 today. > http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > _______________________________________________ > Gamedevlists-windows mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=555 ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click _______________________________________________ Gamedevlists-windows mailing list Gam...@li... https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=555 |
From: Eero P. <epa...@ko...> - 2004-09-06 15:25:44
|
Brett Bibby wrote: > I came across this: > http://www.microsoft.com/technet/prodtechnol/winxppro/maintain/sp2mempr.mspx > > > Since our game is script driven (Lua) I'm wondering if that other 50% of > Windows CPU time is being used to check the execute permissions of the > software Data Execution Prevention (DEP) permission? It specifically > cautions JIT code may be broken. We don't mark the page block as > executable and load the Lua bytecodes into RAM allocated form the heap. > Lua doesn't use JIT compilation (please tell if there is a JIT compiler version of Lua). So I don't see how this could be an issue. For the OS and the processor the Lua interpreter is normal executable code, and the actual Lua script is just plain data (non-executable) Eero |
From: Brett B. <res...@ga...> - 2004-09-06 11:09:17
|
I came across this: http://www.microsoft.com/technet/prodtechnol/winxppro/maintain/sp2mempr.mspx Since our game is script driven (Lua) I'm wondering if that other 50% of Windows CPU time is being used to check the execute permissions of the software Data Execution Prevention (DEP) permission? It specifically cautions JIT code may be broken. We don't mark the page block as executable and load the Lua bytecodes into RAM allocated form the heap. Has anybody else using scripts noticed any performance penalties? Can anybody see any reason why the DEP could be the cause? Thanks, Brett ----- Original Message ----- From: "mike wuetherick" <mi...@ge...> To: <gam...@li...> Sent: Monday, September 06, 2004 12:06 PM Subject: Re: [GD-Windows] XP2 slowdowns? > i've read other reports online about similar slowdowns related to sp2, but > nothing pointing to a specific issue. > > i think it's just windows twiddling with the swap file and other crap - > there needs to be a way to tell windows 'the computer is busy now, dont do > anything until further notice'...i've seen situations where windows > decides to random start defragging mid-game that type of thing. > > just idiotic behavior from such a so-called 'smart os' but i digress. > > unfortunately the only way to probably fix this is to shut down services > that are running maintenance or whatever, which isn't exactly an > 'end-user' fix... > > we updated one machine to sp2 and it was an all-day nightmare, haven't > even considered putting it onto anything else yet. > > the college i teach at isn't going near it for a long time i know as well. > > mike w > www.realityfactory.ca > > Brett Bibby wrote: > >> Hello, >> We upgraded some of our development machines using XP to SP2 and the >> upgraded machines _sometimes_ run our game slower now. When I watch the >> processes while the game runs, the game frequently drops to 20-50% of >> CPU, with the windows idle occupying the other 50%, so our game is >> sometimes not consuming as much of the CPU as desired. Has anybody else >> noticed any speed problems with their games? >> Thanks, >> Brett >> > > > ------------------------------------------------------- > This SF.Net email is sponsored by BEA Weblogic Workshop > FREE Java Enterprise J2EE developer tools! > Get your free copy of BEA WebLogic Workshop 8.1 today. > http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click > _______________________________________________ > Gamedevlists-windows mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=555 |
From: mike w. <mi...@ge...> - 2004-09-06 04:06:33
|
i've read other reports online about similar slowdowns related to sp2, but nothing pointing to a specific issue. i think it's just windows twiddling with the swap file and other crap - there needs to be a way to tell windows 'the computer is busy now, dont do anything until further notice'...i've seen situations where windows decides to random start defragging mid-game that type of thing. just idiotic behavior from such a so-called 'smart os' but i digress. unfortunately the only way to probably fix this is to shut down services that are running maintenance or whatever, which isn't exactly an 'end-user' fix... we updated one machine to sp2 and it was an all-day nightmare, haven't even considered putting it onto anything else yet. the college i teach at isn't going near it for a long time i know as well. mike w www.realityfactory.ca Brett Bibby wrote: > Hello, > We upgraded some of our development machines using XP to SP2 and the > upgraded machines _sometimes_ run our game slower now. When I watch the > processes while the game runs, the game frequently drops to 20-50% of > CPU, with the windows idle occupying the other 50%, so our game is > sometimes not consuming as much of the CPU as desired. Has anybody else > noticed any speed problems with their games? > Thanks, > Brett > |
From: Brett B. <res...@ga...> - 2004-09-06 00:44:54
|
Hello, We upgraded some of our development machines using XP to SP2 and the upgraded machines _sometimes_ run our game slower now. When I watch the processes while the game runs, the game frequently drops to 20-50% of CPU, with the windows idle occupying the other 50%, so our game is sometimes not consuming as much of the CPU as desired. Has anybody else noticed any speed problems with their games? Thanks, Brett |
From: Jon W. <hp...@mi...> - 2004-08-29 22:11:56
|
I'm not sure you can get an event like that. However, what I do is to put an upper limit on the amount of time that I will progress based on real time between steps. I put a wrapper in front of the real time clock, and this wrapper adds an adjustable delta to the time actually returned. Then, in the main loop, I'll do something like: static double then = 0; double now = myClock.time(); double deltaTime = now - then; if( deltaTime > 0.1 ) { myClock.adjust( deltaTime ); deltaTime = 0.05; } ... advance animations by deltaTime ... double ClockClass::time() { return readRealClock() - adjustDelta_; } void ClockClass::adjust( double delta ) { adjustDelta_ += delta; } The side effect is that, if the frame rate falls lower than 10 fps, then animations will play in automatic slow-motion. However, this is somewhat useful -- I'll know for sure what the problem is when users report "things run in slow motion" ;-) Cheers, / h+ -----Original Message----- From: gam...@li... [mailto:gam...@li...]On Behalf Of Tham Sent: Saturday, August 28, 2004 8:34 PM To: gam...@li... Subject: [GD-Windows] Catching Break Point event... Hi, How can my C# application receive an event (or any sort of notification) when it hits a break point? I need to be notified because i have a real time clock that drives my time-delta based animation and i need to stop it and resume it from where i left off to avoid driving my animation way ahead when i return. many thanks tham ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click _______________________________________________ Gamedevlists-windows mailing list Gam...@li... https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=555 |
From: Tham <th...@ga...> - 2004-08-29 03:34:15
|
Hi, How can my C# application receive an event (or any sort of notification) when it hits a break point? I need to be notified because i have a real time clock that drives my time-delta based animation and i need to stop it and resume it from where i left off to avoid driving my animation way ahead when i return. many thanks tham |
From: Brian H. <ho...@bo...> - 2004-08-25 20:03:21
|
> What are you trying to accomplish? You could listen for > WM_NCLBUTTONUP or whatever it's called. Basically just trying to figure out when the window has been done being reshaped. I think I have it working now. In true Internet mailing list fashion, it stopped giving me problems ~30 seconds after I sent my e-mail =3D) Brian |