DirectShow with WindowForms
Hello, I tryed the example fromhttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/directshow/htm/gettingstarted.asp as an console application and everything was fine.
But now I create it as WindowsForms project with VS 2005 Pro. I added a button to Form1, which executes the samplecode. I changed in the code the "printf" in MessageBox, included <dshow.h> and linked strmiids.lib, but i get the following errorcode(sorry its in german):
1>Kompilieren...
1>hallo.cpp
1>AssemblyInfo.cpp
1>Code wird generiert...
1>Verknüpfen...
1>hallo.obj : error LNK2028: Nicht aufgel?stes Token (0A00000E) ""extern "C" void __stdcall CoUninitialize(void)" (?CoUninitialize@@$$J10YGXXZ)", auf das in Funktion ""private: void __clrcall hallo::Form1::button1_Click(class System::Object ^,class System::EventArgs ^)" (?button1_Click@Form1@hallo@@$$FA$AAMXP$AAVObject@System@@P$AAVEventArgs@4@@Z)" verwiesen wird.
1>hallo.obj : error LNK2020: Nicht aufgel?stes Token (0A00000F) IID_IMediaEvent.
1>hallo.obj : error LNK2020: Nicht aufgel?stes Token (0A000010) IID_IMediaControl.
1>hallo.obj : error LNK2020: Nicht aufgel?stes Token (0A000011) CLSID_FilterGraph.
1>hallo.obj : error LNK2020: Nicht aufgel?stes Token (0A000012) IID_IGraphBuilder.
1>hallo.obj : error LNK2028: Nicht aufgel?stes Token (0A000013) ""extern "C" long __stdcall CoCreateInstance(struct _GUID const &,struct IUnknown *,unsigned long,struct _GUID const &,void * *)" (?CoCreateInstance@@$$J220YGJABU_GUID@@PAUIUnknown@@K0PAPAX@Z)", auf das in Funktion ""private: void __clrcall hallo::Form1::button1_Click(class System::Object ^,class System::EventArgs ^)" (?button1_Click@Form1@hallo@@$$FA$AAMXP$AAVObject@System@@P$AAVEventArgs@4@@Z)" verwiesen wird.
1>hallo.obj : error LNK2028: Nicht aufgel?stes Token (0A000015) ""extern "C" long __stdcall CoInitialize(void *)" (?CoInitialize@@$$J14YGJPAX@Z)", auf das in Funktion ""private: void __clrcall hallo::Form1::button1_Click(class System::Object ^,class System::EventArgs ^)" (?button1_Click@Form1@hallo@@$$FA$AAMXP$AAVObject@System@@P$AAVEventArgs@4@@Z)" verwiesen wird.
1>hallo.obj : error LNK2019: Verweis auf nicht aufgel?stes externes Symbol ""extern "C" void __stdcall CoUninitialize(void)" (?CoUninitialize@@$$J10YGXXZ)" in Funktion ""private: void __clrcall hallo::Form1::button1_Click(class System::Object ^,class System::EventArgs ^)" (?button1_Click@Form1@hallo@@$$FA$AAMXP$AAVObject@System@@P$AAVEventArgs@4@@Z)".
1>hallo.obj : error LNK2001: Nicht aufgel?stes externes Symbol "IID_IMediaEvent".
1>hallo.obj : error LNK2001: Nicht aufgel?stes externes Symbol "IID_IMediaControl".
1>hallo.obj : error LNK2019: Verweis auf nicht aufgel?stes externes Symbol ""extern "C" long __stdcall CoCreateInstance(struct _GUID const &,struct IUnknown *,unsigned long,struct _GUID const &,void * *)" (?CoCreateInstance@@$$J220YGJABU_GUID@@PAUIUnknown@@K0PAPAX@Z)" in Funktion ""private: void __clrcall hallo::Form1::button1_Click(class System::Object ^,class System::EventArgs ^)" (?button1_Click@Form1@hallo@@$$FA$AAMXP$AAVObject@System@@P$AAVEventArgs@4@@Z)".
1>hallo.obj : error LNK2001: Nicht aufgel?stes externes Symbol "IID_IGraphBuilder".
1>hallo.obj : error LNK2001: Nicht aufgel?stes externes Symbol "CLSID_FilterGraph".
1>hallo.obj : error LNK2019: Verweis auf nicht aufgel?stes externes Symbol ""extern "C" long __stdcall CoInitialize(void *)" (?CoInitialize@@$$J14YGJPAX@Z)" in Funktion ""private: void __clrcall hallo::Form1::button1_Click(class System::Object ^,class System::EventArgs ^)" (?button1_Click@Form1@hallo@@$$FA$AAMXP$AAVObject@System@@P$AAVEventArgs@4@@Z)".
1>C:\Dokumente und Einstellungen\Administrator\Eigene Dateien\Visual Studio 2005\Projects\hallo\Debug\hallo.exe : fatal error LNK1120: 14 nicht aufgel?ste externe Verweise.
1>Das Buildprotokoll wurde unter "file://c:\Dokumente und Einstellungen\Administrator\Eigene Dateien\Visual Studio 2005\Projects\hallo\hallo\Debug\BuildLog.htm" gespeichert.
1>hallo - 15 Fehler, 0 Warnung(en)
========== Erstellen: 0 erfolgreich, Fehler bei 1, 0 aktuell, 0 übersprungen ========
Please help.Thanks.

