PDA

View Full Version : First Steps VC.NET ?simpletypes.h?



VisualC
May 14, 2008, 15:39:40
Hello,
I try to understand the 'First Steps' (IC Imaging Control C ++ -> Programmer`s Guide). I built step by step the ‘First Steps VC.NET’. But I get a lot of errors (60) in files which I never used / never worked on. For example in the files simplectypes.h, videonormitem.h and grabber.h .
The first error (file simplectypes.h) is “error C2146: missing ';' before identifier 'SampleStart'”. I never work on this file. The mistakes must be in an other file.
I hope, you can help me. Thanks.

Than I have a second question. When I will work without a window, because I want used a function (Viusal C++) in a graphics software … which kind of project should I select? Can I take the MFC.Application of C++?

Thank you! :)
Miller

Stefan Geissler
May 14, 2008, 16:59:22
Hi Miller,

did you add the include path to the IC classlib/include directory to your project? Also, is the DirectShow SDK installed (If not you usually get the "DShow.h not found" message.


Than I have a second question. When I will work without a window, because I want used a function (Viusal C++) in a graphics software … which kind of project should I select? Can I take the MFC.Application of C++?

Yes, you can use MFC. At least, it depends on youre graphics software.

VisualC
May 15, 2008, 09:35:51
Hello Mr. Geissler,
at first, thank you for the answers. :)




did you add the include path to the IC classlib/include directory to your project? Also, is the DirectShow SDK installed (If not you usually get the "DShow.h not found" message.


Yes, I did. This was the mistake before.

If I open the example-file 'VidNormFormat.sln' (Acquire Video Format Information), I get the same mistakes in simpletypes.h and so on. :(

Stefan Geissler
May 15, 2008, 10:03:04
In this case I suggest to play around with the sequence of the include directories. In the "Tools"->"Options" ->"Projects" -> "VC++ Directories" is the sequence on my Visual Studio 2003:
$(VCInstallDir)include
$(VCInstallDir)atlmfc\include
$(VCInstallDir)PlatformSDK\include\prerelease
$(VCInstallDir)PlatformSDK\include
$(FrameworkSDKDir)include

The include path to the IC include directories is set in the project settings.

The error you reference in your first post is


typedef struct tsMediaSampleDesc
{
REFERENCE_TIME SampleStart; ///< the start time of the sample as set by the video capture device
REFERENCE_TIME SampleEnd; ///< the end time of the sample as set by the video capture device
DWORD FrameNumber; ///< the frame number of the sample as set by the video capture device
///< the device does not need to set this field, or keep it updated
tFrameDesc FrameType; ///< the type of the frame
} tsMediaSampleDesc;

The error occurs, because REFERENCE_TIME is unknown. This is a DirectShow datatype and documented by Microsoft here:
http://msdn.microsoft.com/en-us/library/ms787550(VS.85).aspx
The REFERENCE_TIME structure is declared in two header files:
- strmif.h
- dsound.h
These header files are included by the DShow.h.

From this point of view, I think, the DirectX (DirectShow) SDK is not installed correctly on your computer. This also explains all the other errors you recieve.

VisualC
May 15, 2008, 15:49:56
Hm ... I searched on my computer for DirectX and I found that. I implement 'dxdiag' and got the infos. Now my question how I can contain (? einbinden) DirectX in my Visual Studio? With ' #define UDSHL_LIB_BASEDIR "..." '?

I included: #include "dshow.h" and you are right, errorC1083 (No such file or directory).

Stefan Geissler
May 15, 2008, 16:14:22
dxdiag belongs to the DirectX Runtime files, not to the SDK!


The file "dshow.h" and all related files are part of the DirectShow SDK of the "Windows® SDK Web Install", which can be found at following link: Visual Studio 2003: http://www.microsoft.com/downloads/details.aspx?FamilyID=8af0afa9-1383-44b4-bc8b-7d6315212323&DisplayLang=en

If the file "ddraw.h" is missing, then the DirectX SDK (427.8 MB) must be downloaded and installed too: http://www.microsoft.com/downloads/details.aspx?FamilyId=4B78A58A-E672-4B83-A28E-72B5E93BD60A&displaylang=en

Visual Studio 2005: http://www.microsoft.com/downloads/details.aspx?FamilyID=c2b1e300-f358-4523-b479-f53d234cdccf&displaylang=en&Hash=4jLdAAaWSzQyAWNmMpLGd8HlGzxsb8qQmucYFtOAJH52t nDaWFUOBEtcAaI7yNDv1CNxm6%2fyJWg1%2bhkolbm%2b%2bA% 3d%3d

On this page we recommend to click on the "Download" button for the web installer. After the web installer has been downloaded and started, select "custom setup" and uncheck all items except "DirectShow SDK". Then install.

In Visual Studio the pathes to the include and library directories of the new plattform SDK must be added. The plattform SDK will be installed into the Visual Studio directory.


Unfortunatelly this DirectShow SDK is not useable for Visual Studio VC++ 6.0. Using newer DirectShow SDKs in VC 6 leads to errors. This can be solved with define with:
#define NO_DSHOW_STRSAFE


(I hope, the links above are not outdated.)

VisualC
May 19, 2008, 12:49:41
Visual Studio 2005: http://www.microsoft.com/downloads/details.aspx?FamilyID=c2b1e300-f358-4523-b479-f53d234cdccf&displaylang=en&Hash=4jLdAAaWSzQyAWNmMpLGd8HlGzxsb8qQmucYFtOAJH52t nDaWFUOBEtcAaI7yNDv1CNxm6%2fyJWg1%2bhkolbm%2b%2bA% 3d%3d
(I hope, the links above are not outdated.)

Unfortunately the link is outdated. I searched on the site, but I get many results for ActiveX SDK and I don`t know which should I take.

Stefan Geissler
May 19, 2008, 15:53:04
Please try this link:

http://www.microsoft.com/downloads/details.aspx?FamilyID=4377F86D-C913-4B5C-B87E-EF72E5B4E065&displaylang=en

This is a web installer. I did not test this on my own. You may choose only the parts, you think you need.

VisualC
May 20, 2008, 09:56:21
Thanks for the link. Now I have installed this and I Include this in the include files list of my Visual Studio (-> Options -> Projects and Solutions -> VC++ Directories). Than I included this file in my program (#include "C:\Programme\Microsoft SDKs\Windows\v6.0\Include") and got the error:
fatal error C1083:File (Include) can not open: "C:\ ....": Permission denied.

What did I wrong? I am on the wrong track?

Stefan Geissler
May 21, 2008, 10:22:18
#include "C:\Programme\Microsoft SDKs\Windows\v6.0\Include"
This does not work, because you can not include directories, but files, usually with ".h" extension. Correct would be
#include "C:\Programme\Microsoft SDKs\Windows\v6.0\Include\blabla.h"

You already have added the path "C:\Programme\Microsoft SDKs\Windows\v6.0\Include" to the list of include directories, thus you can write
#include "blabka.h"

Sie können bei der "#include" Direktive eine Verzeichnisse angeben, sondern nur Dateien, gewöhnlich mit der ".h" Endung. Also sowas wie
#include "C:\Programme\Microsoft SDKs\Windows\v6.0\Include\blabla.h" ist richtig

Da Sie den Pfad "C:\Programme\Microsoft SDKs\Windows\v6.0\Include" bereits in Ihrer Visual Studio Umgebung angegeben haben, können Sie ihn beim "#include" auch weglassen, so daß da nur noch
#include "blabla.h"
steht.

Noch ein Nachtrag: Sie können mich auch gerne anrufen, so daß wir das Problem in den Griff bekommen.