Book Support

Home | Search | X-Zone News | Services | Book Support | Links | Feedback | Smalltalk MT | The Scrapyard | FAQ | Technical Articles

 

Sam's
Teach Yourself DirectX 7 Programming
in 24 Hours

Support Information

Provided by co-author Robert Dunlop

Since the recent release of this title, there are issues that have have become apparent due to reader feedback.  While these may be corrected in future releases of the book, this area is provided as a source of product updates for our readers.  Hopefully any issues you may have encountered are covered here... if not, please write me at rdunlop@mvps.org and I will do what I can to provide a solution, including publishing required updates here.

Thanks for your support and feedback,

    Robert Dunlop.

Topics

Updates Support Update Mailing List
Known Problems Error Executing Release Build in Hour 5
Legacy Source Code Updates
Missing STDAFX files in Hour 3
Compiler and Linker Errors in Hour 12 Sample
"CreateSurface FAILED" Error in Samples
Incorrect File Pointers in Hour 9 Project
Source Material Media Files for Samples
Sample Source Code
Other Common Issues Error Linking to D3DIM.LIB with DX8 SDK Installed
Undeclared Identified DirectInputCreate with DX8 SDK Installed
Where can I find DirectMusic Producer?

Support Update Mailing List

To keep up to date on changes to this page, sign up to be notified of updates using the form below.

Subscribe - Yes, I want to recieve the Support Newsletter at the e-mail address listed below
Unsubscribe - Please remove this e-mail address from the mailing list

E-mail Address  

           

Back to Index

Incorrect File Pointers in Hour 9 Project

The project and desktop files included for the Hour 9 sample on the CD incorrectly point to the source files for the Hour 7 sample.  The file included below corrects this.

hour9.zip

Special thanks to Antonio Sanchez for bringing this to our attention.

Error Linking to D3DIM.LIB with DX8 SDK Installed

After installing the DirectX 8 SDK, you may recieve the following error when compiling some samples:

LINK : fatal error LNK1104: cannot open file "d3dim.lib"

This is because the library for Direct3D Immediate Mode (now called DirectGraphics) has been renamed as D3D8.LIB.  To correct this, open "Settings..." in the Project menu, and click on the Link tab.  Set the Category to "General", and locate the entry in the "Object/library modules" field for D3DIM.LIB, as shown below:

Replace this entry with D3D8.LIB, and re-compile.

Back to Index

Error Executing Release Build in Hour 5

When attempting to run a release build of the Hour 5 sample, you may encounter the following error:

This is caused by the working directory in the project settings being an absolute directory.  To fix this, go to "Projects..." > "Settings..." and click on the debug tab.  Delete the text from the "Working Directory" field and rebuild the application.

Back to Index

Media Files for Samples

Some of our readers have the book in electronic format, such as those who purchased the Game Programming Starter Kit.  For these readers, I have set up a section containing the media files used by the sample applications.

Click Here to go to the media files section

Back to Index

Sample Source Code

The files listed below provide complete source for each chapter.  Note that these differ from the other ZIP files linked on this page, which contain only those files needed to patch the sample code.

Hour 2

Hour 9

Hour 16

Hour 3

Hour 12

Hour 17

Hour 4

Hour 13

Hour 19

Hour 5

Hour 14

Hour 7

Hour 15

Back to Index

Legacy Source Code Updates

The first item to come to my attention is that, while the source code in the book is written around DirectX 7, the source code for Hours 2 through 5 on the accompanying CD-ROM is not.  Unfortunately, early versions of my samples that were written prior to availability of a DX 7 beta have made there way onto the disk, and were  written under DX 6.1.  Below are the updated files required to change these samples over to DX 7.

hour2.zip   hour3.zip   hour4.zip   hour5.zip

Back to Index

Missing STDAFX files in Hour 3

The files STDAFX.H and STDAFX.CPP are missing from the CD-ROM source code for Hour 3.  They can be found in the file provided below (identical to file of same name in prior topic).

hour3.zip

Back to Index

Compiler and Linker Errors in Hour 12 Sample

The sample code in Hour 12 contains the following problems:

bullet

The project file attempts to connect to a non-existing Source Safe database

bullet

The D3DUTIL and D3DMATH sources are outdated

bullet

The project options for Release Build expect a pre-compiled header for D3DUTIL and D3DMATH

The archive below provides the necessary files to correct the sample source code. 

hour12.zip

Back to Index

"CreateSurface FAILED" Error in Samples

Some of the samples (Hours 3-5) using flipping surfaces in DirectDraw may result in the error CreateSurface FAILED.  There are actually two places that this message can be generated:

1. If creation of the primary surface through CreateSurface() fails

2. If the call to GetAttachedSurface(), used to retrieve a pointer to the back buffer, fails.

To clarify program errors, the updated source code samples on this page separate these into separate error messages.  However, if you are receiving this error in the existing samples, chances are this is occurring after the call to GetAttachedSurface().

This is a result of a change in DirectX which requires the contents of  the DDSCAPS2 structure to be cleared before use, thus removing undefined data in unused members of the structure.  Simply adding a ZeroMemory() call after the structure is first defined will correct this problem:

DDSCAPS2 ddscaps;
ZeroMemory(&ddscaps,sizeof(ddscaps));

Back to Index

Undeclared Identified DirectInputCreate with DX8 SDK Installed

To compile source code using previous version of DirectInput under the DirectX 8 SDK, you need to set the constant DIRECTINPUT_VERSION prior to inclusion of the DirectInput header file:

#define DIRECTINPUT_VERSION 0x0700
#include <dinput.h>

The value of DIRECTINPUT_VERSION can be set to 0x0300, 0x0400, or 0x0700, to indicate the SDK version the code will be compiled for.

Back to Index

Where can I find DirectMusic Producer?

DirectMusic producer is not installed automatically with the SDK, though it is bundled with the development kit.  You can find it on the CD which accompanies the book, in the following directory:

\DirectX\DXF\essentls\dmusprod

Back to Index

This site, created by DirectX MVP Robert Dunlop and aided by the work of other volunteers, provides a free on-line resource for DirectX programmers.

Special thanks to WWW.MVPS.ORG, for providing a permanent home for this site.

Visitors Since 1/1/2000: Hit Counter
Last updated: 07/26/05.