Buffering for MS Word

K

krishna_aloha

Hi All,
1. im writing a application in which i'm hoocking the API of MS Word & using
my method for Save As of MS Word.
In Save As i'm trying to buffer the data in _WriteFile API & my buffer size
is 64 kb. Till 64 kb im buffering the data in buffer & then write it into
file. If _WriteFile function is getting data more than 64 kb then im old
buffer & then new buffer.
Buffering is right but im getting the error "the save failed due to out of
memory of disk space (FilePath\Filename.doc)"
If im not using buffer then its working perfectly.

2.There server & client based application. User opens the file on server
side from client side. Now user wants to save the file on client side(after
changing the file or using SAVE AS). If i'm not using buffering then MS Word
sends packet (for _WriteFile) of size like 1 kb or 10 kb or 0.5 kb or 30 kb
.... etc.
So it takes time to send the data on client side. So i'm doing buffering (of
65 kb)& then send the data on client side. So it improves time efficiency.

3.One more thing i want to say....
You know when we write any thing in MS Word file using MS Word then it makes
a *.tmp file & writes all thing in that & at last MS Word replaces the .*tmp
into original file using _ReplaceFile.

I checked _WriteFile writes the data in *.tmp file successfully but in case
of buffering it is not able to call _ReplaceFile API after _WriteFile.

Please tell me now where is the problem.

Thanks
Krishna
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top