[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How to create a copy of TOLEStream Object

Posted on 2002-05-20
8
Medium Priority
?
290 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses
Course of the Month18 days, 16 hours left to enroll

834 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