OLE in C#

  • Thread starter Thread starter Leon_Amirreza
  • Start date Start date
L

Leon_Amirreza

BlankHi,
I want to get started with OLE (especially in-place activation of Word 2003
objects) in C#. Any Idea please?
Class names, methods, books , links, sample codes ...
AND I dont know much about OLE API and i have heard its complex? any high
level approches in C#?
thank you
Leon
 
Leon,

I don't believe it is possible in .NET. If you have the old VB control
that allowed this, then you can use that through COM interop, but there is
nothing in managed code that allows this. However, I believe that there
might be a possibility that there will be an OLE in place document control
in the Whidbey release of .NET, if you can wait that long.

Hope this helps.
 
Yes, that's a tough one. I don't think there is any strict OLE stuff exposed
via COM Interop. You may want to check out Adam Nathan's ".NET and COM: The
Complete Interoperability Guide" but I don't recall any OLE stuff.

--
-----
Sam Gentile
Microsoft MVP - C#/.NET
..NET Blog http://samgentile.com/blog/

Please do NOT contact me directly but respond to
the newsgroup instead.
---------
Nicholas Paldino said:
Leon,

I don't believe it is possible in .NET. If you have the old VB control
that allowed this, then you can use that through COM interop, but there is
nothing in managed code that allows this. However, I believe that there
might be a possibility that there will be an OLE in place document control
in the Whidbey release of .NET, if you can wait that long.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Leon_Amirreza said:
BlankHi,
I want to get started with OLE (especially in-place activation of Word 2003
objects) in C#. Any Idea please?
Class names, methods, books , links, sample codes ...
AND I dont know much about OLE API and i have heard its complex? any high
level approches in C#?
thank you
Leon
 
Hi,
Thanks for your replies!
as I haven't worked with ole in c++ and I know that OLE is based of com I am
curious to know if it is completely impossible writing OLE Apps in .net
using COM Interop? (I guess I should importing Win API to C# class and call
them. Any better idea (Other than using OLD ole controls in other
programming Languages)?
and can I use word 2003 as an activeX in my C# windows form (.net 2003)?

PS: Mr. Gentile unfortunately I have sent this reply to (e-mail address removed) by
mistakenly clicking "reply to sender" instead of "reply to group" command. I
apologize if any inconvenience happened.

Sam Gentile said:
Yes, that's a tough one. I don't think there is any strict OLE stuff exposed
via COM Interop. You may want to check out Adam Nathan's ".NET and COM: The
Complete Interoperability Guide" but I don't recall any OLE stuff.

--
-----
Sam Gentile
Microsoft MVP - C#/.NET
.NET Blog http://samgentile.com/blog/

Please do NOT contact me directly but respond to
the newsgroup instead.
---------
message news:%[email protected]...
Leon,

I don't believe it is possible in .NET. If you have the old VB control
that allowed this, then you can use that through COM interop, but there is
nothing in managed code that allows this. However, I believe that there
might be a possibility that there will be an OLE in place document control
in the Whidbey release of .NET, if you can wait that long.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Leon_Amirreza said:
BlankHi,
I want to get started with OLE (especially in-place activation of Word 2003
objects) in C#. Any Idea please?
Class names, methods, books , links, sample codes ...
AND I dont know much about OLE API and i have heard its complex? any high
level approches in C#?
thank you
Leon
 
OLE has always been a weird animal. OLE 1 was built on DDE. When I was in
the OLE 2 beta program in 1992/93, COM was introduced as the component
technology platform that OLE was retrofitted to. OLE has always been
different and more to do with in-place activation and editing than the
traditional COM stuff. Therefore, many developers avoided it's immense
complexity (no one understood most of Kraig Brockshmidt's book). The best
support for OLE I have seen is MFC which is weird because its support for
the rest of COM sucks compared to ATL.

How does this have anything to do with .NET? I don't know. I guess you could
use P/Invoke to call the Win32 functions for OLE as there is no support in
..NET for them or common COM Interop scenarios that I know of.

--
--------------------------------------------------------------
Sam Gentile [C#/.NET MVP]
..NET Blog http://samgentile.com/blog/
MSDN Column:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/bridge.asp
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
---------------------------------------------------------------
Leon_Amirreza said:
Hi,
Thanks for your replies!
as I haven't worked with ole in c++ and I know that OLE is based of com I am
curious to know if it is completely impossible writing OLE Apps in .net
using COM Interop? (I guess I should importing Win API to C# class and call
them. Any better idea (Other than using OLD ole controls in other
programming Languages)?
and can I use word 2003 as an activeX in my C# windows form (.net 2003)?

PS: Mr. Gentile unfortunately I have sent this reply to (e-mail address removed) by
mistakenly clicking "reply to sender" instead of "reply to group" command. I
apologize if any inconvenience happened.

Sam Gentile said:
Yes, that's a tough one. I don't think there is any strict OLE stuff exposed
via COM Interop. You may want to check out Adam Nathan's ".NET and COM: The
Complete Interoperability Guide" but I don't recall any OLE stuff.

--
-----
Sam Gentile
Microsoft MVP - C#/.NET
.NET Blog http://samgentile.com/blog/

Please do NOT contact me directly but respond to
the newsgroup instead.
there
is
nothing in managed code that allows this. However, I believe that there
might be a possibility that there will be an OLE in place document control
in the Whidbey release of .NET, if you can wait that long.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

BlankHi,
I want to get started with OLE (especially in-place activation of Word
2003
objects) in C#. Any Idea please?
Class names, methods, books , links, sample codes ...
AND I dont know much about OLE API and i have heard its complex? any high
level approches in C#?
thank you
Leon
 
Back
Top