Error: Interlockedexchange Identifier not found, using Directshow
by Squall · in Torque 3D Beginner · 08/08/2010 (4:06 pm) · 2 replies
Hello evevryone,
I'm trying to include the source filter sample from DirectShow to the game engine. And it always return this error: "Interlockedexhange Identifier not found" in wxutils.h . When I traced back the Interlockedexhange, it led me to streams.h where this variable should be already defined after we include windows.h.
Is there any similar known problem of the game engine with the DirectShow (in Windows SDK) ?
Here are the code that cause problem within wxutils.h
Apparently, InterlockedExchangePointer leads to streams.h
I've been stuck with this problem for a while. Please help if you have any idea regarding this issue. I was able to compile the Directshow source filter as a stand-alone project but it raised error if I tried within Torque. There has to be something between Torque Engine and Windows SDK that cause the problem ...
I'm trying to include the source filter sample from DirectShow to the game engine. And it always return this error: "Interlockedexhange Identifier not found" in wxutils.h . When I traced back the Interlockedexhange, it led me to streams.h where this variable should be already defined after we include windows.h.
Is there any similar known problem of the game engine with the DirectShow (in Windows SDK) ?
Here are the code that cause problem within wxutils.h
#pragma warning(push)
#pragma warning(disable: 4312)
HANDLE hThread = (HANDLE)InterlockedExchangePointer(&m_hThread, 0);
#pragma warning(pop)
if (hThread) {
WaitForSingleObject(hThread, INFINITE);
CloseHandle(hThread);
}Apparently, InterlockedExchangePointer leads to streams.h
/////////////////////////////////////////////////////////////////////////// // The following definitions come from the Platform SDK and are required if // the applicaiton is being compiled with the headers from Visual C++ 6.0. /////////////////////////////////////////////////// //////////////////////// #ifndef InterlockedExchangePointer #define InterlockedExchangePointer(Target, Value) (PVOID)InterlockedExchange((PLONG)(Target), (LONG)(Value)) #endif
I've been stuck with this problem for a while. Please help if you have any idea regarding this issue. I was able to compile the Directshow source filter as a stand-alone project but it raised error if I tried within Torque. There has to be something between Torque Engine and Windows SDK that cause the problem ...
#2
I check as you told, but every time i tried to include streams.h the same problem happens. Can you or anyone else try to reproduce the problem by using streams.h in the engine ?
08/10/2010 (8:39 am)
I'm using Visual Studio 2008 + Windows SDK v7.0 I check as you told, but every time i tried to include streams.h the same problem happens. Can you or anyone else try to reproduce the problem by using streams.h in the engine ?
Associate Rene Damm
a) Make sure _WIN32_WINNT is at least 0x0x0500.
b) Try manually including <intrin.h> before <windows.h>
What combination of VS and the SDK are you using? IIRC VS05 and recent Win32 SDK drops are incompatible in their definitions of the intrinsics API though that should lead to different errors and probably isn't the problem here.