Solved

How to create a copy of TOLEStream Object

Posted on 2002-05-20
8
279 Views
Last Modified: 2010-04-04
Hi Experts

I got a problem where i have to create a copy of TOleStream Object. And I am not able to do the same

my code snippet is some thing like this

var
stream:TOleStream

procedure aProcedure(var oleStream:TOleStream);
begin

     // here i am trying to do like this
     stream:=olestream; //compiling but run time errors


    {
           And Other Code
    }
end;



Please tell me how to copy olestream object to anoter olestream object so that my problem can be soved

And this procedure i am writing in DLL


Thanks
Koundinya
0
Comment
Question by:sudhakar_koundinya
8 Comments
 
LVL 14

Author Comment

by:sudhakar_koundinya
ID: 7021658
It is Giving the error for Unknown Memory Access
0
 
LVL 8

Expert Comment

by:Cesario
ID: 7021765
simply

VAR
  stream : tMemoryStream;

....
....

 stream.LoadFromFile(olestream);


good luck

Cesario
0
 
LVL 4

Expert Comment

by:nestorua
ID: 7022219
HI,
You mean Stream.LoadFromStream(OleStream).
But it works when you read into MemoryStream.
To read from OleStream to OleStream use CopyFrom method of
TStream object.
Sincerely,
Nestorua.
0
 
LVL 14

Author Comment

by:sudhakar_koundinya
ID: 7023267
Hi guys,

Thanks for the response.But it is not working and giving the same problem. I tried with other stream objects and working fine. But with TOleStream Object i am facing problems.

I tried to change my logic by using pointers instead of using coping of the same object. But no use. Same problem persists. I am not understanding where i am facing the problem.  Please help me

type
PTOleStream=^ToleStream;

var
streamPtr:PTOleStream;
constructor Create(ptrOLE:PTOleStream)
begin
   streamPtr:ptOLE;
end;

Thanks
Koundinya
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 14

Author Comment

by:sudhakar_koundinya
ID: 7115726
Hi Guys,

I want to close this session. As No body gave me the right answer, I want to delete this session.
Please Comment on this.

Thanks
Koundinya
0
 

Expert Comment

by:lingababu
ID: 7133597
 

0
 

Expert Comment

by:lingababu
ID: 7133598
           

0
 

Accepted Solution

by:
SpideyMod earned 0 total points
ID: 7976851
PAQ'd and points refunded

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
A short film showing how OnPage and Connectwise integration works.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now