Registration-Free COM with the DsoFramer Control

New in .NET 2.0 for Windows Forms applications is a deployment feature known as “Registration-Free COM.” This allows you to use and deploy certain COM components such as ActiveX controls to client computers without registering the component on the local machine with your installer or manually using regsvr32.exe, with some limitations.

The DsoFramer control allows you to embed and control applications such as Microsoft Office programs directly inside your Windows Forms application. For example, your users might need to interact with or preview an Excel spreadsheet containing sales data, or perhaps preview a generated form letter created by Word. Until Microsoft releases a more fully supported .NET control (ActiveDocumentHost, anyone?), the DsoFramer is your best bet today for hosting unmanaged Office applications inside your Windows Forms client.

To enable Registration-Free COM for the DsoFramer control within your Visual Studio .NET 2005 project, simply right-click your unmanaged project reference, select Properties, and then on the properties panel for the reference, set “Isolated” to “True”. This will tell Visual Studio to generate a COM registration manifest for your application with the information necessary to activate and launch your unmanaged control.

By using this deployment feature new to .NET 2.0, you can in certain cases, enable your application to support XCOPY or ClickOnce deployment, where you otherwise would have to rely on a traditional setup project or manual registration for deployment.

Resources

[tags: dsoframer, registration free com, regfreecom, smart clients, clickonce, xcopy]

This entry was posted in Windows Forms. Bookmark the permalink. Follow any comments here with the RSS feed for this post.

12 Responses to Registration-Free COM with the DsoFramer Control

  1. Kannan says:

    Insteads of (Word.Document)this.axFramerControl1.ActiveDocument

    Use

    ((Word.Document)this.axFramerControl1.ActiveDocument))

  2. Kai says:

    This OCX (DSO Framer) is available on VS2008.
    I can add this OCX to reference but cannot add to tools box.

    Thank you

  3. Bob says:

    Bzzzt! Wrong.

    Reg-free COM is a native code feature introduced in Windows XP, and was actually meant for VB6 programs to help resolve DLL Hell. True, .Net piggybacks on it in a limited fashion here and there. The proof of this pudding is the changes in VB6 SP6 and WinXP SP2 to improve the handling of side-by-side isolation of VB6 controls.

  4. Bala says:

    Facing problem with the Dll

  5. Donson says:

    I have studied the code of DSO Framer for a long term. Recently I found lots of bugs. It delete the local file when I try to save it to server. I have the same question too in two instances in a form too. I found DSOFrame 2.0. But nothing can be used.

  6. Peter says:

    I use DSO Framer too for Excel. I have a major problem with the timing of the threads though. The application is not always waiting for Excel so I get RPC errors. Anyone any idea how to fix this? It occurs when I make the toolbars invisible in a loop (probably to fast for Excel and primarily occurs on slow systems).

  7. Venkat Malladi says:

    Hi Everybody,

    I am Using DSO Framer To host Word Document in my windows application.at run time i entered some data in word document .How could i know the modified status of the word document.

    in the below code axFramerControl1 is DSOFramer Object and i converted it to Word Document.But I couldnt find any property to know Modified status.

    (Word.Document)this.axFramerControl1.ActiveDocument)

    Is there any way to solve this issue Plz Help me.

    Thanks& Regards

    VenkataKrishna.Malladi

  8. Rob K says:

    Bug fixed. Microsoft actually took the time to repair the control for us. :~} !!!

    As far as registering the control, we did the following in our constructor:
    try
    {
    System.Diagnostics.Process.Start(“regsvr32.exe”, ” /s \”” + Environment.CurrentDirectory + “\\dsoframer.ocx\””);
    }
    catch (Exception exec)
    {

    }

    It works, but don’t know if it is the correct way of doing it.

  9. Niyazi says:

    Hi,
    Does anyone have any idea to where I can download the English Version of DsoFramer 2.0 for VC++.NET?

    I find it in one of the Chines web site but I couldn’t understand what the differences between version 1.2 and the v2.0.

    Or I like to download DsoFramer.ocx with a less bugy version to use in my VB.NET 2003 windows form.

    I also need to ask is it possible to get word document from SQL Server 2000 and use the any version of DsoFramer to openit in windows forms.

    Currently I use web browser object but it seems very very slow when user try to types in the word document.

    My last question is is it possible to use any means so I can overide the save option and insted of it save in pc it will automaticaly uploads into sql server.

    My current application when user clicks the Exit button it closes the document and form and sends msg into class that is fired begnig of application as in seperate thread and once the class finds the msg that form closed it reads the word document and upload into the sql server and cleans the document in user pc.

    Everything works very fast, but it gets to slow when I try to use in client machine that is not have any hyperthreading. It also slows the document user interaction.

    I hope I can get help from here.

    Thank you.

    Rgds,
    Niyazi

  10. Rob K says:

    Wow! This is good to know Paul. Thank you.

    I do have a question for you though. I am having a bug (C# / 2.0) with the framer in our application due for release soon. Seems the toolbar will not come into focus (although everything else still works on the control) when antoher version of Word has started up and closed. My sample C++ and VB application do not have this problem.

    You say we need to be prepared to work at it if we use this control. How do I go about finding the solution to this mystery? I posted under this subject in the gotDotNet bugs section, but no response yet. Do I need to somehow figure it out in the CPP source and recompile the control?

    Thanks for reading this Pau.

  11. paul.laudeman says:

    Yes, unfortunately the DsoFramer solution isn’t without its quirks, by any means. Be prepared to work at it and be extra careful about disposing your objects and releasing references or else you may end up with several processes of Office applications that never “go away”.

    I’m still hoping that MS releases the ActiveDocumentHost sample someday.. I keep pinging Shawn Burke about it but he refuses to give me an answer on it, though! :-)

  12. johnwood says:

    I’ve used dosframer for a while now, and fixed some bugs too. It’s still a bit buggy though. There’s an issue where it corrupts your application’s caption bar text for example. There are also problems when you have multiple instances of Excel running on your machine (some of them become disabled while it’s embedded in your app). Just thought I’d give you a heads up.

Leave a Reply