Solved

Having Problems in SDK Platform

Posted on 2000-02-23
6
2,508 Views
Last Modified: 2013-12-14
Hi, I’m trying to build an video player using the Microsoft’s SDK Platform Direct Show and using the streams.h header file provide in the MSDN library. Anyhow, I have some errors popup when I compiled the program. As for your info, the errors all occurred in the header files that included in the streams.h header file. Hope that you can help me to solve the problems. Thank you very much.


streams.h(7) : fatal error C1021: invalid preprocessor command 'ifdef_MSC_VER'
This error occurred when I first compiled the programs but when I hide it using // or ‘ifdef _MSC_VER’, the below errors occcured.

\reftime.h(49) : error C2226: syntax error : unexpected type 'LONGLONG'
\reftime.h(52) : error C2143: syntax error : missing ';' before '{'
\reftime.h(52) : error C2447: missing function header (old-style formal list?)
\reftime.h(69) : error C2017: illegal escape sequence
\wxdebug.h(179) : error C2065: 'nCount' : undeclared identifier
\wxdebug.h(179) : error C2065: 'lpHandles' : undeclared identifier
\wxdebug.h(179) : error C2065: 'bWaitAll' : undeclared identifier
\wxdebug.h(272) : error C2501: 'WaitForMultipleObjects' : missing storage-class or type specifiers
\wxdebug.h(272) : error C2373: 'WaitForMultipleObjects' : redefinition; different type modifiers
        \winbase.h(2245) : see declaration of 'WaitForMultipleObjects'
\wxdebug.h(272) : error C2078: too many initializers
\wxdebug.h(272) : error C2143: syntax error : missing ';' before '<class-head>'
\wxdebug.h(322) : error C2629: unexpected 'class CDisp ('
\wxdebug.h(322) : error C2238: unexpected token(s) preceding ';'
\combase.h(294) : error C2017: illegal escape sequence
\combase.h(295) : error C2065: 'GetOwner' : undeclared identifier
\combase.h(295) : error C2227: left of '->QueryInterface' must point to class/struct/union
\combase.h(295) : error C2017: illegal escape sequence
\combase.h(296) : error C2017: illegal escape sequence
\combase.h(297) : error C2017: illegal escape sequence
\combase.h(298) : error C2227: left of '->AddRef' must point to class/struct/union
\combase.h(298) : error C2017: illegal escape sequence
\combase.h(299) : error C2017: illegal escape sequence
\combase.h(300) : error C2017: illegal escape sequence
\combase.h(301) : error C2227: left of '->Release' must point to class/struct/union
\combase.h(301) : error C2017: illegal escape sequence

...still got more...
THANK YOU.
0
Comment
Question by:jaskin
  • 3
  • 2
6 Comments
 
LVL 32

Expert Comment

by:jhance
Comment Utility
What is the actual contents of line 7 in streams.h?  The error 'ifdef_MSC_VER' is obviously bogus as if should be:

#ifdef _MSC_VER

and not:

ifdef_MSC_VER

Did you copy it incorrectly?
0
 
LVL 10

Accepted Solution

by:
RONSLOW earned 200 total points
Comment Utility
Below is the "streams.h" is from latest SDK I have (Oct99)

Note that there is no #ifdef_MSC_VER as your error message implies.

It sounds like you have edited the file and deleted the spec between the #ifdef and the _MSC_VER.

Reinstall the platform SDK incase there is anything else that has been stuffed.  Also make sure you have the lastest version.

Failing that, fix up the copy of streams.h you have so the #ifdef is correct (maybe copy from this message)

//==========================================================================;
//
//  THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
//  KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
//  IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
//  PURPOSE.
//
//  Copyright (c) 1992 - 1998  Microsoft Corporation.  All Rights Reserved.
//
//--------------------------------------------------------------------------;

// Streams architecture overall header file, January 1995

#ifndef __STREAMS__
#define __STREAMS__

#ifdef      _MSC_VER
// disable some level-4 warnings, use #pragma warning(enable:###) to re-enable
#pragma warning(disable:4100) // warning C4100: unreferenced formal parameter
#pragma warning(disable:4201) // warning C4201: nonstandard extension used : nameless struct/union
#pragma warning(disable:4511) // warning C4511: copy constructor could not be generated
#pragma warning(disable:4512) // warning C4512: assignment operator could not be generated
#pragma warning(disable:4514) // warning C4514: "unreferenced inline function has been removed"

#if _MSC_VER>=1100
#define AM_NOVTABLE __declspec(novtable)
#else
#define AM_NOVTABLE
#endif
#endif      // MSC_VER


#include <windows.h>
#include <windowsx.h>
#include <olectl.h>
#include <ddraw.h>
#include <mmsystem.h>

#ifndef NUMELMS
   #define NUMELMS(aa) (sizeof(aa)/sizeof((aa)[0]))
#endif

#include <strmif.h>     // Generated IDL header file for streams interfaces

#include <reftime.h>    // Helper class for REFERENCE_TIME management
#include <wxdebug.h>    // Debug support for logging and ASSERTs
#include <amvideo.h>    // ActiveMovie video interfaces and definitions
//include amaudio.h explicitly if you need it.  it requires the DX SDK.
//#include <amaudio.h>    // ActiveMovie audio interfaces and definitions
#include <wxutil.h>     // General helper classes for threads etc
#include <combase.h>    // Base COM classes to support IUnknown
#include <dllsetup.h>   // Filter registration support functions
#include <measure.h>    // Performance measurement
#include <comlite.h>    // Light weight com function prototypes

#include <cache.h>      // Simple cache container class
#include <wxlist.h>     // Non MFC generic list class
#include <msgthrd.h>      // CMsgThread
#include <mtype.h>      // Helper class for managing media types
#include <fourcc.h>     // conversions between FOURCCs and GUIDs
#include <control.h>    // generated from control.odl
#include <ctlutil.h>    // control interface utility classes
#include <evcode.h>     // event code definitions
#include <amfilter.h>   // Main streams architecture class hierachy
#include <transfrm.h>   // Generic transform filter
#include <transip.h>    // Generic transform-in-place filter
#include <uuids.h>      // declaration of type GUIDs and well-known clsids
#include <source.h>      // Generic source filter
#include <outputq.h>    // Output pin queueing
#include <errors.h>     // HRESULT status and error definitions
#include <renbase.h>    // Base class for writing ActiveX renderers
#include <winutil.h>    // Helps with filters that manage windows
#include <winctrl.h>    // Implements the IVideoWindow interface
#include <videoctl.h>   // Specifically video related classes
#include <refclock.h>      // Base clock class
#include <sysclock.h>      // System clock
#include <pstream.h>    // IPersistStream helper class
#include <vtrans.h>     // Video Transform Filter base class
#include <amextra.h>
#include <cprop.h>      // Base property page class
#include <strmctl.h>    // IAMStreamControl support
#include <edevdefs.h>   // External device control interface defines
#include <audevcod.h>   // audio filter device error event codes

#else
    #ifdef DEBUG
    #pragma message("STREAMS.H included TWICE")
    #endif
#endif // __STREAMS__
0
 
LVL 10

Expert Comment

by:RONSLOW
Comment Utility
BTW: be VERY careful mixing the latest platform SDK with MFC when the #define's are set for Windows 2000 features.

The MFC CFileDialog will stuff up because of changes to the definitions of some structs.

Bascially, the current VC6 SP3 MFC will NOT work with the platform SDK when you
#define _WIN32_WINNT 0x0500
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 

Author Comment

by:jaskin
Comment Utility
Thanks...
0
 

Author Comment

by:jaskin
Comment Utility
Hmm..I still have the problems of building up the program. And really hope that you can help me...Below are the errors:

refclock.h(84) : error C2629: unexpected 'class CBaseReferenceClock ('
refclock.h(84) : error C2238: unexpected token(s) preceding ';'
refclock.h(140) : error C2143: syntax error : missing ';' before '*'
refclock.h(140) : error C2501: 'CAMSchedule' : missing storage-class or type specifiers
refclock.h(140) : error C2501: 'GetSchedule' : missing storage-class or type specifiers
refclock.h(140) : warning C4183: 'GetSchedule': member function definition looks like a ctor, but name does not match enclosing class
refclock.h(169) : error C2143: syntax error : missing ';' before '*'
refclock.h(169) : error C2501: 'CAMSchedule' : missing storage-class or type specifiers
refclock.h(169) : error C2501: 'm_pSchedule' : missing storage-class or type specifiers
stdwin.h(16) : warning C4005: 'ASSERT' : macro redefinition
        c:\program files\microsoft visual studio\vc98\include\wxdebug.h(197) : see previous definition of 'ASSERT'
clientcomm.h(10) : warning C4042: 'lFileOffset' : has bad storage class
clientcomm.h(10) : warning C4042: 'lFileOffset' : has bad storage class
resource.h(11) : warning C4005: 'WM_VSCROLL' : macro redefinition
winuser.h(1747) : see previous definition of 'WM_VSCROLL'
resource.h(12) : warning C4005: 'WM_HSCROLL' : macro redefinition
winuser.h(1746) : see previous definition of 'WM_HSCROLL'




but when I do the // for //refclock.h and //sysclock.h....i have the following errors.....

Linking...
Harmony.obj : error LNK2001: unresolved external symbol "public: __thiscall CMediaType::~CMediaType(void)" (??1CMediaType@@QAE@XZ)
Harmony.obj : error LNK2001: unresolved external symbol "public: __thiscall CMediaType::CMediaType(void)" (??0CMediaType@@QAE@XZ)
Harmony.obj : error LNK2001: unresolved external symbol __imp__timeGetTime@0
Harmony.obj : error LNK2001: unresolved external symbol "public: virtual long __stdcall CBaseFilter::QueryVendorInfo(unsigned short * *)" (?QueryVendorInfo@CBaseFilter@@UAGJPAPAG@Z)
Harmony.obj : error LNK2001: unresolved external symbol "public: virtual long __stdcall CBaseFilter::JoinFilterGraph(struct IFilterGraph *,unsigned short const *)" (?JoinFilterGraph@CBaseFilter@@UAGJPAUIFilterGraph@@PBG@Z)
Harmony.obj : error LNK2001: unresolved external symbol "public: virtual long __stdcall CBaseFilter::QueryFilterInfo(struct _FilterInfo *)" (?QueryFilterInfo@CBaseFilter@@UAGJPAU_FilterInfo@@@Z)
Harmony.obj : error LNK2001: unresolved external symbol "public: virtual long __stdcall CBaseFilter::FindPin(unsigned short const *,struct IPin * *)" (?FindPin@CBaseFilter@@UAGJPBGPAPAUIPin@@@Z)
Harmony.obj : error LNK2001: unresolved external symbol "public: virtual long __stdcall CBaseFilter::EnumPins(struct IEnumPins * *)" (?EnumPins@CBaseFilter@@UAGJPAPAUIEnumPins@@@Z)
Harmony.obj : error LNK2001: unresolved external symbol "public: virtual long __stdcall CBaseFilter::GetSyncSource(struct IReferenceClock * *)" (?GetSyncSource@CBaseFilter@@UAGJPAPAUIReferenceClock@@@Z)
Harmony.obj : error LNK2001: unresolved external symbol "public: virtual long __stdcall CBaseFilter::SetSyncSource(struct IReferenceClock *)" (?SetSyncSource@CBaseFilter@@UAGJPAUIReferenceClock@@@Z)
Harmony.obj : error LNK2001: unresolved external symbol "public: virtual long __stdcall CBaseFilter::GetState(unsigned long,enum _FilterState *)" (?GetState@CBaseFilter@@UAGJKPAW4_FilterState@@@Z)
Harmony.obj : error LNK2001: unresolved external symbol "public: virtual long __stdcall CBaseFilter::Run(__int64)" (?Run@CBaseFilter@@UAGJ_J@Z)
Harmony.obj : error LNK2001: unresolved external symbol "public: virtual long __stdcall CBaseFilter::Pause(void)" (?Pause@CBaseFilter@@UAGJXZ)
Harmony.obj : error LNK2001: unresolved external symbol "public: virtual long __stdcall CBaseFilter::Stop(void)" (?Stop@CBaseFilter@@UAGJXZ)
Harmony.obj : error LNK2001: unresolved external symbol "public: virtual long __stdcall CBaseFilter::GetClassID(struct _GUID *)" (?GetClassID@CBaseFilter@@UAGJPAU_GUID@@@Z)
Harmony.obj : error LNK2001: unresolved external symbol "public: virtual class CBasePin * __thiscall CAsyncReader::GetPin(int)" (?GetPin@CAsyncReader@@UAEPAVCBasePin@@H@Z)
Harmony.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall CAsyncReader::GetPinCount(void)" (?GetPinCount@CAsyncReader@@UAEHXZ)
Harmony.obj : error LNK2001: unresolved external symbol "public: virtual long __thiscall CBaseFilter::GetPinVersion(void)" (?GetPinVersion@CBaseFilter@@UAEJXZ)
Harmony.obj : error LNK2001: unresolved external symbol "public: virtual long __thiscall CBaseFilter::StreamTime(class CRefTime &)" (?StreamTime@CBaseFilter@@UAEJAAVCRefTime@@@Z)
Harmony.obj : error LNK2001: unresolved external symbol "public: virtual unsigned long __stdcall CUnknown::NonDelegatingRelease(void)" (?NonDelegatingRelease@CUnknown@@UAGKXZ)
Harmony.obj : error LNK2001: unresolved external symbol "public: virtual unsigned long __stdcall CUnknown::NonDelegatingAddRef(void)" (?NonDelegatingAddRef@CUnknown@@UAGKXZ)
Harmony.obj : error LNK2001: unresolved external symbol "public: virtual long __stdcall CBaseFilter::NonDelegatingQueryInterface(struct _GUID const &,void * *)" (?NonDelegatingQueryInterface@CBaseFilter@@UAGJABU_GUID@@PAPAX@Z)
Harmony.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall CAsyncReader::~CAsyncReader(void)" (??1CAsyncReader@@UAE@XZ)
Harmony.obj : error LNK2001: unresolved external symbol "public: class CMediaType & __thiscall CMediaType::operator=(class CMediaType const &)" (??4CMediaType@@QAEAAV0@ABV0@@Z)
Harmony.obj : error LNK2001: unresolved external symbol "public: __thiscall CAsyncReader::CAsyncReader(char *,struct IUnknown *,class CAsyncStream *,long *)" (??0CAsyncReader@@QAE@PADPAUIUnknown@@PAVCAsyncStream@@PAJ@Z)
Debug/Harm1.exe : fatal error LNK1120: 25 unresolved externals
Error executing link.exe.




hope to hear from you....
thanks.
0
 
LVL 10

Expert Comment

by:RONSLOW
Comment Utility
Check that you have put a semi-colon (;) at the end of each of your class declarations (after the closing curly-brace).

If you leave that semi-colon out you get all sorts of funny messages on the NEXT class (or whatever) that follows.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now