interop

Access Additional Exchange Mailbox using Microsoft.Office.Interop.Outlook

I'm trying to find a way using the Office.Interop.Outlook COM object to connect to an additional Mailbox. Currently I am doing the following (after adding the COM object): var app = new Microsoft.Office.Interop.Outlook.Application(); var ns = app.GetNamespace("MAPI"); ns.Logon(); var inboxFolder = ns.GetDefaultFolder(Microsoft.Office....

Excel Recalculation

I am using the excel pia's to do some writing and reading to/from excel spreadsheets, i may just be being paranoid but i have the following questions: As far as i can tell Excel recalculates the formulas in the worksheet upon every write but... is this the case? - ie is it possible to do series of write read write read and not to read...

How can this be not equal?

My Goal: Extracting one value from an Excel Range, and verify for these cells' value to be the same within this range; When a cell's value is not the same as the other, I need to return null. Here's a piece of code: internal object GetValueFromCells(string start, string end, Formats format) { // Verifying for empty or null parame...

How to deploy new version of .NET component to allow easy rollback to prior version

What is the best way to deploy a new version of a .NET component and to allow easy rollback to a prior version? The .NET DLL is being used by a VB6 app. What would be the best way to quickly revert to the prior version of the DLL if a problem occurred with the new DLL? ...

Why is jboss seeing an empty List<Object> from Coldfusion webservice that returns an array of structs?

I have a coldfusion 8 webservice that returns an array <cffunction access="remote" name="testMethod" returntype="array"> <cfset myArray = ArrayNew(1)> <cfset myArray[1] = "Steve"> <cfreturn myArray/> </cffunction> I am using jboss 5.1 GA community with Jbossws 3.2.2.GA consuming the service. The stubs are being built with ...

Access VBA equivalent to a C# List<T>

I have a COM-visible object written in C# that accepts a list of string arrays. Could I send a Collection of string arrays from Access 2000 to this object and it work? If not, then what is the best way to send multiple string arrays to my C# object from Access 2000? ...

Is there a table of the matching types for marshaling in P/Invoke & InterOP?

I am almost buried by how the different dialects of types are matched between .NET world and native world. Such as MFC CList and other stuffs. I am desperately hoping for this: Some kind of table or cheetsheet that lists all the mappings between types of .NET world and native world. A table that lists all the types that can be marshal...

Access COM vtable from C#

Is there any way in C# to access a COM object's virtual method table in order to get a function's address? ...

Interoperable way to send XML data in WCF?

Hi, I'm using System.Xml.XmlElement as a parameter for sending XML data in WCF. Is this generally the interoperable way to send XML data in WCF, so that, for example, a PHP or Java Web Service will understand it if I'll send it from a WCF Client? I've read that I should never send XML directly as string in WCF. In WSDL generated by W...

WCF client Java interop - No Response Headers = MessageSecurityEx

I am using a WCF client to communicate with a Websphere hosted web service. The service requires my message to be signed, but not encrypted. This is being done and works as expected. I can see in my trace logs that I get a valid response back from the service. However, it isn't making past the proxy becuase of the following error: S...

ComVisible(false) class with ComVisible(true) members

I’m studying for Microsoft Certification exams and I came across a situation with a class that was not ComVisible but had methods that were. I assumed that since the class was not visible to COM, that its members would not be accessible. However, apparently the members can be ComVisible even if the class is not. How can COM access a cla...

.NET Interop and TR1 shared_ptr

How is it possible to marshal a shared_ptr from unmanaged C++ code into C#? I have a function in C++ (exposed through C bindings) that will allocate a new MyObject and return a pointer to it via a shared_ptr. In C++ I can call the function: MyObjHandle* ref = NULL: GetMyObject(&ref); // double ptr... where MyObjHandle is defined: ...

COMException: Type mismatch when trying to access a COM method

I tried to access a COM method by using a code like obj.Do("text") while Do is a method in obj which takes a ref string as its input (obj is a .COM object, written in VB6). However it always throw a COMException type mismatch. I tried passing obj.Do(ref a) while a is a string variable but it didn't work either. The VB code looks like th...

Interop question about StringBuilder.

I am calling a C# method from C code. The C# method: [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate void p_func(StringBuilder arg); public static void callback(StringBuilder arg) { Console.WriteLine(arg.ToString()); } The C method: extern "C" void c_method(p_func f) { char msg[4]; ...

How to enumerate word document using office interop API?

Hello everyone, I want to traverse through all the elements of an word document one by one and according to type of element (header, sentence, table,image,textbox, shape, etc.) I want to process that element. I tried to search any enumerator or object which can represent elements of document in office interop API but failed to find any. ...

Entry Point Not Found Exception

I'm trying to use a C++ unmanaged dll in a C# project and I'm getting an error when trying to call a function that says that entry point cannot be found. public class Program { static void Main(string[] args) { IntPtr testIntPtr = aaeonAPIOpen(0); Console.WriteLine(testIntPtr.ToString()); } ...

VBA Equivalent to List<T> in C#

Possible Duplicate: VB6 equivalent to a List<T> Duplicate of: Access VBA equivalent to a List<T> I posted this question with the wrong information before, so I am reposting it in the hopes of getting a correct answer. I have a COM-visible object written in C# that accepts a list of string arrays. Could I send a Colle...

Printing a pcl file in c# not working, suggestions?

I'm trying to print a pcl file programatically in c#. I'm using the following Microsoft link for reference. (Note it's in VB) http://support.microsoft.com/kb/298141 Unfortunatly, it's not work .. I'm only getting blank pages printed. Note that if I just copy the pcl file to the printer from prompt - i.e. copy filename printer. ...

How to make horizontal orientation (album) word document using Microsoft.Office.Interop.Word

How to make horizontal orientation (album) word document using Microsoft.Office.Interop.Word ...

How does Fortran return arrays?

The subroutine Rule_Tn in the Fortran library CUBPACK needs a parameter Integrand describing the integrated vector function. It's a INTERFACE FUNCTION Integrand(NF,X) RESULT(Value) USE Precision_Model INTEGER, INTENT(IN) :: NF REAL(KIND=STND), DIMENSION(:), INTENT(IN) :: X REAL(KIND=ST...