Getting Ready for Windows Vista® Kev Gee Microsoft® Game Technology Group 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary. Windows Vista Highlights • Desktop uses Direct3D 9 – Shader Model 2.0 • New display and audio driver models • User Account Control (aka LUA/UAP) 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary. Windows Vista for Gamers •Direct3D 10 • Game Explorer • Parental Controls 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary. Developing for Windows Vista • Ideally develop using Visual Studio 2005 – Compile settings should include the following flags • /W4 for Warning Level 4 • /Wp64 for 64 bit compilation warnings • /GS for stack checking for buffer overrun elimination • /SafeSEH for Safe Structured Exception Handling (when relevant) – VS 2003 requires BufferOverflowU.lib to link with Vista libs • Use StringCchPrintf, etc rather than unsafe routines – strcpy(), sprintf(), strcat(), strncpy() are unsecure – Use strsafe.h • Use the latest available Beta OS and SDK versions – (DirectX / Windows Platform SDK) 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary. Feature Agenda • Game Explorer • Account Privilege and Parental Controls • Application Compatibility • Installation & Patching • Windows Best Practices 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary. Games Explorer • Linked directly off the Start menu • Displays games installed on the system • Displays meta-data such as developer, publisher, various ratings, links, etc. • Parental controls system can lock out some games based on rating if enabled • Basic information including rating is already provided for many legacy titles (~2000) 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary. 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary. 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary. 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary. Games Definition File • A title provides meta-data through a piece of XML called a Game Definition File (GDF) • The GDF is embedded as a resource into a binary (exe or dll) – Thumbnail image must be also embedded in the same binary • Game Definition File Editor tool in the DirectX SDK 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary. Aside: Code signing • GDF containing binary must have a valid Authenticode signing to provide a rating • Great security measure to ensure bits you ship are the bits a user has on their machine – Works on exe, dll, msi/msp, cab files – Windows XP presents this data in many places – Windows Vista relies on this even more • Verisign ID required to access WinQual data • See DirectX Documentation topic Authenticode Signing for Game Developers 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary. Game Explorer Integration •Use IGameExplorer COM object to register the GDF- containing binary during install/patch • Use the COM object to double-check ratings access in your game’s startup (VerifyAccess) • GE can show saved games with thumbnails – Prepending a structure at the beginning of your save game files – Support command-line launch with a save game file – Depends on the existing extension/shell launch system – Use a unique extension for your save game files! • See the DirectX Documentation topic “Windows Game Explorer Integration” and GE documentation 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary. Feature Agenda • Game Explorer • Account Privilege and Standard Users • Application Compatibility • Installation & Patching • Windows Best Practices 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary. Account Privilege • User Account Control (UAC) – Key security feature in Windows Vista • “Standard User” – New name for Restricted User (LUA) on Windows XP – Does not have full access to the system • Read only to most of the hard drive and registry • Can only write to per-user and specific common areas • Cannot install drivers, start/stop services, change Firewall settings – Changes in the OS make heavy use of this • Every account on the system runs most processes as “Standard User”! 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary. Account Privilege Elevation • “Administrator” – A user with administrator privileges can elevate a process to run at ‘admin’ level • Must happen when the process is created! • The system prompts every time you launch the app • Child processes do inherit the elevation – UAC may detects common exe names that require admin rights (SETUP.EXE, etc.) – Don’t Rely on this feature, be explicit with your apps. • Executables can be marked in a manifest to require ‘admin’ privileges • User can also explicitly use “Run As…” 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary. Supporting UAC • Follow all the guidance for Limited User Accounts on Windows XP! • Parental Controls only enforced on “Standard User” accounts – i.e. a controlled account cannot have any admin rights – If your game requires admin privileges to run, it cannot be played by accounts with Parental Controls active • See the article Gaming with Least-Privileged User Accounts in the DirectX SDK 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary. Files and Standard Users •The SHGetFolderPath() API returns the correct locations for classes of file access C:\Documents and Settings \username CSIDL_LOCAL_APPDATA \Local Settings\ApplicationData • Works on XP, including 64 bit versions C:\Documents and Settings\All Users\ CSIDL_COMMON_ APPDATA – Vista also provides an Application Data SHGetFolderPathEX() version C:\Documents and Settings\username CSIDL_PERSONAL \My Documents C:\Documents and Settings\All Users CSIDL_COMMON_ DOCUMENTS \Documents • Do NOT make assumptions CSIDL_PROGRAM_FILES C:\Program Files about these paths. CSIDL_PROGRAM_FILES_COMMO C:\Program Files\Common • For example, on 64-bit Windows N the program files path is – “C:\Program Files (x86)” for 32-bit programs – “C:\Program Files” for 64-bit programs and might not be on the C drive! 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary. Standard User Registry Access • Your installer can write information to HKEY_LOCAL_MACHINE – But your title cannot modify those entries – (since it requires Admin privilege to install) • Registry will map HKEY_CURRENT_USER to a different hive depending on the active account 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary. Windows Firewall • Windows Firewall is on by default to protect users • Standard Users require elevation to add apps to the Firewall exception list • When you need to, add an entry to the Firewall exception list. • Best to register during game install. – Note: Only requires configuration for a server or peer-to-peer scenario, works as-is for pure clients See the “Games and Firewalls” article in the DX SDK updates for more details 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary. Agenda • Game Explorer • Account Privilege • Application Compatibility • Installation & Patching • Windows Best Practices 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary. Application Compatibility • Windows Vista is compatible with most existing Windows applications • Common compatibility concerns for games – x64 Edition – Media Center Edition –Multicore – Legacy APIs • Current and upcoming technical articles in the DirectX SDK address these in detail 2004 Microsoft Corporation. All
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages36 Page
-
File Size-