|
I can only suggest a direction of search, since creating an empty document and opening it with Visual C++ hex editor does not help.
First of all, I beleave, there are multiple Word documents formats. Meaning, that over the years, as Word matured it would request if you wanted to convert the older format into the new format (accept the version that pissed every body off, because they could not open their old documents).
I would recommend that you open Word and look at the document formats it supports and then search the net for the specifications for the formats you are interested in. Other than ASCII text (.txt, .c??, .pas, etc..), most file formats (not all) have some sort of header information that you can examine to determine what type of data it holds.
FYI: I understand why Microsoft (and whoever) used file extensions to detetermine file type (speed), but one of the compilers I use produces a file that is mistaken as a short cut. At first I was confused, but now I take it for granted and pick what application I want to open the file.
----------------------------------------
Trust in the code Luke. Yea right!
|
|
|
|
|
thanks very much!
i didn't think of headers - thanks..
Col
|
|
|
|
|
I'm trying to figure out how to add a seperator (/) to a string ie
"yyyy mm dd" read from a file then modify the string back to "yyyy/mm/dd"
Thanks
|
|
|
|
|
see COleDateTime::ParseDateTime and COleDateTime::Format
"was wir auch tun, wohin wir gehen
die illuminaten sind im system
sie kontrollieren überall
und 23 ist ihre zahl!"
23, welle: erdball
|
|
|
|
|
Hello,
I am writing an email application in VC++ .Net. I have come across a problem, when downloading mail into a CString, that I run out of memory, especially if there are any large file attachments.
I was wondering if there was any way I could save these large emails gradually as I am downloading, in other words transferring out of memory and onto disk, as I go.
NB the emails are stored in an Access database, if it makes any difference.
I have no idea how to do the above, and would appreciate advice.
Thanks,
Trimtrom
|
|
|
|
|
Using a CString sounds like a bad idea... a fixed buffer and advancing reads should be just fine. Hard to give you a better answer since I have no clue HOW you download the mail.
And as far as I can remember, Access allows access to blobs by a stream interface so storing shouldn't pose a problem.
"was wir auch tun, wohin wir gehen
die illuminaten sind im system
sie kontrollieren überall
und 23 ist ihre zahl!"
23, welle: erdball
|
|
|
|
|
Wow! I am very supprised. First of all if you are copying every thing into a CString including the attachment(binaray format, or other), I would probubly be using a byte array. Second CString and CByteArray has a limit of 2147483647 bytes of data (Win32) and thats why virtual memory is so important (aka: swaping memory to disk behind the sceens). As for copying it to a file, if disk space is realy available, it is simple, (1) open a file (2) copy data bytes into file (3) close file (or rewind to start and process data) (4) if data file is no longer needed then remove/delete file from disk.
Question:
What am I missing since other than using CString instead of using CByteArray I do not see why you are having a problem? If you are compiling a unicode version of your software then using CSting is a major misstake, since it will expect all data to be using UNICODE.
----------------------------------------
Trust in the code Luke. Yea right!
|
|
|
|
|
Actually, real allocatable memory less than 2147483647, especially when you use CString or CByteArray classes. CString and CByteArray allocate memory in process heap, and exception will rise when you allocate more than aproximately 256 Mb.
So better allocate memory in 10 heaps by 100 Mb than in 1 Heap by 1Gb...
WBR NB
|
|
|
|
|
Your are correct! I would probubly use a multi-buffer sceam too. Just out of curiosity I ran a test using GlobalAlloc() and found that the most I could allocate for one buffer was 1,326,055,381 bytes.
Trust in the code Luke. Yea right!
|
|
|
|
|
John R. Shaw wrote:
and thats why virtual memory is so important (aka: swaping memory to disk behind the sceens).
Thanks for your reply.
I really am interested about this question of virtual memory: I am not sure how I would code the swapping memory to disk. Is it possible to have a bit of code showing how to download a message into a diskfile via virtual memory??
Many thanks,
Trimtrom
|
|
|
|
|
You do not download into a diskfile via virtual memory, you just copy the memory contents to a file in the normal way.
Actualy what I was refering to by virtual memory was GlobalAlloc() which uses virtual memory via the heap. Depending on the flags used, if the handle is not locked its memory contents may be swaped to the disk in the background untill needed (this is done by the system not you). When you need access to the memory contents you simply lock the handle and the system will swap it back into normal memory for you. This is all transparent from our perspective and most of us do not need to know how it works, it is enough that is does.
Note: You treat the pointer return my GlobalLock() the same as you would a pointer returned by malloc() or calloc().
If you want more control of the memory, and a head ack, you could use VirtualAlloc()/VirtualFree() directly instead.
Well I am off to go refesh my memory on all this virtual memory stuff, since I have not studied the subject in years.
Trust in the code Luke. Yea right!
|
|
|
|
|
Question:
Does any one know why the "WindowsMaker" program from "Blue Sky" was discontinued?
I am assuming it was because of the massive code blot it produced or more likely the lack of interest by programmers. I personaly only used it on a few projects.
Information:
For those who do not know "WindowsMaker" was a "Microsoft Windows" code generator, for C/C++ programmers, and a visual application design program that allowed programmers to create and test their application before generating any code. Unlike "Visual Basic" once the code was generated it was some times difficult to go backwards and it generated a lot of extra code that you may not have wanted (code for folding dialogs, placing a bitmap as dialog background, etc...).
Question:
Does any one know if there is a simular program in existance today, preferably one that uses DLLs as well as generated code?
----------------------------------------
Trust in the code Luke. Yea right!
|
|
|
|
|
I remember that one, I tried a version of it in 1994 (I think).
At the time, it was a nice tool to use to make basic windows application, but as we found out, the amount of work to make it do what we wanted was too much.
Max.
Maximilien Lincourt
For success one must aquire one's self
|
|
|
|
|
If I had not seen WindowsMaker on a few internet resumes I would think we were the only ones who ever saw or used it. No wonder it died. But I still think the general idea is sound, it just needs a better implimentation.
I do not expect a reply. I am just disapointed that no body has attemped to do some thing simular.
Trust in the code Luke. Yea right!
|
|
|
|
|
I need a C++ Code or class of some sort that takes a CString tuype or some other string type and solves an equaiton like this 9829*a^3-677*a^1+1051*b^3=7553*c^1+2544*d^2-6038*b^1+197577 when i replace the values of abcd ect
- LiquidKnight
|
|
|
|
|
|
Hi,
I want to use WinHTTP API to send some data to a IIS server.The client interacts with the server with out browser interface. I require to write some modules on server side in C++ that can process request and send the result to the client through IIS server. For sending the data and connecting to server, I am using WinHTTP API. I donot know how to integrate the application I developed to process the data with IIS. Can somebody offer me any suggestions or advise or any books or links that can help me to get started? I want to know if there are any win32 API to do server side processing?
Thanks in advance,
Surya
|
|
|
|
|
Do a search for ISAPI (I guess there are several articles here on CP on the subject).
"was wir auch tun, wohin wir gehen
die illuminaten sind im system
sie kontrollieren überall
und 23 ist ihre zahl!"
23, welle: erdball
|
|
|
|
|
Can somebody send me a strightforward example on how to declare an Active X (VB created) DLL in VC++
|
|
|
|
|
#import "mycomobject.dll" rename_namespace("myobj")
myobj::IMyObjectPtr spObj;
spObj.CreateInstance( __uuidof( myobj::MyObject ) );
spObj->SomeMethod();
Dave
http://www.cloudsofheaven.org
|
|
|
|
|
Thanks a lot.
Once I have the DLL declared. How would I call the functions from my DLL.
|
|
|
|
|
Like this: spObj->MyMethod();
When you do a #import, VC++ generates a .tlh and a .tli file in your output directory containing the C++ definitions for the object - take a look at those for what methods are available and what they are called (some may be renamed to avoid conflicts).
Dave
http://www.cloudsofheaven.org
|
|
|
|
|
Slap me silly if I'm being stupid here lads.
Just wondering if there is a quick and easy way of extracting information from Word Documents using MFC.
Regards,
Brian Dela
|
|
|
|
|
The only way I know is to use automation. It is not really quick and it as the major drawback that your app will require MS Word to work properly, but it works whatever the version of word was used to write the file!
François
|
|
|
|
|