Solved

How to create a copy of TOLEStream Object

Posted on 2002-05-20
8
280 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
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
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

ScreenConnect 6.0 Free Trial

Explore all the enhancements in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
add combobox item based on numbers 9 144
FMX enumerated colours 2 101
Comparing dates in Delphi. Greater than/ Less than 3 156
Error E2158 compiling with Delphi XE10 Seattle 2 102
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…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

832 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