Structured Storage with .NET 
Author Message
 Structured Storage with .NET

Hi,

I'm trying to use OLE Structured Storage in .NET.
Since there is no native support into the framework, the hard task is to
implements interfaces and ole dll functions with interop.
Does anybody tried the same path with success and have some code to share
(VB.NET should be better, but C# is fine)?

Thx in advance, Marco



Sat, 02 Oct 2004 21:01:47 GMT  
 Structured Storage with .NET
Marco,

    It shouldn't be too hard to declare the interfaces yourself and the
functions in the DLL's that you require.  Is there a specific
interface/function you are having problems with?

--
               - Nicholas Paldino [.NET MVP]


Quote:
> Hi,

> I'm trying to use OLE Structured Storage in .NET.
> Since there is no native support into the framework, the hard task is to
> implements interfaces and ole dll functions with interop.
> Does anybody tried the same path with success and have some code to share
> (VB.NET should be better, but C# is fine)?

> Thx in advance, Marco



Sat, 02 Oct 2004 21:21:51 GMT  
 Structured Storage with .NET
Hi All,

I began porting the IStorage interface to a C# class but I'm having problems
with some attributes ([call_as(EnumElements)] for example) and typedefs. I
found no samples showing how to port these.

But anyway, it's the 2nd best solution to call COM only to access docfiles.
A plain .net class lib could be ported and would leave the RCW overhead
behind.

Thomas



Quote:
> Marco,

>     It shouldn't be too hard to declare the interfaces yourself and the
> functions in the DLL's that you require.  Is there a specific
> interface/function you are having problems with?

> --
>                - Nicholas Paldino [.NET MVP]



> > Hi,

> > I'm trying to use OLE Structured Storage in .NET.
> > Since there is no native support into the framework, the hard task is to
> > implements interfaces and ole dll functions with interop.
> > Does anybody tried the same path with success and have some code to
share
> > (VB.NET should be better, but C# is fine)?

> > Thx in advance, Marco



Tue, 05 Oct 2004 17:38:08 GMT  
 Structured Storage with .NET
Thomas,

Quote:
>I began porting the IStorage interface to a C# class but I'm having problems
>with some attributes ([call_as(EnumElements)] for example) and typedefs. I
>found no samples showing how to port these.

You can remove any Remote* methods with [call_as()], and only include
the [local] method.

For typedefs, you basicly look up how the type is defined, and replace
it with the original type.

Mattias

===
Mattias Sj?gren (VB MVP)

http://www.msjogren.net/dotnet/



Tue, 05 Oct 2004 22:23:19 GMT  
 Structured Storage with .NET
I made some classes that wraps the OLE strcuture storage files. If you want
I can send you a copy, but it is still under development and when finished I
will put it in my site.

--
Eduardo A. Morcillo (MS MVP VB)
http://www.domaindlx.com/e_morcillo



Wed, 06 Oct 2004 03:07:36 GMT  
 Structured Storage with .NET
Hello,

After you import the type library from dsofile.dll, you can use the
PropertyReader object in C#

This is an example:

    DSOleFile.PropertyReader p = new DSOleFile.PropertyReaderClass();

    DSOleFile.DocumentProperties dp =
p.GetDocumentProperties("e:\\testfile.xls");

    textBox1.Text = dp.Title;

    richTextBox1.Text = dp.Comments;

Be warned that you have to place this code in a Try - Catch block for
handling files that store this info in an other way. (NTFS)

I still have to find some code to handle this.

Kind regards,

Hans Hinnekint



Quote:
> Hi All,

> I began porting the IStorage interface to a C# class but I'm having
problems
> with some attributes ([call_as(EnumElements)] for example) and typedefs. I
> found no samples showing how to port these.

> But anyway, it's the 2nd best solution to call COM only to access
docfiles.
> A plain .net class lib could be ported and would leave the RCW overhead
> behind.

> Thomas


wrote

> > Marco,

> >     It shouldn't be too hard to declare the interfaces yourself and the
> > functions in the DLL's that you require.  Is there a specific
> > interface/function you are having problems with?

> > --
> >                - Nicholas Paldino [.NET MVP]



> > > Hi,

> > > I'm trying to use OLE Structured Storage in .NET.
> > > Since there is no native support into the framework, the hard task is
to
> > > implements interfaces and ole dll functions with interop.
> > > Does anybody tried the same path with success and have some code to
> share
> > > (VB.NET should be better, but C# is fine)?

> > > Thx in advance, Marco



Mon, 22 Nov 2004 04:16:54 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Structured Storage

2. Structured Storage

3. Structured Storage

4. Repost: OLE Structured Storage

5. Help find a demo Structured Storage OCX

6. OLE Structured Storage in VB5?

7. Structured Storage For Visual Basic

8. VB Data Structure for Email Storage

9. Structured Storage

10. HELP: Classes for OLE2 Structured Storage

11. Structured storage

12. How to use structured storage files?

 

 
Powered by phpBB® Forum Software