Let's say I am using SharpDevelop/VS to develop an app that uses PowerPoint.
Do I need to recompile the app so there is a build for each version of MS Office?
I have MS Office 2007, but I would also like the app to work with Office 2003 and later, without having to recompile the app for each version.
Do I just need to install the appr...
I am currently developing an application for Windows CE on the TI OMAP processor, which is an ARM processor. I am trying to simply call a function in a C++ DLL file from C# and I always get a value of 0 back, no matter which data type I use. Is this most likely some kind of calling convention mismatch? I am compiling the DLL and the m...
I'm using the latest version of the QuickTime SDK and want to have the audio from the "movies" (they are referenced as movies but can be mp3, m4a, mov, and other filetypes) played through specific audio devices if the user has more than one audio device.
Apple has a couple functions in one of their samples that allow you to do this but ...
I have a project that is mixed Java/Scala, it is Java GUI code that makes use of a Scala library. Is there a way to write Scala code such that it will emit Java enums on compile time? The approaches I tried so far (sealed case classes, extend Enumeration) seem to generate normal classes which makes working with them from Java much hairie...
Back in the day, I wrote an out-of-process (i.e. EXE) COM server using VC++ 7.x (Visual Studio 2003 and .Net 1.1) using the ATL library. The server used the Multi Threaded Apartment (MTA) model and is activated by DCOM calls (VB6 clients). Multiple client requests are satisfied by a single process -- which is activated by the first req...
I'm trying to write a managed library in C# that will act as an event source for an existing C++ event sink. The problem I'm having is that when the unmanaged app calls AtlAdvise to get the connection point map for my library it is getting the error "0x80040200" (CONNECT_E_NOCONNECTION) - There are a couple of MSDN articles about that er...
I have a .Net class that calls a c++ COM object which in turn calls another .Net class in COM.
I've found that the two .Net classes are in seperate appdomains (which makes some trouble with log4net). Note they are in the same thread though.
Why is this?
Is there a way to ensure they will be in the same appdomain?
...
I'd like to start developing applications for iPhone, but I'd really like to use OCaml rather than Objective-C. After some googling, it seems like this is definitely possible, but I haven't found any code snippets which actually compile.
Is it possible to write iPhone apps using OCaml? If so, could you provide a snippet demonstrating ho...
I have an application that has its own database as a COM component. I need to write an application that links into an already running instance for this COM database using C# so that I can tweek the values in the database and see how they effect the application.
In the past I have written similar applications using Monikers.
Is there a...
Using Winspector I've found out the ID of the child textbox I want to change is 114. Why isn't this code changing the text of the TextBox?
[DllImport("user32.dll")]
static extern IntPtr GetDlgItem(IntPtr hDlg, int nIDDlgItem);
[DllImport("user32.dll")]
public static extern int SendMessage(IntPtr hWnd, int msg, int Param,...
I am attemping to use NetUseAdd to add a share that is needed by an application. My code looks like this.
[DllImport("NetApi32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
internal static extern uint NetUseAdd(
string UncServerName,
uint Level,
IntPtr Buf,
out uint ParmError);
...
USE_INFO_2 info = new U...
I am upgrading vb.net app that handles the events of a COM object (possibly written in VB6) from framework 1.1 to WPF 2.0/3.5
The code: (object names simplified for brevity)
public class MyClass
Private WithEvents serviceMonitor As COMOBJECT.ServiceMonitor
Public Sub New()
serviceMonitor = New COMOBJECT.ServiceMonitor()...
Making an adobe flex ui in which data that is calculated must use proprietary functions from a dll.
How can I import this dll into actionscript?
Is this the only way to achieve my goal?
Thanks!
...
This is my first serious attempt at P/invoke. This is a console app I'm using to work out the code for a web service that will hopefully return a mac address from an ip address or fully qualified system name. The code compiles. However when run without args, I get an unhandled exception-IndexOutOfRangeException. If I run it with args, I ...
I have a COM object I imported in my test C# solution.
Everything works fine and continues to do so.
Then I imported the same COM object in my actual solution and as a test implemented the exact same lines as in the test project.
When I run the real project I get an InvalidCastException
Unable to cast COM object of type 'CTWebReport.We...
Hey guys.
One of my users is having an issue when trying to open an Excel file through my C# app. Everything works ok when I run it from my machine and it works for other users. I am no Excel interop expert so hopefully you guys can help me out.
Here is how it is setup:
I added a reference to my app to Microsoft.Office.Interop.Excel....
I am writing a Windows CE application in C# that references a native C++ DLL (that I am also coding) using the following method:
[DllImport("CImg_IP_CE.dll")]
public static unsafe extern void doBlur(byte* imgData, int sigma);
This actually works fine but I am unable to debug the DLL. When I check the debug modules that are load...
We use MapInfo MapX mapping engine in our ASP.NET application. After server (Windows Server 2003 SP2) reinstallation we encountered a strange problem - web app hangs when accessing ActiveX instance.
For example:
MapXLib.Map _mapXMap =
(MapXLib.Map)HttpContext.Current.Server.CreateObject("MapX.Map.5");
_mapXMap.MapUnit = MapXLib.M...
According to the msdn documentation:
GetPictureFromObject method
Returns a picture (Visual Basic Picture object) of the current map view.
After digging around, I found that this "Picture" object apparently hasn't existed since VB6. I guess there's no way to write a class to masquerade as this type... Or is there?
...
I am trying to use the VirtualBox COM API (VBoxC.dll) from C#. I ran
tlbimp VirtualBox.tlb
against the typelib included in the VirtualBox SDK. Referencing the output assembly builds OK but at runtime I get a SafeArrayTypeMispatchException ("Specificed array was not of the expected type") whenever I try to access properties that retur...