interop

Issue with Silverlight interop with JBoss WebService

I have a simple JAXWS webservice deployed in JBoss. It runs fine with a java client but I'm trying to connect using a Silverlight 3.0 application. I've changed the webservice to use Soap 1.1: @BindingType(value = "http://schemas.xmlsoap.org/wsdl/soap/http") public class UserSessionBean implements UserSessionRemote { ... } I'm using...

C DLL doesn't load in C#

Hello, I have a simple C DLL (not COM). I have also a C# 2.0 application that runs it (dllimport). The dll is placed in the exe of the application. I know that the dll is ok and also that my application that calls it success reading it, but when I move them to another computer it says that it can load the dll. The error : "Unable to l...

Proper Interop Cleanup

I have the below method for spellchecking in my in house app. As a new programmer this was pieced together through multiple sources and tweaked until it worked for me. As I grow and learn I come across things that make me go, hmm. Like this SO post,How to properly clean up Excel interop objects in C#, that talks about proper Interop...

C# Com Interop with Windows Media Player Visualisation (With Sample Code)

I am attempting to create a Windows Media Player (WMP) Visualization plugin in C#. I am quite new to exposing C# to COM and may have missed something basic. I have persisted with this for 3 days (about 20 hours) and not got past the single issue I will describe below. For those who don't know, WMP visualizations are the pretty images th...

Nested structures in C# P/Invoke

I am trying to call into an unmanaged DLL that has the following structure: typedef struct { int num_objects; ppr_object_type *objects; } ppr_object_list_type; ppr_coordinate_type; typedef struct { int model_id; ppr_coordinate_type position; float scale_factor; float size; ppr_rotation_type rotation; int...

Could not load file or assembly 'Microsoft.mshtml ... Strong name validation failed.

I made a WPF/C# program and I am using the internet control for WYSIWYG HTML editing. it is a regular Executable program. it works on most computers however some computers are giving me the following error. Could not load file or assembly 'Microsoft.mshtml, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'...

DeviceIoControl returning false

In my C# code,DeviceIoControl is returning false,the handle is correct DeviceIoControl(deviceHandle, IOCTL_STORAGE_GET_DEVICE_NUMBER, IntPtr.Zero, 0, OutBuffPtr,//&psdn, OutBuffSize, ref dwBytesReturned, IntPtr.Zero); ...

Notification CeSetUserNotificationEx with custom sound

Hail all! I want to display notification and play custom sound on my Windows Mobile 5/6 device. I have tried something like that, but my custom sound does not play, though message is displayed with standart sound. If i edit Wave key in [HKEY_CURRENT_USER\ControlPanel\Notifications{15F11F90-8A5F-454c-89FC-BA9B7AAB0CAD}] to sound file i n...

What exactly is the GNU tar ././@LongLink "trick"?

I read that a tar entry type of 'L' (76) is used by gnu tar and gnu-compliant tar utilities to indicate that the next entry in the archive has a "long" name. In this case the header block with the entry type of 'L' usually encodes the name ././@LongLink . My question is: where is the format of the next block described? The format o...

Protecting code in COM objects

Hi, how can I protect my business logic C# code that I have written in a COM object from being reverse engineered by a high tech geek? ...

C#, VB6 and the Decimal data type

Im writing a C# class library which is going to be used as a proxy between a VB6 application and WCF service. Some of the WCF service methods use Decimal data types as parameters which Im unable to duplicate directly in the interface I provide to the VB6 application as this is an unsupported type. How do I implement this in the COM in...

Building C#/.NET Apps that Use Windows 7 TaskBar Features

The new Windows 7 taskbar features, like jump lists, previews, etc. are really cool, and I want to allow my C# applications to use them. I have two questions: First of all, how can I use these functions (in general)? I found two articles by Microsoft about this, but I'm not really sure what to do. Could you provide links to a library, a...

Configure .NET-Based Components for Registration-Free Activation

I've been trying to get a registration-free .NET based COM DLL to work, but without success. In Visual Studio 2008 I added a new C# class library. I enabled the 'make assembly COM-visible' and 'register for COM interop' options. I added a public interface and class with some functions. I added a manifest dependency to my C++ client app...

"Bad binary signature" in ASP.NET MVC application

We are getting the error above on some pages of an ASP.NET MVC application when it is deployed to a 64 bit Windows 2008 server box. It works fine on our development machines, though these are 32 bit XP. Just wondered if anyone had encountered this before, and has any suggestions? Details as follows: Bad binary signature. (Exception f...

open source photo album software?

I have a friend who had been using a proprietary photo album product and reached a hard limit on the number of photos. He managed to export the data to spreadsheet format (including image filenames) plus he of course saved the image files themselves. He says there doesn't seem to be any other product that can import this format. Is th...

Registering handlers for .NET COM event in C++

I've been following the 'tutorials' of how to expose a .NET framework through COM ( http://msdn.microsoft.com/en-us/library/zsfww439.aspx and http://msdn.microsoft.com/en-us/library/bd9cdfyx.aspx ). Everything works except for the events part. When I add events to the C# interface the following C++ code is generated: struct __declspec(u...

COM pointer to struct

Hello, I'm using Visual Studio 2008/.NET 3.5. I used VS to make a COM component interoperable in .NET. I added a reference from the application to the COM DLL. The COM DLL is a 3rd party object - part of an SDK. For all methods and events everything is working just fine - COM objects/events are represented as a first class .NET objects...

Find out if item exists in Microsoft.Office.Interop.Word.Styles collection

Hi I'm trying to access an item on the Styles collection of a word document, I was wondering if there's a way to know if an item with a given key exists without it throwing an exception. Right now I'm doing something like: newStyle = _document.Styles.get_Item(ref styleName); This works when the item exists, if it doesn't it will fai...

Temporarily save Word document changes

Hi I'm using Interop to create a "custom word editor", basically I've incorporated MS Word on my application and I allow users to edit a document and insert custom fields from a predefined list. I provide a "Preview" option to see how the document will appear when the data is added. The users can start editing a template on my applica...

What is the proper PInvoke signature for a function that takes var args?

There is a native function: int sqlite3_config(int, ...); I would like to PInvoke to this function. Currently, I have this declaration: [DllImport("sqlite3", EntryPoint = "sqlite3_config")] public static extern Result Config (ConfigOption option); (Result and ConfigOption are enums of the form enum Result : int { ... }.) I am actu...