Click here to Skip to main content
15,921,622 members
Home / Discussions / C#
   

C#

 
GeneralRe: responding to javascript in html Pin
JeromeKJerome29-Oct-04 13:41
JeromeKJerome29-Oct-04 13:41 
GeneralRe: responding to javascript in html Pin
Heath Stewart30-Oct-04 3:16
protectorHeath Stewart30-Oct-04 3:16 
GeneralRe: responding to javascript in html Pin
JeromeKJerome1-Nov-04 8:09
JeromeKJerome1-Nov-04 8:09 
GeneralRe: responding to javascript in html Pin
Heath Stewart1-Nov-04 8:11
protectorHeath Stewart1-Nov-04 8:11 
GeneralVisual Studio Add-In C# Pin
Nxsis28-Oct-04 7:54
Nxsis28-Oct-04 7:54 
GeneralRe: Visual Studio Add-In C# Pin
Heath Stewart28-Oct-04 15:40
protectorHeath Stewart28-Oct-04 15:40 
GeneralOffice Programming with C# Pin
Member 140011328-Oct-04 7:02
Member 140011328-Oct-04 7:02 
GeneralRe: Office Programming with C# Pin
Heath Stewart28-Oct-04 15:35
protectorHeath Stewart28-Oct-04 15:35 
Always target the earliest possible typelib for Outlook. So, if you want to support Outlook 10 and 11, then interop the Outlook 10 typelib. For the most part (and for all Office products and properly written COM servers), COM servers are backward compatible (published interfaces should never changed, class IDs should never change but should implement new versions of interfaces, etc.).

You should not use your own, though. Office 2003 ships with the Office Primary Interop Assemblies (PIAs) (the ".NET Framework Programming Support" feature, or something like that) and you can download the PIAs for Office 2002 from http://www.microsoft.com/downloads/details.aspx?FamilyId=C41BD61E-3060-4F71-A6B4-01FEBA508E52&displaylang=en[^]. It's good to install and use the PIAs (once you install them correctly (read the README file) they will be referenced automatically instead of your own being created) since they are "official" RCWs (Runtime Callable Wrappers), typically from the company that created the COM server you're trying to interop with (and in these case they do come from Microsoft).

You must deploy these with your application, but should not - without a license - deploy the actual products (interop assemblies merely allow the Runtime to marshal calls to the COM servers that the interop assemblies/typelibs describe).

As far as the other exceptions, you must validate your code. The first is what happens when you don't check return values for null and the second is when you cast objects to types when the objects are that type or aren't derivatives of that type (or don't implement the interface if the interface was imported from a COM typelib).

It's not enough to just install the interop assemblies as I said above. The actual products must be installed on the machine. The interop assemblies (and typelibs, for that matter) do not contain the implementation, but merely describe it and assist clients with how to call the implementation it describes.

This posting is provided "AS IS" with no warranties, and confers no rights.

Software Design Engineer
Developer Division Sustained Engineering
Microsoft

[My Articles] [My Blog]
GeneralIIS server Pin
ppp00128-Oct-04 6:41
ppp00128-Oct-04 6:41 
GeneralRe: IIS server Pin
Alex Korchemniy28-Oct-04 9:59
Alex Korchemniy28-Oct-04 9:59 
GeneralRe: IIS server Pin
Heath Stewart28-Oct-04 15:22
protectorHeath Stewart28-Oct-04 15:22 
GeneralAVI to WMV Pin
ee9903528-Oct-04 6:00
ee9903528-Oct-04 6:00 
GeneralRe: AVI to WMV Pin
Heath Stewart28-Oct-04 15:10
protectorHeath Stewart28-Oct-04 15:10 
GeneralXslTransform object protection level problem Pin
kroakdammit28-Oct-04 5:48
kroakdammit28-Oct-04 5:48 
GeneralRe: XslTransform object protection level problem Pin
Heath Stewart28-Oct-04 15:05
protectorHeath Stewart28-Oct-04 15:05 
GeneralRe: XslTransform object protection level problem Pin
kroakdammit28-Oct-04 23:24
kroakdammit28-Oct-04 23:24 
GeneralRe: XslTransform object protection level problem Pin
kroakdammit28-Oct-04 23:33
kroakdammit28-Oct-04 23:33 
GeneralCopy a piece of an Image Pin
delemur28-Oct-04 5:20
delemur28-Oct-04 5:20 
GeneralRe: Copy a piece of an Image Pin
Christian Graus28-Oct-04 9:36
protectorChristian Graus28-Oct-04 9:36 
GeneralRe: Copy a piece of an Image Pin
Alex Korchemniy28-Oct-04 9:56
Alex Korchemniy28-Oct-04 9:56 
QuestionHow to do this in C#? Pin
momer28-Oct-04 5:02
momer28-Oct-04 5:02 
AnswerRe: How to do this in C#? Pin
Christian Graus28-Oct-04 9:39
protectorChristian Graus28-Oct-04 9:39 
GeneralRe: How to do this in C#? Pin
Mike Dimmick28-Oct-04 10:47
Mike Dimmick28-Oct-04 10:47 
GeneralRe: How to do this in C#? Pin
momer28-Oct-04 14:57
momer28-Oct-04 14:57 
GeneralRe: How to do this in C#? Pin
Christian Graus28-Oct-04 15:01
protectorChristian Graus28-Oct-04 15:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.