Go Back   Zune Boards > Zune Discussions > Zune Games and Applications > Development Discussions

Development Discussions All developers who are coding games may stop by here for any help, suggestions, and everything development related.

Closed Thread
 
Thread Tools
Old 06-30-2011, 10:09 AM   #1
SirCmpwn
Zewbie
 
SirCmpwn's Avatar
 
Join Date: Jun 2011
Posts: 7
SirCmpwn is on a distinguished road
Default Disabling Reboot

Hello,
I've been looking through the source code for several OpenZDK apps, and I stumbled across this:
Code:
void SuppressReboot()
{
  HKEY key = NULL;
  HRESULT hr = S_OK;
  DWORD value;

  if (SUCCEEDED(hr))
    hr = HRESULT_FROM_WIN32(RegOpenKeyEx(HKEY_LOCAL_MACHINE, L"System\\CurrentControlSet\\Control\\Power\\State\\Reboot", 0, 0, &key));
  if (SUCCEEDED(hr))
    hr = HRESULT_FROM_WIN32(RegSetValueEx(key, L"Flags", 0, REG_DWORD, (BYTE *)&(value = 0x10000), sizeof(DWORD)));
  if (SUCCEEDED(hr))
    hr = HRESULT_FROM_WIN32(RegSetValueEx(key, L"Default", 0, REG_DWORD, (BYTE *)&(value = 0), sizeof(DWORD)));
  if (key)
    RegCloseKey(key);
}
This appears to stop the Zune from rebooting when the game exits. Could a similar method be used to enable the playback of DRM protected music?



SirCmpwn is offline  

Advertisement [Remove Advertisement]

Old 06-30-2011, 03:09 PM   #2
Netrix
Purger of Ignorance
Development Front
Retired Staff
Super ZunerĀ²
 
Netrix's Avatar
 
Join Date: Jun 2008
Location: In my own world
Posts: 4,268
Netrix has much to be proud ofNetrix has much to be proud ofNetrix has much to be proud ofNetrix has much to be proud ofNetrix has much to be proud ofNetrix has much to be proud ofNetrix has much to be proud of
Send a message via MSN to Netrix
Default

No. Once it is disabled, it can not be enabled again until the Zune is rebooted.




Netrix is offline  

Old 06-30-2011, 04:04 PM   #3
enterflux
Graduate Zuner
 
enterflux's Avatar
 
Join Date: Jul 2010
Location: Arkansas
Posts: 1,371
enterflux is a name known to allenterflux is a name known to allenterflux is a name known to allenterflux is a name known to allenterflux is a name known to all
Default

Solved and ?



enterflux is offline  

Old 06-30-2011, 04:17 PM   #4
Netrix
Purger of Ignorance
Development Front
Retired Staff
Super ZunerĀ²
 
Netrix's Avatar
 
Join Date: Jun 2008
Location: In my own world
Posts: 4,268
Netrix has much to be proud ofNetrix has much to be proud ofNetrix has much to be proud ofNetrix has much to be proud ofNetrix has much to be proud ofNetrix has much to be proud ofNetrix has much to be proud of
Send a message via MSN to Netrix
Default

Quote:
Originally Posted by Jay View Post
Solved and ?
Yeah. Nothing like that can be used to fix the DRM issue.




Netrix is offline  

Old 06-30-2011, 04:28 PM   #5
enterflux
Graduate Zuner
 
enterflux's Avatar
 
Join Date: Jul 2010
Location: Arkansas
Posts: 1,371
enterflux is a name known to allenterflux is a name known to allenterflux is a name known to allenterflux is a name known to allenterflux is a name known to all
Default

Solved and



enterflux is offline  

Closed Thread

Bookmarks

Thread Tools
no new posts