com

How do I create a 64-bit native ATL C++ DLL in Visual Studio 2003?

I have a 32-bit ATL C++ in-proc COM server soultion. How do I port it to 64-bit Windows? I mean how do I make VC++7 emit 64-bit code? Is it possible with Visual Studio 2003? ...

Avoid or remove lock from StgOpenStorage()

Greets, I found a similar question at Opening OLE Compound Documents read-only with StgOpenStorage but that solution didn't work for me. I try to open an outlook .msg file with StgOpenStorage(). My problem is, that StgOpenStorage always locks my file. So, how can I avoid/remove the lock StgOpenStorage() adds to my file? (see last met...

scriptable objects in internet explorer content plugin

While there are many guides for Browser Helper Objects, i have a hard time finding resources on how to implement scriptable objects (i.e. besides the main control) for content plugins (i.e. embedded in website). To avoid misunderstandings: the question is about scriptable objects that a plugin object may return to the scripts in a websit...

How to convert outlook date to DateTime?

Hello, I'm trying to get the sent date from outlook mails. For external mails I got it already running (see: How do I read the Recieved Date from Outlook MSG files -without- the Outlook API?), but for internal mails I get sth. like "091026132413Z-64" where 091026 is the date 26.10.2009 (in german file format dd-mm-yyyy) and the rest...

How to access an indexed property on a COM object from Powershell

I'm using Powershell to talk to the Windows 7 task scheduler service via COM through the Task Scheduler 2.0 interfaces (e.g. ITaskDefinition). I want to pull out a particular trigger from the Triggers collection on ITaskDefinition. It appears that the proper way to extract a particular trigger is through the Item property, which is an in...

WMEncoder Throws COMException (0x80004005) Unspecified Error

So I'm running this code public static void ConvertToWma(string inFile, string outFile, string profileName) { // Create a WMEncoder object. WMEncoder encoder = new WMEncoder(); ManualResetEvent stopped = new ManualResetEvent(false); encoder.OnStateChange += delegate(WMENC_ENCODER_STATE enumState) ...

.NET Framework version and COM objects

We have an MFC applcation EXE that hosts COM objects which are the main parts of the application, this is so we can dymanically build in more functionality. Lately new code has been created using C# and made COM visible supporting the same interface. These have all typically been built against V2.X .Net runtime. We now want to be able to...

Using ActiveX with Silverlight

I would really like to use Silverlight for a project I'm working on but I will need to interact with an application running on the user's desktop. Is it possible to do this with Silverlight, or am I stuck with ASP.NET + ActiveX? ...

The type library importer encountered an error during type verification

I am writing a C# application which has several COM references. When I attempt to build it I get the following error for some of them: c:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(1418,9): error MSB3303: Could not resolve COM reference "70850f66-869f-44a0-88e7-b0460a7e3bf3" version 0.1. The type library importer e...

is DISPID_VALUE reliable for invokes on IDispatchs from scripts?

Continuing from this question, i am confused whether DISPID_VALUE on IDispatch::Invoke() for script functions and properties (JavaScript in my case) can be considered standard and reliable for invoking the actual function that is represented by the IDispatch? If yes, is that mentioned anywhere in MSDN? Please note that the question is ...

Vista and out-of-process COM server

I'm having a hell of a time trying to figure out user privilidges and security settings on Vista. The situation is this: I have a 32 bit C++ application that acts as an out-of-process (==standalone exe) COM server. I have several .Net, FoxPro, X++ and C/AL client applications that use this server. They all work on WindowsXP. They often ...

How to get real bullet positions in MS PowerPoint 2003

Hi, guys. I'm working on PowerPoint 2003 presentation conversion into some format, and I'm confused very much at one moment. Really, I can't understand what I'm doing wrong for almost two days wasting my time for this i-thought-it-was-tiny problem. I use PowerPoint Object Model to get the presentation document structure and its layout, ...

How to tell if I'm leaking IMalloc memory?

I'd like to just know if there is a well-established standard way to ensure that one's process doesn't leak COM based resources (such as IMalloc'd objects)? Take the following code as an example: HRESULT STDMETHODCALLTYPE CShellBrowserDialog::OnStateChange(__RPC__in_opt IShellView *ppshv, ULONG uChange) { TRACE("ICommDlgBrowser::On...

Best way to port MFC COM Server to Managed code

Hi all, I am working on an application suite comprising of multiple Automation servers written using MFC and this is legacy code. These apps inter communicate via COM interfaces and other events. Most of these apps provide multiple form views with various input controls to capture information. I was wondering what would be the best way ...

COM Interop registration problem

I have a .net assembly which I am exposing to com. the assembly has two public interfaces and one public class. When I build the assembly I get this warning. "(assemblyName.dll) does not contain any types that can be registered for COM Interop." My assembly info includes the following line. [assembly: ComVisible(true)] Most people...

How to convert _bstr_t to CString

I have a _bstr_t variable bstrErr and I am having a CString variable csError. How do I set the value which come in bstrErr to csError? ...

Do I assign different or the same class id to 32-bit and 64-bit versions of the same IFilter?

I've implemented my own Microsoft Search IFilter. I need two versions of it - 32-bit and 64-bit for deploying them on corresponding systems. In case of IFilters for any file extension I can only register one IFilter class id. Which means I can only use one version on any system. So having two class ids seems useless - it only makes the ...

What are dispinterface declarations used for?

When you create a type library in Delphi and create an interface and the associated CoClass, Delphi also creates matching dispinterface declarations. My understanding is that these relate to the fact that my interface derives from IDispatch, but I thought that TAutoObject implements everything needed for IDispatch. So my question is thr...

Is it possible that C# has problems calling VB6 methods that have optional parameters?

I added 3 optional boolean parameters to a method found within a VB6 DLL. The class that houses it is MultiUse (public), and the method itself is Private. The class implements a specific interface from a TLB, allowing for public calls to this method. After adding the 3 optional parameters on the VB6 side, I modified related C# code so t...

any command line com port query tools?

ok folks, heres my dilemma i want to make a chat program that uses sms as its base engine.. to do this i need to communicate with my gsm phone via bluetooth attached to com 7 on my computer.. i can do this fine using hyperterminal, tera term etc. but to hav an un-obtrusive, friendly interface i need a command line tool to send AT command...