This sample demonstrates how a C# program can interoperate with an unmanaged COM component.
This sample contains the source code for the COM Interop Part 1: C# Client Tutorial.
Building and Running the Sample Within Visual Studio
To build and run the COM Interop Part 1 samples
Open the solution (COMInteropPart1.sln).
In Solution Explorer, right-click the Interop1 project and click Set as StartUp Project.
In Solution Explorer, right-click the Interop1 project and click Properties.
Open the Configuration Properties folder and click Debugging.
In the Command Line Arguments property, enter an avi file (such as c:\winnt\clock.avi).
Click OK.
From the Debug menu, click Start Without Debugging.
Repeat steps 2 through 7 for Interop2.
If the QuartzTypeLib.dll included with Interop1 is out of date
In Solution Explorer, open Interop1's References.
Right-click QuartzTypeLib and click Remove.
Right-click References and click Add Reference.
In the COM tab, select the component named "ActiveMovie control type library."
Click Select and OK.
Rebuild Interop1.
Note Adding a reference to the component does the same thing as invoking tlbimp at the command line to create QuartzTypeLib.dll (as in step 2 below).
Building and Running the Sample from the Command Line
To build and run the COM Interop Part 1 samples
Use the cd command to change to the Interop1 directory.
Type the following:
tlbimp %windir%\system32\quartz.dll /out:QuartzTypeLib.dll
csc /r:QuartzTypeLib.dll interop1.cs
interop1 %windir%\clock.avi
Use the cd command to change to the Interop2 directory.
Type the following:
csc interop2.cs
interop2 %windir%\clock.avi
没有合适的资源?快使用搜索试试~ 我知道了~
Welcome to the Microsoft Visual C# .NET samples!
共263个文件
cs:77个
csproj:60个
txt:32个
需积分: 0 7 下载量 55 浏览量
2008-11-23
12:23:44
上传
评论
收藏 261KB ZIP 举报
温馨提示
This sample describes and shows how arrays work in C#. This sample contains the source code for the Arrays Tutorial. Building and Running the Sample Within Visual Studio To build and run the Arrays sample Open the solution (Arrays.sln). From the Debug menu, click Start Without Debugging. Building and Running the Sample from the Command Line To build and run the Arrays sample Type the following at the command prompt: csc arrays.cs arrays
资源详情
资源评论
资源推荐
收起资源包目录
Welcome to the Microsoft Visual C# .NET samples! (263个子文件)
CARSSELECTORSAMPLE.ASPX 7KB
PROCESSCONTROLLER.BMP 214KB
SAVE.BMP 2KB
HELP.BMP 2KB
NEW.BMP 2KB
OPEN.BMP 2KB
PRINT.BMP 2KB
PREVIEW.BMP 2KB
SCRIBBLE.CHM 14KB
COMCLIENT.CPP 2KB
DISPLAYFORM.CS 26KB
SCRIBBLE.CS 25KB
MAINFORM.CS 19KB
DISPLAYPANEL.CS 14KB
SERVICECONTROLLERMANAGER.CS 9KB
DRIVERCONTROLLERMANAGER.CS 9KB
PROCESSCONTROLLERMANAGER.CS 9KB
CARSSELECTORSAMPLE.ASPX.CS 7KB
GRAPHICTAB.CS 7KB
INDEXEDPROPERTY.CS 6KB
SCRIBBLEVIEW.CS 6KB
SCRIBBLEDOC.CS 6KB
FORM1.CS 5KB
MONITORSAMPLE.CS 5KB
ATTRIBUTESTUTORIAL.CS 4KB
EXAMPLE4.CS 4KB
SIMPLEPOOL.CS 4KB
DBBOOL.CS 4KB
MDIMAIN.CS 4KB
INTEROP2.CS 4KB
BOOKSTORE.CS 4KB
MUTEX.CS 3KB
OLEDBSAMPLE.CS 3KB
SERVICEINFO.CS 3KB
SUPPRESSSECURITY.CS 3KB
IMPERATIVESECURITY.CS 3KB
CREATEWORDASSEMBLY.CS 3KB
EVENTS1.CS 3KB
PRINTVERSION.CS 2KB
DECLARATIVESECURITY.CS 2KB
EXAMPLE3.CS 2KB
EVENTS2.CS 2KB
ASSEMBLYINFO.CS 2KB
INDEXER.CS 2KB
INTEROP1.CS 2KB
FASTCOPY.CS 2KB
EXAMPLE2.CS 2KB
XMLSAMPLE.CS 2KB
READFILE.CS 2KB
ASSEMBLYINFO.CS 2KB
EXPLICIT2.CS 2KB
TOKENS.CS 2KB
CLASS1.CS 2KB
TOKENS2.CS 2KB
CONVERSION.CS 2KB
STOPJOIN.CS 2KB
STRUCTCONVERSION.CS 2KB
ASSEMBLYINFO.CS 2KB
ASSEMBLYINFO.CS 2KB
EXPLICIT1.CS 1KB
PERSON.CS 1KB
COMPLEX.CS 1KB
COMPOSE.CS 1KB
FUNCTIONCLIENT.CS 1KB
VERSIONING.CS 1KB
SHAPES.CS 1KB
EXAMPLE1.CS 1021B
DIGITCOUNTER.CS 807B
CSHARPSERVER.CS 789B
LOGFONT.CS 774B
ARRAYS.CS 758B
ABSTRACTSHAPE.CS 731B
PINVOKE.CS 696B
STRUCT2.CS 672B
TRACETEST.CS 662B
STRUCT1.CS 604B
FACTORIAL.CS 576B
CMDLINE1.CS 562B
SHAPETEST.CS 561B
MARSHAL.CS 480B
HELLO3.CS 462B
PINVOKETEST.CS 422B
CONDMETHOD.CS 416B
CMDLINE2.CS 401B
HELLO4.CS 241B
HELLO2.CS 212B
HELLO1.CS 202B
EVENTS.CSPROJ 5KB
PROCESSCONTROLLER.CSPROJ 5KB
SCRIBBLE.CSPROJ 5KB
PERFMON.CSPROJ 5KB
COLLECTIONCLASSES.CSPROJ 4KB
MULTLINGUALFORM.CSPROJ 4KB
CSHARPSERVER.CSPROJ 3KB
INTEROP1.CSPROJ 3KB
FUNCTIONTEST.CSPROJ 3KB
SHAPETEST.CSPROJ 3KB
MUTEX.CSPROJ 3KB
MONITORSAMPLE.CSPROJ 3KB
PRINTVERSION.CSPROJ 3KB
共 263 条
- 1
- 2
- 3
GUYI3126
- 粉丝: 2
- 资源: 6
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0