ole

Insert OLE object into WPF canvas?

Hi Folks! I'm getting stuck to a problem now for quite a long time. I want to use MathType (www.dessci.com) for my own application. Thats why i have to insert an ole object into a System.Windows.Controls.Canvas derived control. I searched the internet for quite a long time, not with real success. I found out that I probably have to use o...

CFSTR_FILEDESCRIPTOR/CFSTR_FILECONTENTS 'Copying Files' Dialog missing

Hi, I have a namespace extension that supports copy-paste using the CFSTR_FILEDESCRIPTOR/ CFSTR_FILECONTENTS to copy virtual files to the clipboard. However, the 'Copying Files...' progress dialog does not show up. Explorer appears to hang until the copy operation is complete. Any suggestions as to how to get the progress dialog to w...

"The handle is invalid" error when using DSOFile.dll to read custom properties on a file in Vista

I am using Microsoft's DSOFile library to work with extended file attibutes and I'm having problems under Vista with non-OLE files. The following C# code simply reads any custom attributes that are attached to a file: private void readCustomProperties(string fileName) { DSOFile.OleDocumentPropertiesClass documentProperties = new O...

Embedded objects in MS Office documents using Python?

How could I create embedded objects in an MS office document using Python? I don't need anything fancy, just what one used to do in the first version of OLE: doing a copy-paste from my application into e.g. MS Word should give me an object embedded in the Word document, which I can then double-click to open a copy of my application a...

How to evolve a COM interface?

COM is known to make backward-compatibility possible when releasing new components or applications. This is possible because interfaces in COM are stable i.e. they do not change. I tried hard to find a reference or book which deals with a descrition on how to evole a COM interface from version to version. The following are my requireme...

How do I get the COM object from a HWND in Win32::OLE?

In Perl, if I have HWND of a window object, how can I get access to that COM object using that handle? I looked at Win32::OLE but the closest I got was the GetActiveObject method, which expects a class. ...

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...

Outlook OLE in Delphi Sync Issues

I am using Delphi 6 with DevExpress cxScheduler components to sync tasks and events in our application with Outlook... When Outlook is open, and an existing event or task is updated in Outlook - our app does not see the new changes until Outlook is closed - so if we run the sync process without closing Outlook, our app overwrites the ch...

Permission Denied in IE w/ iDispatch DISPATCH_PROPERTYGET

Howdy, I have a activex control that I've written using ATL, and am running into a somewhat serious and confusing problem. when iDispatch::Invoke is called with DISPATCH_PROPERTYPUT/METHOD everything is fine.. when a return a value to javascript/ie after a method call of a VT_BSTR/with a valid BSTR it works fine and has been. but wh...

Word document printed on MS Access report using OLE object

Hi, For years, we have been printing Word 2003 documents that have been saved to a OLE object column using an access report. We are using Access 2003. For some reason when we copy a Word 2003 document and paste it into the OLE object it does not print correctly there are subtle differences with the letter spacing. However if we use a...

OLEVariant to .Net byte[]

I have an OLEVariant disguised as a .Net object that I recieve from a client-side component over the net. I know that the contents are an array of bytes, but I don't know how to convert those contents to a native .Net byte array (byte[]). Any clues on how I can accomplish the conversion? Edit: We answered our own question. To take an Ol...

property or method by DISPID

Is it possible to know if a given DISPID (result of GetIDsOfNames) is either a method, a property getter or setter ? ...

Can multiple ProgIDs point to the same ClsID?

I am working on a set of what are essentially plugins, which are COM servers. Each plugin has a set of configuration data which is managed by another component, the primary key to the configuration data is the plug-in's ProgID. When the plugin needs to access a configuration item, it makes a call and passes in its ProgID and the name of ...

What happens if I violate the requirements imposed on ProgIDs?

This MSDN article states that any ProgID must meet several formal requirements, length restriction included. However nothing is said about what happens if those are violated. I found several places in our codebase where ProgIDs are longer than 39 characters, still everything seems to work allright for them, ProgIDFromCLSID() and CLSIDFr...

Copying between VARIANT and _variant_t

I'm fairly certain that I can safely do: void funcA(VARIANT &V,_variant_t &vt) { vt = V; } But what about the other way around: void funcB(VARIANT &V,_variant_t &vt) { V = vt; } I've been seeing some REALLY weird behaviour in my app which I put down to COM-related threading issues. But then I got wondering if I was screwing...

MFC Automation how to implement RemoveDocument OnCloseDocument

I have an MFC MDI Application and I am trying to implement Automation with it. I am trying to create a RemoveDocument. How is that done? OnCloseDocument is causing problems. Is there a "standard" for doing that? ...

Python OLE2 date format conversion

Hello all, I have created a python script which pulls data out of OLE streams in Word documents, but am having trouble converting the OLE2-formatted timestamp to something more human-readable :( The timestamp which is pulled out is 12760233021 but I cannot for the life of me convert this to a date like 12 Mar 2007 or similar. Any help...

[Inno Setup] Why would an ocx control not register properly?

I am writing an app that needs to use a third party ocx control. In my Inno Setup script I include the line: Source: C:\aPath\aControl.ocx; DestDir: {app}; Flags: restartreplace sharedfile regserver It looks like the control is registered, but the installed app gives me EOleSysErrors that the control isn't registered when working in Wi...

COleDataSource - setting drag & drop data between applications

Some code I am working on uses COleDataSource::CacheGlobalData, passing as CF_TEXT an HGLOBAL pointing to some memory allocated for the text. I want to also add a numeric value, so ythe drop-target can access either the text or numeric values. How can this easily be done? Can a 2nd CacheGlobalData call be made with a different CF_ value...

MFC/OLE Drag & Drop - freeing Globally allocated memory

If using COleDataSource & COleDataObject, you allocate some global memory for each clipboard data format you wish to store data in the drag'n'drop operation. In the drop code, you query if the object has data in the format(s) you want and can then access & free that memory. But as a drop-target you can't know all the formats that might ...