Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 491
  • Last Modified:

DirectX 9 in a ATL COM

I have an ATL COM Project that has Directx9 code in it.  I have the include and lib directories pointed to the DXSDK appropriate folders.  But I get the following errors:

D:\MyProjects\Player\VOB.cpp(37) : error C2143: syntax error : missing ';' before '*'
D:\MyProjects\Player\VOB.cpp(37) : error C2501: 'IGraphBuilder' : missing storage-class or type specifiers
D:\MyProjects\Player\VOB.cpp(37) : error C2501: 'pGB' : missing storage-class or type specifiers
D:\MyProjects\Player\VOB.cpp(38) : error C2143: syntax error : missing ';' before '*'
D:\MyProjects\Player\VOB.cpp(38) : error C2501: 'IMediaControl' : missing storage-class or type specifiers
D:\MyProjects\Player\VOB.cpp(38) : error C2501: 'pMC' : missing storage-class or type specifiers

Can I use DirectX from a dll or am I forgetting to add something?


#include <dshow.h>
#include "stdafx.h"
#include "Player.h"
#include "VOB.h"


Thanks
0
Evaus
Asked:
Evaus
1 Solution
 
Chase707Commented:
Strange -- of course you can use directx in a DLL.

Maybe if you try this:

#include "stdafx.h"
#include <dshow.h>
#include "Player.h"
#include "VOB.h"



usually VC++ Requires the precompiled header include as the first include.

Chase707
0

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now