Solved

How to create a copy of TOLEStream Object

Posted on 2002-05-20
8
278 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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

746 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

10 Experts available now in Live!

Get 1:1 Help Now