GuiAviBitmapCtrl w/ DirectShow event support
by Todd D. Degani · 05/26/2005 (11:23 pm) · 39 comments
Download Code File
The code for the control is a modified version of the GuiAviBitmapCtrl code contributed by Tim Heldna. I believe Tim's changes were based on the changes to the control implemented by John Vanderbeck.
This code has been tested on a stock version 1.3 build of TGE on Windows.
This has not been tested on Linux or MacOS.
This control closes the playing AVI on mouse click, on key press, and when the movie has fully played.
To determine when a movie has finished playing works like this:
- DirectShow starts and begins sending event notifications to the game window
- The game window receives these messages, packs them into an event, and posts them to the game
- When the game receives these messages it looks to see if the EC_COMPLETE was reveived. If it was it calls movieClose on the control whose id corresponds to the id passed in from the event
Remember to backup your original files before proceeding!
Installation:
Engine:
To manually patch the engine check each of files included in the zip. My changes are clearly marked with "// TDD" before them and with "//---------------" afterwards.
Otherwise you can just unzip the .cc and .h files into your engine directory and recompile.
/engine/game:
demoGame.h
main.cc
/engine/platform:
event.h
gameInterface.cc
gameInterface.h
/engine/platformWin32:
winWindow.cc
Note: This file also contains the following excellent resources by Brandon Maness
Fix cursor disappearing on title bar
Fix Strange position on window focus
These two files for the actual control are based on Tim Heldna's revisions of the controls. I highly suggest simply overwriting your current version of these files unless you have made modifications to these files which you wish to keep. I'm sure it would be a pretty nasty merge.
/engine/gui:
guiAviBitmapCtrl.cc
guiAviBitmapCtrl.h
Scripts:
These scripts will play the avi from introMovie1, then the avi from introMovie2, then go to the main menu.
If you press a key or click the mouse you will skip past the currently playing movie. If you just let them play then the movies will play till completion then continue on.
MovieBackground.png is just a 1x1 black png that is stretched across the canvas so that if the video is smaller than the screen resolution something will be rendered in the "empty" area.
Again, remember to backup your original files before proceeding!
Copy these files to /starter.fps/client/ui:
introMovie1.cs
introMovie2.cs
StartupGui.gui
movieBackground.png
Now just change the paths to the avi files in introMovie1 & introMovie2 scripts to point to point to the movie(s) you want to display.
*** Changelist ***
Date: 5/12/2005 - Original Checkin
The code for the control is a modified version of the GuiAviBitmapCtrl code contributed by Tim Heldna. I believe Tim's changes were based on the changes to the control implemented by John Vanderbeck.
This code has been tested on a stock version 1.3 build of TGE on Windows.
This has not been tested on Linux or MacOS.
This control closes the playing AVI on mouse click, on key press, and when the movie has fully played.
To determine when a movie has finished playing works like this:
- DirectShow starts and begins sending event notifications to the game window
- The game window receives these messages, packs them into an event, and posts them to the game
- When the game receives these messages it looks to see if the EC_COMPLETE was reveived. If it was it calls movieClose on the control whose id corresponds to the id passed in from the event
Remember to backup your original files before proceeding!
Installation:
Engine:
To manually patch the engine check each of files included in the zip. My changes are clearly marked with "// TDD" before them and with "//---------------" afterwards.
Otherwise you can just unzip the .cc and .h files into your engine directory and recompile.
/engine/game:
demoGame.h
main.cc
/engine/platform:
event.h
gameInterface.cc
gameInterface.h
/engine/platformWin32:
winWindow.cc
Note: This file also contains the following excellent resources by Brandon Maness
Fix cursor disappearing on title bar
Fix Strange position on window focus
These two files for the actual control are based on Tim Heldna's revisions of the controls. I highly suggest simply overwriting your current version of these files unless you have made modifications to these files which you wish to keep. I'm sure it would be a pretty nasty merge.
/engine/gui:
guiAviBitmapCtrl.cc
guiAviBitmapCtrl.h
Scripts:
These scripts will play the avi from introMovie1, then the avi from introMovie2, then go to the main menu.
If you press a key or click the mouse you will skip past the currently playing movie. If you just let them play then the movies will play till completion then continue on.
MovieBackground.png is just a 1x1 black png that is stretched across the canvas so that if the video is smaller than the screen resolution something will be rendered in the "empty" area.
Again, remember to backup your original files before proceeding!
Copy these files to /starter.fps/client/ui:
introMovie1.cs
introMovie2.cs
StartupGui.gui
movieBackground.png
Now just change the paths to the avi files in introMovie1 & introMovie2 scripts to point to point to the movie(s) you want to display.
*** Changelist ***
Date: 5/12/2005 - Original Checkin
About the author
#22
On line 46 change of guiAviBitmapCtrl.h change
#include "gui/guiControl.h"
to:
#include "gui/core/guiControl.h"
On or around line 80 of guiAviBitmapCtrl.h change
textureHandle *mTextureHandles;
to:
GFXTexHandle *mTextureHandles;
That will sort out the compile error when using AVI video. You can find the same line for MPG if you wish and repeat change it also.
Then in guiAviBitmapCtrl.cc comment out line 16 #include "dgl/dgl.h", as we don't use dgl.h.
I also found the findwindow function at line 197 produces a new video window instead of rendering to the canvass so i commented out line 197 and uncommented out line 187 mWindow = GetForegroundWindow();
You can then compile your code and should have video support in TGEA. The real bulk of my time was spent getting the video gui to work. I found that using canvas.pushdialog crashes the program. I've submitted my startupgui video player as a resource so you can adapt it and have movies playing, where ever you want a movie to play.
02/11/2007 (7:52 am)
Rob, the changes to the actual code were quite simple. On line 46 change of guiAviBitmapCtrl.h change
#include "gui/guiControl.h"
to:
#include "gui/core/guiControl.h"
On or around line 80 of guiAviBitmapCtrl.h change
textureHandle *mTextureHandles;
to:
GFXTexHandle *mTextureHandles;
That will sort out the compile error when using AVI video. You can find the same line for MPG if you wish and repeat change it also.
Then in guiAviBitmapCtrl.cc comment out line 16 #include "dgl/dgl.h", as we don't use dgl.h.
I also found the findwindow function at line 197 produces a new video window instead of rendering to the canvass so i commented out line 197 and uncommented out line 187 mWindow = GetForegroundWindow();
You can then compile your code and should have video support in TGEA. The real bulk of my time was spent getting the video gui to work. I found that using canvas.pushdialog crashes the program. I've submitted my startupgui video player as a resource so you can adapt it and have movies playing, where ever you want a movie to play.
#23
02/11/2007 (8:40 am)
I forgot to mention to change the paths in guiAviBitmapCtrl.cc to so it can find guiControl.h and guiAviBitmapCtrl.h. I have just submitted the changed files and my video player gui as a resource so you can start playing video files in TGEA with minimal editing.
#24
02/16/2007 (4:49 pm)
So is this resource compatible with Torque 1.4?
#25
03/01/2007 (6:43 pm)
Better yet....is this compatible with 1.5???
#26
I've got the latest DirectX9 SDK and tried reinstalling it as well but I still don't get Strmiids.lib. According to another post elsewhere (http://www.garagegames.com/mg/forums/result.thread.php?qt=3792) that I should use ole32.lib. Again, the main problem is still on getting to have strmiids.lib and i'm not sure if it passes ole32.lib as well. I tried adding these to the project linker settings in VS2005 as additional dependencies but still no go (Or, I just missed out something to do?)
I think these are the lines in guiAviBitmapCtrl.h that triggers it:
I tried hacking it by removing the pragmas but it would just cause a lot of "unresolved external symbol" errors.
Please help me in getting this to compile.
03/08/2007 (3:21 am)
Guys I'm pretty sure this is a simple question to most of you... but I can't link the code to my 1.5 engine, because of it requiring the "Strmiids.lib"I've got the latest DirectX9 SDK and tried reinstalling it as well but I still don't get Strmiids.lib. According to another post elsewhere (http://www.garagegames.com/mg/forums/result.thread.php?qt=3792) that I should use ole32.lib. Again, the main problem is still on getting to have strmiids.lib and i'm not sure if it passes ole32.lib as well. I tried adding these to the project linker settings in VS2005 as additional dependencies but still no go (Or, I just missed out something to do?)
I think these are the lines in guiAviBitmapCtrl.h that triggers it:
#if USE_DIRECTSHOW
#include <dshow.h>
#pragma comment(lib,"Strmiids.lib")
#pragma comment(lib,"ole32.lib")
#elseI tried hacking it by removing the pragmas but it would just cause a lot of "unresolved external symbol" errors.
Please help me in getting this to compile.
#27
I tried using it but it seems the movie shows up on another window and not within Torque's window along with the other Guis on that GUI. I also think that it doesn't recognize the events.
I'm looking for a way to make the video appear inside the Torque window and follow it's dimensions and coordinates. I'll deal with the events later. If anyone already knows the solutions for this, please go ahead and share. :)
03/09/2007 (12:41 am)
Ok, I got it to compile. I just redownloaded and installed the latest Platform SDKs and DirectX SDKs on no more missing header errors.I tried using it but it seems the movie shows up on another window and not within Torque's window along with the other Guis on that GUI. I also think that it doesn't recognize the events.
I'm looking for a way to make the video appear inside the Torque window and follow it's dimensions and coordinates. I'll deal with the events later. If anyone already knows the solutions for this, please go ahead and share. :)
#28
Have anyone tried it in fullscreen mode and got it worked properly. if anyone knows the solution , please share it..
Thanks
04/03/2007 (5:08 am)
It worked for me on the first attempt in the window mode but when i switched to fullscreen mode i can just see a blank screen. Am I missing something. Have anyone tried it in fullscreen mode and got it worked properly. if anyone knows the solution , please share it..
Thanks
#29
04/13/2007 (7:04 am)
@Gordon Walton where can i find you resource on this?
#30
05/14/2007 (10:57 pm)
This is a very nice resouce! Very easy to install and use, I have just one quest, every movie play in a new windows, this is right or I'm doing something wrong?!
#31
05/21/2007 (7:51 am)
Unknown command Play... anyone got an idea?
#32
Every movie open a new window, and the window keeps black. Only sound seems to work.
Has anyone get it working?
06/22/2007 (3:00 am)
I have implemented this ressource with fixes by Gordon Walton, but it dont't work correctly.Every movie open a new window, and the window keeps black. Only sound seems to work.
Has anyone get it working?
#33
19>Linking...
19>guiAviBitmapCtrl.obj : error LNK2019: unresolved external symbol _IID_IVideoWindow referenced in function "protected: bool __thiscall GuiAviBitmapCtrl::InitDirectShow(void)" (?InitDirectShow@GuiAviBitmapCtrl@@IAE_NXZ)
19>guiAviBitmapCtrl.obj : error LNK2019: unresolved external symbol _IID_IMediaPosition referenced in function "protected: bool __thiscall GuiAviBitmapCtrl::InitDirectShow(void)" (?InitDirectShow@GuiAviBitmapCtrl@@IAE_NXZ)
19>guiAviBitmapCtrl.obj : error LNK2019: unresolved external symbol _IID_IMediaEvent referenced in function "protected: bool __thiscall GuiAviBitmapCtrl::InitDirectShow(void)" (?InitDirectShow@GuiAviBitmapCtrl@@IAE_NXZ)
19>guiAviBitmapCtrl.obj : error LNK2019: unresolved external symbol _IID_IMediaControl referenced in function "protected: bool __thiscall GuiAviBitmapCtrl::InitDirectShow(void)" (?InitDirectShow@GuiAviBitmapCtrl@@IAE_NXZ)
19>guiAviBitmapCtrl.obj : error LNK2019: unresolved external symbol _CLSID_FilterGraph referenced in function "protected: bool __thiscall GuiAviBitmapCtrl::InitDirectShow(void)" (?InitDirectShow@GuiAviBitmapCtrl@@IAE_NXZ)
19>guiAviBitmapCtrl.obj : error LNK2019: unresolved external symbol _IID_IGraphBuilder referenced in function "protected: bool __thiscall GuiAviBitmapCtrl::InitDirectShow(void)" (?InitDirectShow@GuiAviBitmapCtrl@@IAE_NXZ)
19>gameInterface.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall GameInterface::processDirectShowEvent(struct DirectShowEvent *)" (?processDirectShowEvent@GameInterface@@UAEXPAUDirectShowEvent@@@Z)
19>../example/torqueDemo.exe : fatal error LNK1120: 7 unresolved externals
19>Build log was saved at "file://c:\Torque\TGE_1_5_2\engine\out.VC8.RELEASE\BuildLog.htm"
19>Torque Demo - 8 error(s), 0 warning(s)
01/03/2008 (12:39 pm)
Hey I get the following errors on compiling, how do I fix this? I think it may have something to do with installing the directshow stuff but I don't really know how. Thanks19>Linking...
19>guiAviBitmapCtrl.obj : error LNK2019: unresolved external symbol _IID_IVideoWindow referenced in function "protected: bool __thiscall GuiAviBitmapCtrl::InitDirectShow(void)" (?InitDirectShow@GuiAviBitmapCtrl@@IAE_NXZ)
19>guiAviBitmapCtrl.obj : error LNK2019: unresolved external symbol _IID_IMediaPosition referenced in function "protected: bool __thiscall GuiAviBitmapCtrl::InitDirectShow(void)" (?InitDirectShow@GuiAviBitmapCtrl@@IAE_NXZ)
19>guiAviBitmapCtrl.obj : error LNK2019: unresolved external symbol _IID_IMediaEvent referenced in function "protected: bool __thiscall GuiAviBitmapCtrl::InitDirectShow(void)" (?InitDirectShow@GuiAviBitmapCtrl@@IAE_NXZ)
19>guiAviBitmapCtrl.obj : error LNK2019: unresolved external symbol _IID_IMediaControl referenced in function "protected: bool __thiscall GuiAviBitmapCtrl::InitDirectShow(void)" (?InitDirectShow@GuiAviBitmapCtrl@@IAE_NXZ)
19>guiAviBitmapCtrl.obj : error LNK2019: unresolved external symbol _CLSID_FilterGraph referenced in function "protected: bool __thiscall GuiAviBitmapCtrl::InitDirectShow(void)" (?InitDirectShow@GuiAviBitmapCtrl@@IAE_NXZ)
19>guiAviBitmapCtrl.obj : error LNK2019: unresolved external symbol _IID_IGraphBuilder referenced in function "protected: bool __thiscall GuiAviBitmapCtrl::InitDirectShow(void)" (?InitDirectShow@GuiAviBitmapCtrl@@IAE_NXZ)
19>gameInterface.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall GameInterface::processDirectShowEvent(struct DirectShowEvent *)" (?processDirectShowEvent@GameInterface@@UAEXPAUDirectShowEvent@@@Z)
19>../example/torqueDemo.exe : fatal error LNK1120: 7 unresolved externals
19>Build log was saved at "file://c:\Torque\TGE_1_5_2\engine\out.VC8.RELEASE\BuildLog.htm"
19>Torque Demo - 8 error(s), 0 warning(s)
#34
01/09/2008 (9:10 am)
I have same, avi, window swap to desktop window focus problem. Anyone else got this working?
#35
Regading the window focus problem, find the following line:
And change it into the following
Seems that the problem was that during the version change into Unicode support, there was changes with the way text is handled including the window class name was changed into the Long Byte.
02/14/2008 (7:37 am)
I've got this to work with 1.5.2 and the arcane.FX equivalent. Regading the window focus problem, find the following line:
mWindow = FindWindow("Darkstar Window Class", NULL);And change it into the following
mWindow = FindWindow(LPCWSTR(L"Darkstar Window Class"), NULL);
Seems that the problem was that during the version change into Unicode support, there was changes with the way text is handled including the window class name was changed into the Long Byte.
#36
Compiling...
consoleFunctions.cc
C:\Torque\SDK\engine\console\consoleFunctions.cc(1486) : error C2039: 'setRestart' : is not a member of 'GameInterface'
../engine\platform/gameInterface.h(12) : see declaration of 'GameInterface'
main.cc
../engine\gui/game/guiAviBitmapCtrl.h(80) : error C2143: syntax error : missing ';' before '*'
../engine\gui/game/guiAviBitmapCtrl.h(80) : error C2501: 'GFXTexHandle' : missing storage-class or type specifiers
../engine\gui/game/guiAviBitmapCtrl.h(80) : error C2501: 'mTextureHandles' : missing storage-class or type specifiers
C:\Torque\SDK\engine\game\main.cc(161) : error C2065: 'RegisterCoreTypes' : undeclared identifier
C:\Torque\SDK\engine\game\main.cc(162) : error C2065: 'RegisterMathTypes' : undeclared identifier
C:\Torque\SDK\engine\game\main.cc(163) : error C2065: 'RegisterGuiTypes' : undeclared identifier
guiAviBitmapCtrl.cc
../engine\gui/game/guiAviBitmapCtrl.h(80) : error C2143: syntax error : missing ';' before '*'
../engine\gui/game/guiAviBitmapCtrl.h(80) : error C2501: 'GFXTexHandle' : missing storage-class or type specifiers
../engine\gui/game/guiAviBitmapCtrl.h(80) : error C2501: 'mTextureHandles' : missing storage-class or type specifiers
C:\Torque\SDK\engine\gui\game\guiAviBitmapCtrl.cc(166) : error C2065: 'mTextureHandles' : undeclared identifier
C:\Torque\SDK\engine\gui\game\guiAviBitmapCtrl.cc(197) : error C2664: 'FindWindowW' : cannot convert parameter 1 from 'char [22]' to 'const unsigned short *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
winWindow.cc
../engine\gui/game/guiAviBitmapCtrl.h(80) : error C2143: syntax error : missing ';' before '*'
../engine\gui/game/guiAviBitmapCtrl.h(80) : error C2501: 'GFXTexHandle' : missing storage-class or type specifiers
../engine\gui/game/guiAviBitmapCtrl.h(80) : error C2501: 'mTextureHandles' : missing storage-class or type specifiers
C:\Torque\SDK\engine\platformWin32\winWindow.cc(103) : error C2664: 'CreateMutexW' : cannot convert parameter 3 from 'const char *' to 'const unsigned short *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Torque\SDK\engine\platformWin32\winWindow.cc(119) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char *' to 'const unsigned short *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Torque\SDK\engine\platformWin32\winWindow.cc(126) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char *' to 'const unsigned short *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Torque\SDK\engine\platformWin32\winWindow.cc(133) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char *' to 'const unsigned short *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Torque\SDK\engine\platformWin32\winWindow.cc(769) : error C2065: 'IDI_ICON2' : undeclared identifier
C:\Torque\SDK\engine\platformWin32\winWindow.cc(773) : error C2440: '=' : cannot convert from 'const char *' to 'const unsigned short *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Torque\SDK\engine\platformWin32\winWindow.cc(780) : error C2440: '=' : cannot convert from 'char [8]' to 'const unsigned short *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Torque\SDK\engine\platformWin32\winWindow.cc(814) : error C2664: 'CreateWindowExW' : cannot convert parameter 2 from 'const char *' to 'const unsigned short *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Torque\SDK\engine\platformWin32\winWindow.cc(828) : error C2664: 'CreateWindowExW' : cannot convert parameter 2 from 'char [8]' to 'const unsigned short *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Torque\SDK\engine\platformWin32\winWindow.cc(1210) : error C2664: 'GetModuleHandleW' : cannot convert parameter 1 from 'const char *' to 'const unsigned short *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Torque\SDK\engine\platformWin32\winWindow.cc(1219) : error C2664: 'GetModuleFileNameW' : cannot convert parameter 2 from 'char [256]' to 'unsigned short *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Torque\SDK\engine\platformWin32\winWindow.cc(1300) : error C2664: 'RegOpenKeyExW' : cannot convert parameter 2 from 'char [25]' to 'const unsigned short *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Torque\SDK\engine\platformWin32\winWindow.cc(1307) : error C2664: 'RegQueryValueExW' : cannot convert parameter 2 from 'char [1]' to 'const unsigned short *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Torque\SDK\engine\platformWin32\winWindow.cc(1340) : error C2664: 'CreateProcessW' : cannot convert parameter 2 from 'char [1024]' to 'unsigned short *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Torque\SDK\engine\platformWin32\winWindow.cc(1354) : error C2664: 'RegOpenKeyExW' : cannot convert parameter 2 from 'const char *' to 'const unsigned short *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Torque\SDK\engine\platformWin32\winWindow.cc(1358) : error C2664: 'RegQueryValueExW' : cannot convert parameter 2 from 'char [14]' to 'const unsigned short *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Torque\SDK\engine\platformWin32\winWindow.cc(1377) : error C2664: 'RegOpenKeyExW' : cannot convert parameter 2 from 'const char *' to 'const unsigned short *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Torque\SDK\engine\platformWin32\winWindow.cc(1379) : error C2664: 'RegSetValueExW' : cannot convert parameter 2 from 'char [14]' to 'const unsigned short *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Torque\SDK\engine\platformWin32\winWindow.cc(1399) : error C2664: 'RegOpenKeyExW' : cannot convert parameter 2 from 'const char *' to 'const unsigned short *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Torque\SDK\engine\platformWin32\winWindow.cc(1403) : error C2664: 'RegQueryValueExW' : cannot convert parameter 2 from 'char [7]' to 'const unsigned short *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
Error executing cl.exe.
torqueDemo.exe - 35 error(s), 0 warning(s)
how can i fix it ?
03/03/2008 (11:01 am)
Please help :Compiling...
consoleFunctions.cc
C:\Torque\SDK\engine\console\consoleFunctions.cc(1486) : error C2039: 'setRestart' : is not a member of 'GameInterface'
../engine\platform/gameInterface.h(12) : see declaration of 'GameInterface'
main.cc
../engine\gui/game/guiAviBitmapCtrl.h(80) : error C2143: syntax error : missing ';' before '*'
../engine\gui/game/guiAviBitmapCtrl.h(80) : error C2501: 'GFXTexHandle' : missing storage-class or type specifiers
../engine\gui/game/guiAviBitmapCtrl.h(80) : error C2501: 'mTextureHandles' : missing storage-class or type specifiers
C:\Torque\SDK\engine\game\main.cc(161) : error C2065: 'RegisterCoreTypes' : undeclared identifier
C:\Torque\SDK\engine\game\main.cc(162) : error C2065: 'RegisterMathTypes' : undeclared identifier
C:\Torque\SDK\engine\game\main.cc(163) : error C2065: 'RegisterGuiTypes' : undeclared identifier
guiAviBitmapCtrl.cc
../engine\gui/game/guiAviBitmapCtrl.h(80) : error C2143: syntax error : missing ';' before '*'
../engine\gui/game/guiAviBitmapCtrl.h(80) : error C2501: 'GFXTexHandle' : missing storage-class or type specifiers
../engine\gui/game/guiAviBitmapCtrl.h(80) : error C2501: 'mTextureHandles' : missing storage-class or type specifiers
C:\Torque\SDK\engine\gui\game\guiAviBitmapCtrl.cc(166) : error C2065: 'mTextureHandles' : undeclared identifier
C:\Torque\SDK\engine\gui\game\guiAviBitmapCtrl.cc(197) : error C2664: 'FindWindowW' : cannot convert parameter 1 from 'char [22]' to 'const unsigned short *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
winWindow.cc
../engine\gui/game/guiAviBitmapCtrl.h(80) : error C2143: syntax error : missing ';' before '*'
../engine\gui/game/guiAviBitmapCtrl.h(80) : error C2501: 'GFXTexHandle' : missing storage-class or type specifiers
../engine\gui/game/guiAviBitmapCtrl.h(80) : error C2501: 'mTextureHandles' : missing storage-class or type specifiers
C:\Torque\SDK\engine\platformWin32\winWindow.cc(103) : error C2664: 'CreateMutexW' : cannot convert parameter 3 from 'const char *' to 'const unsigned short *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Torque\SDK\engine\platformWin32\winWindow.cc(119) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char *' to 'const unsigned short *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Torque\SDK\engine\platformWin32\winWindow.cc(126) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char *' to 'const unsigned short *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Torque\SDK\engine\platformWin32\winWindow.cc(133) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char *' to 'const unsigned short *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Torque\SDK\engine\platformWin32\winWindow.cc(769) : error C2065: 'IDI_ICON2' : undeclared identifier
C:\Torque\SDK\engine\platformWin32\winWindow.cc(773) : error C2440: '=' : cannot convert from 'const char *' to 'const unsigned short *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Torque\SDK\engine\platformWin32\winWindow.cc(780) : error C2440: '=' : cannot convert from 'char [8]' to 'const unsigned short *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Torque\SDK\engine\platformWin32\winWindow.cc(814) : error C2664: 'CreateWindowExW' : cannot convert parameter 2 from 'const char *' to 'const unsigned short *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Torque\SDK\engine\platformWin32\winWindow.cc(828) : error C2664: 'CreateWindowExW' : cannot convert parameter 2 from 'char [8]' to 'const unsigned short *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Torque\SDK\engine\platformWin32\winWindow.cc(1210) : error C2664: 'GetModuleHandleW' : cannot convert parameter 1 from 'const char *' to 'const unsigned short *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Torque\SDK\engine\platformWin32\winWindow.cc(1219) : error C2664: 'GetModuleFileNameW' : cannot convert parameter 2 from 'char [256]' to 'unsigned short *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Torque\SDK\engine\platformWin32\winWindow.cc(1300) : error C2664: 'RegOpenKeyExW' : cannot convert parameter 2 from 'char [25]' to 'const unsigned short *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Torque\SDK\engine\platformWin32\winWindow.cc(1307) : error C2664: 'RegQueryValueExW' : cannot convert parameter 2 from 'char [1]' to 'const unsigned short *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Torque\SDK\engine\platformWin32\winWindow.cc(1340) : error C2664: 'CreateProcessW' : cannot convert parameter 2 from 'char [1024]' to 'unsigned short *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Torque\SDK\engine\platformWin32\winWindow.cc(1354) : error C2664: 'RegOpenKeyExW' : cannot convert parameter 2 from 'const char *' to 'const unsigned short *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Torque\SDK\engine\platformWin32\winWindow.cc(1358) : error C2664: 'RegQueryValueExW' : cannot convert parameter 2 from 'char [14]' to 'const unsigned short *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Torque\SDK\engine\platformWin32\winWindow.cc(1377) : error C2664: 'RegOpenKeyExW' : cannot convert parameter 2 from 'const char *' to 'const unsigned short *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Torque\SDK\engine\platformWin32\winWindow.cc(1379) : error C2664: 'RegSetValueExW' : cannot convert parameter 2 from 'char [14]' to 'const unsigned short *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Torque\SDK\engine\platformWin32\winWindow.cc(1399) : error C2664: 'RegOpenKeyExW' : cannot convert parameter 2 from 'const char *' to 'const unsigned short *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Torque\SDK\engine\platformWin32\winWindow.cc(1403) : error C2664: 'RegQueryValueExW' : cannot convert parameter 2 from 'char [7]' to 'const unsigned short *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
Error executing cl.exe.
torqueDemo.exe - 35 error(s), 0 warning(s)
how can i fix it ?
#37
I am having problems integrating it into 1.5.2 though, and so far google has told me that the problem is something called NTDDI_VERSION. I'm running Vista SP1 and using Visual Studio 2008, so there's some sort of problem where the actualy Windows version is defined.
Anyway, the errors I'm getting are right after compiling winMain.cc (or main.cc):
c:\program files\microsoft sdks\windows\v6.0a\include\ocidl.h(430) : error C2061: syntax error : identifier '__RPC__deref_out_opt'
There are way more lines like that in the output, but they're all similar and all related to RPC.
Any ideas? :P
05/14/2008 (9:09 pm)
Thank you for this wonderful resource. :)I am having problems integrating it into 1.5.2 though, and so far google has told me that the problem is something called NTDDI_VERSION. I'm running Vista SP1 and using Visual Studio 2008, so there's some sort of problem where the actualy Windows version is defined.
Anyway, the errors I'm getting are right after compiling winMain.cc (or main.cc):
c:\program files\microsoft sdks\windows\v6.0a\include\ocidl.h(430) : error C2061: syntax error : identifier '__RPC__deref_out_opt'
There are way more lines like that in the output, but they're all similar and all related to RPC.
Any ideas? :P
#38
05/18/2008 (4:06 pm)
still unable to get this to work in 1.5.2, anyone who has please let me know, thanks
#39
I've tried different versions of DirectX SDK, Platform SDK and Visual Studio.
I'll run a few more tests in a Virtual Machine, just to be sure that it's not related to having "too old" SDK's/VS/Vista.
05/18/2008 (10:07 pm)
Same here.I've tried different versions of DirectX SDK, Platform SDK and Visual Studio.
I'll run a few more tests in a Virtual Machine, just to be sure that it's not related to having "too old" SDK's/VS/Vista.

Torque Owner Ronald J Nelson
Code Hammer Games