[。NET]たった3行のビデオプレーヤーを作成する
1。 むやみにVisual Studio 2008を浮かべてC#WinFormプロジェクトを作成する
2。 [Add Reference]でMicrosoft.DirectX.AudioVideoPlaybackを追加してくれて(DirectXは敷かれている必要があります)
3。 Formをダブルクリックし、次のように打ってくれる。
; using Microsoft.DirectX.AudioVideoPlayback;
Form1_Load ( object sender, EventArgs e ) { private void Form1_Load(object sender、EventArgs e){
FromFile ( @"c:\test.avi" ) ; Video v = Video。FromFile(@ "c:\ test.avi");
= this ; v。Owner = this;
( ) ; v。Play();
}
Form1_Load ( object sender, EventArgs e ) { private void Form1_Load(object sender、EventArgs e){
FromFile ( @"c:\test.avi" ) ; Video v = Video。FromFile(@ "c:\ test.avi");
= this ; v。Owner = this;
( ) ; v。Play();
}
4。 F5を押してください。
ところではならない。
[Debug] - [Exceptions] - [LoaderLock]のThrown項目をコジュンダ。

5。 F5を押してください。
ㅋㅋㅋ成功.... 
[雑説]
今回の一週間WDMデバイスドライバプログラミング教育している。
Kernel Modeプログラムでは、ちょっとだけ下手するとブルースクリーン...
久しぶりに見るVisualStudio ...アンボドン間変わったな...







