save array to file, read it back in

Hi,

I just have an RGB volume buffer allocated like:

    unsigned char pBuffer = new unsigned char[256 * 256 * 50 * 3];

and I'd like to dump it straight to a file so I can read it back in
exactly as above. Can I do something like this:

    ofstream o("C:\\test.raw");
    o << pBuffer;
    o.close();

    // Later on read it back in...
    ifstream i("C:\\test.raw");

    unsigned char *pLater = new unsigned char[256 * 256 * 50 * 3];
    i.read();
    i.close();

Thanks

0
markww (42)
8/10/2006 2:42:58 AM
vc.mfc 33608 articles. 0 followers. Follow

15 Replies
611 Views

Similar Articles

[PageSpeed] 58

I would write it out in ASCI and then convert when reading back.  Since you 
are using MFC (you posted to the MFC forum) you could also use CFile to make 
this easier.

Another idea would be to write the value to the registry so you don't have 
the tiny file hanging around.  Reading and writing to the registry is really 
quick.

Tom

"markww" <markww@gmail.com> wrote in message 
news:1155177778.404846.41190@i42g2000cwa.googlegroups.com...
> Hi,
>
> I just have an RGB volume buffer allocated like:
>
>    unsigned char pBuffer = new unsigned char[256 * 256 * 50 * 3];
>
> and I'd like to dump it straight to a file so I can read it back in
> exactly as above. Can I do something like this:
>
>    ofstream o("C:\\test.raw");
>    o << pBuffer;
>    o.close();
>
>    // Later on read it back in...
>    ifstream i("C:\\test.raw");
>
>    unsigned char *pLater = new unsigned char[256 * 256 * 50 * 3];
>    i.read();
>    i.close();
>
> Thanks
> 


0
tserface (3861)
8/10/2006 3:58:35 PM
Why write it as ASCI, he can simply write all the values out to the file and
then read them back in.

If it was me I would do it this way.

void SaveArray(CString Filename,unsigned char *pBuffer,long Size)
{
    CFile File;
    File.Open(Filename,CFile::modeCreate|CFile::modeWrite);

    //first write out the array size
    File.Write(&Size,sizeof(long));
    //then write out the array
    File.Write(pBuffer,sizeof(unsigned char) * Size);

    File.Close();
}

unsigned char * ReadArray(CString Filename,long &Size)
{
    CFile File;
    File.Open(Filename,CFile::modeRead);

    //first read the size
    File.Read(&Size,sizeof(long));

    //then create the array
    unsigned char *pBuffer = new unsigned char[Size];

    //now read the array back in
    File.Read(pBuffer,sizeof(unsigned char) * Size);

    File.Close();

    return pBuffer;
}

AliR.

"Tom Serface" <tserface@msn.com> wrote in message
news:%2302WYXJvGHA.3552@TK2MSFTNGP03.phx.gbl...
> I would write it out in ASCI and then convert when reading back.  Since
you
> are using MFC (you posted to the MFC forum) you could also use CFile to
make
> this easier.
>
> Another idea would be to write the value to the registry so you don't have
> the tiny file hanging around.  Reading and writing to the registry is
really
> quick.
>
> Tom
>
> "markww" <markww@gmail.com> wrote in message
> news:1155177778.404846.41190@i42g2000cwa.googlegroups.com...
> > Hi,
> >
> > I just have an RGB volume buffer allocated like:
> >
> >    unsigned char pBuffer = new unsigned char[256 * 256 * 50 * 3];
> >
> > and I'd like to dump it straight to a file so I can read it back in
> > exactly as above. Can I do something like this:
> >
> >    ofstream o("C:\\test.raw");
> >    o << pBuffer;
> >    o.close();
> >
> >    // Later on read it back in...
> >    ifstream i("C:\\test.raw");
> >
> >    unsigned char *pLater = new unsigned char[256 * 256 * 50 * 3];
> >    i.read();
> >    i.close();
> >
> > Thanks
> >
>
>


0
AliR3470 (3236)
8/10/2006 4:12:25 PM
I just do it in ASCII since it's easier to see what's in the file and the 
reading and writing process usually doesn't take much time.  I admit it's a 
matter of preference.  I hate opening or viewing files with "stuff" in them 
and I can't tell what it is.  If it were me, I'd either use the registry or 
some format like .ini or XML to save the information unless it's a temporary 
file in which case... um ... it wouldn't matter since they would be cleaned 
up.

Tom

"AliR" <AliR@online.nospam> wrote in message 
news:44db5b20$0$23771$a8266bb1@reader.corenews.com...
> Why write it as ASCI, he can simply write all the values out to the file 
> and
> then read them back in.
>
> If it was me I would do it this way.
>
> void SaveArray(CString Filename,unsigned char *pBuffer,long Size)
> {
>    CFile File;
>    File.Open(Filename,CFile::modeCreate|CFile::modeWrite);
>
>    //first write out the array size
>    File.Write(&Size,sizeof(long));
>    //then write out the array
>    File.Write(pBuffer,sizeof(unsigned char) * Size);
>
>    File.Close();
> }
>
> unsigned char * ReadArray(CString Filename,long &Size)
> {
>    CFile File;
>    File.Open(Filename,CFile::modeRead);
>
>    //first read the size
>    File.Read(&Size,sizeof(long));
>
>    //then create the array
>    unsigned char *pBuffer = new unsigned char[Size];
>
>    //now read the array back in
>    File.Read(pBuffer,sizeof(unsigned char) * Size);
>
>    File.Close();
>
>    return pBuffer;
> }
>
> AliR.
>
> "Tom Serface" <tserface@msn.com> wrote in message
> news:%2302WYXJvGHA.3552@TK2MSFTNGP03.phx.gbl...
>> I would write it out in ASCI and then convert when reading back.  Since
> you
>> are using MFC (you posted to the MFC forum) you could also use CFile to
> make
>> this easier.
>>
>> Another idea would be to write the value to the registry so you don't 
>> have
>> the tiny file hanging around.  Reading and writing to the registry is
> really
>> quick.
>>
>> Tom
>>
>> "markww" <markww@gmail.com> wrote in message
>> news:1155177778.404846.41190@i42g2000cwa.googlegroups.com...
>> > Hi,
>> >
>> > I just have an RGB volume buffer allocated like:
>> >
>> >    unsigned char pBuffer = new unsigned char[256 * 256 * 50 * 3];
>> >
>> > and I'd like to dump it straight to a file so I can read it back in
>> > exactly as above. Can I do something like this:
>> >
>> >    ofstream o("C:\\test.raw");
>> >    o << pBuffer;
>> >    o.close();
>> >
>> >    // Later on read it back in...
>> >    ifstream i("C:\\test.raw");
>> >
>> >    unsigned char *pLater = new unsigned char[256 * 256 * 50 * 3];
>> >    i.read();
>> >    i.close();
>> >
>> > Thanks
>> >
>>
>>
>
> 


0
tserface (3861)
8/10/2006 4:55:23 PM
It would probably work, but I try to avoid streams for dealing with raw bytes.  In fact, I
try to avoid streams entirely.  There are a few minor problems I see, though:

It uses clumsy specifcations, why not use BYTE/LPBYTE?

Why are you assuming that a C: drive exists, or that the user wants to use it?  I once had
to modify a program which extensively assumed a C: drive existed and all the files were on
it, and it took a lot of money to do this.  Building assumptions like this into code is
bound to be fatal.

I presume that in the actual code you would be doing extensive error checks, such as
detecting if the file successfully opened, if the data was successfully written, etc.
 
#define BUFFER_SIZE (256 * 256 * 50 * 3)
LPBYTE buffer = new BYTE[BUFFER_SIZE];
CFile f;
if(!f.Open(yourfilenamehere, CFile::modeCreate | CFile::modeWrite))
   ...deal with error
f.Write(buffer, BUFFER_SIZE);
f.Close();

CFile f;
if(!f.Open(yourfilenamehere, CFile::modeRead))
   ...deal with error
LPBYTE buffer = new BYTE[BUFFER_SIZE];
f.Read(buffer, BUFFER_SIZE);
f.Close();

Error detection on f.Write and f.Read is left as an Exercise For The Reader.

This way you don't need to worry about what << might actually do to your data.
				joe

On 9 Aug 2006 19:42:58 -0700, "markww" <markww@gmail.com> wrote:

>Hi,
>
>I just have an RGB volume buffer allocated like:
>
>    unsigned char pBuffer = new unsigned char[256 * 256 * 50 * 3];
>
>and I'd like to dump it straight to a file so I can read it back in
>exactly as above. Can I do something like this:
>
>    ofstream o("C:\\test.raw");
>    o << pBuffer;
>    o.close();
>
>    // Later on read it back in...
>    ifstream i("C:\\test.raw");
>
>    unsigned char *pLater = new unsigned char[256 * 256 * 50 * 3];
>    i.read();
>    i.close();
>
>Thanks
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15974)
8/11/2006 9:54:11 PM
I typically take your approach.  I use text files, these days preferrably XML.  For
something this large, the Registry is probably a non-starter.  Also .ini files, which are
limited to 64K characters, wouldn't work.

I see very little cause these days for keeping binary files of stuff around.  The only
excuses for using raw binary were "file size" (irrelevant on modern machines) and
"efficiency" (but on a modern machine you can do a lot of text-to-binary conversion within
a half-rotation-delay of the disk, which means that for the simplest file you have orders
of magnitude more delay in physically reading the data than in converting text to binary,
so "efficiency" becomes irrelevant also).  
					joe

On Thu, 10 Aug 2006 09:55:23 -0700, "Tom Serface" <tserface@msn.com> wrote:

>I just do it in ASCII since it's easier to see what's in the file and the 
>reading and writing process usually doesn't take much time.  I admit it's a 
>matter of preference.  I hate opening or viewing files with "stuff" in them 
>and I can't tell what it is.  If it were me, I'd either use the registry or 
>some format like .ini or XML to save the information unless it's a temporary 
>file in which case... um ... it wouldn't matter since they would be cleaned 
>up.
>
>Tom
>
>"AliR" <AliR@online.nospam> wrote in message 
>news:44db5b20$0$23771$a8266bb1@reader.corenews.com...
>> Why write it as ASCI, he can simply write all the values out to the file 
>> and
>> then read them back in.
>>
>> If it was me I would do it this way.
>>
>> void SaveArray(CString Filename,unsigned char *pBuffer,long Size)
>> {
>>    CFile File;
>>    File.Open(Filename,CFile::modeCreate|CFile::modeWrite);
>>
>>    //first write out the array size
>>    File.Write(&Size,sizeof(long));
>>    //then write out the array
>>    File.Write(pBuffer,sizeof(unsigned char) * Size);
>>
>>    File.Close();
>> }
>>
>> unsigned char * ReadArray(CString Filename,long &Size)
>> {
>>    CFile File;
>>    File.Open(Filename,CFile::modeRead);
>>
>>    //first read the size
>>    File.Read(&Size,sizeof(long));
>>
>>    //then create the array
>>    unsigned char *pBuffer = new unsigned char[Size];
>>
>>    //now read the array back in
>>    File.Read(pBuffer,sizeof(unsigned char) * Size);
>>
>>    File.Close();
>>
>>    return pBuffer;
>> }
>>
>> AliR.
>>
>> "Tom Serface" <tserface@msn.com> wrote in message
>> news:%2302WYXJvGHA.3552@TK2MSFTNGP03.phx.gbl...
>>> I would write it out in ASCI and then convert when reading back.  Since
>> you
>>> are using MFC (you posted to the MFC forum) you could also use CFile to
>> make
>>> this easier.
>>>
>>> Another idea would be to write the value to the registry so you don't 
>>> have
>>> the tiny file hanging around.  Reading and writing to the registry is
>> really
>>> quick.
>>>
>>> Tom
>>>
>>> "markww" <markww@gmail.com> wrote in message
>>> news:1155177778.404846.41190@i42g2000cwa.googlegroups.com...
>>> > Hi,
>>> >
>>> > I just have an RGB volume buffer allocated like:
>>> >
>>> >    unsigned char pBuffer = new unsigned char[256 * 256 * 50 * 3];
>>> >
>>> > and I'd like to dump it straight to a file so I can read it back in
>>> > exactly as above. Can I do something like this:
>>> >
>>> >    ofstream o("C:\\test.raw");
>>> >    o << pBuffer;
>>> >    o.close();
>>> >
>>> >    // Later on read it back in...
>>> >    ifstream i("C:\\test.raw");
>>> >
>>> >    unsigned char *pLater = new unsigned char[256 * 256 * 50 * 3];
>>> >    i.read();
>>> >    i.close();
>>> >
>>> > Thanks
>>> >
>>>
>>>
>>
>> 
>
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15974)
8/14/2006 5:29:47 PM
Sorry, I didn't notice the size of the data set.  You're right, the registry 
would definitly not be the place of choice to store those elements.  That's 
a lot for XML as well, but since they seem to only be reading and writing 
them when opening or closing the program it wouldn't take too much time and 
it would save a lot of time in debugging.

Tom

"Joseph M. Newcomer" <newcomer@flounder.com> wrote in message 
news:jic1e2d7glk3mef7nur80k8h4k46k797s1@4ax.com...
>I typically take your approach.  I use text files, these days preferrably 
>XML.  For
> something this large, the Registry is probably a non-starter.  Also .ini 
> files, which are
> limited to 64K characters, wouldn't work.
>
> I see very little cause these days for keeping binary files of stuff 
> around.  The only
> excuses for using raw binary were "file size" (irrelevant on modern 
> machines) and
> "efficiency" (but on a modern machine you can do a lot of text-to-binary 
> conversion within
> a half-rotation-delay of the disk, which means that for the simplest file 
> you have orders
> of magnitude more delay in physically reading the data than in converting 
> text to binary,
> so "efficiency" becomes irrelevant also).
> joe


0
tserface (3861)
8/14/2006 7:13:11 PM
"Joseph M. Newcomer" <newcomer@flounder.com> wrote in message 
news:jic1e2d7glk3mef7nur80k8h4k46k797s1@4ax.com...
>I typically take your approach.  I use text files, these days preferrably 
>XML.  For
> something this large, the Registry is probably a non-starter.  Also .ini 
> files, which are
> limited to 64K characters, wouldn't work.
>

..ini files are no longer limited to 64K size in Win2k/Xp.

-- David 


0
dc2983 (3206)
8/14/2006 8:17:52 PM
The ability to read the contents of binary files and dumps with "stuff" in them, 
although increasingly becoming a lost art, is still important in applications 
such as those employing serial comms.

A message 2n characters long will take twice as long to transmit as a message n 
characters long.

The same holds with shuffling messages around internally. Although modern-day 
computers are ultra-fast compared to their predecessors, the tendency to put 
everything into readable format means that a lot of time is wasted. It all adds 
up when the seemingly negligible time difference is multiplied by a factor of a 
zillion or so. The slow performance of many applications such as VS2005 is 
probably due in part to such tecniques.

Tom Serface wrote:
> I just do it in ASCII since it's easier to see what's in the file and the 
> reading and writing process usually doesn't take much time.  I admit it's a 
> matter of preference.  I hate opening or viewing files with "stuff" in them 
> and I can't tell what it is.  If it were me, I'd either use the registry or 
> some format like .ini or XML to save the information unless it's a temporary 
> file in which case... um ... it wouldn't matter since they would be cleaned 
> up.
> 
> Tom
> 
> "AliR" <AliR@online.nospam> wrote in message 
> news:44db5b20$0$23771$a8266bb1@reader.corenews.com...
> 
>>Why write it as ASCI, he can simply write all the values out to the file 
>>and
>>then read them back in.
>>
>>If it was me I would do it this way.
>>
>>void SaveArray(CString Filename,unsigned char *pBuffer,long Size)
>>{
>>   CFile File;
>>   File.Open(Filename,CFile::modeCreate|CFile::modeWrite);
>>
>>   //first write out the array size
>>   File.Write(&Size,sizeof(long));
>>   //then write out the array
>>   File.Write(pBuffer,sizeof(unsigned char) * Size);
>>
>>   File.Close();
>>}
>>
>>unsigned char * ReadArray(CString Filename,long &Size)
>>{
>>   CFile File;
>>   File.Open(Filename,CFile::modeRead);
>>
>>   //first read the size
>>   File.Read(&Size,sizeof(long));
>>
>>   //then create the array
>>   unsigned char *pBuffer = new unsigned char[Size];
>>
>>   //now read the array back in
>>   File.Read(pBuffer,sizeof(unsigned char) * Size);
>>
>>   File.Close();
>>
>>   return pBuffer;
>>}
>>
>>AliR.
>>
>>"Tom Serface" <tserface@msn.com> wrote in message
>>news:%2302WYXJvGHA.3552@TK2MSFTNGP03.phx.gbl...
>>
>>>I would write it out in ASCI and then convert when reading back.  Since
>>
>>you
>>
>>>are using MFC (you posted to the MFC forum) you could also use CFile to
>>
>>make
>>
>>>this easier.
>>>
>>>Another idea would be to write the value to the registry so you don't 
>>>have
>>>the tiny file hanging around.  Reading and writing to the registry is
>>
>>really
>>
>>>quick.
>>>
>>>Tom
>>>
>>>"markww" <markww@gmail.com> wrote in message
>>>news:1155177778.404846.41190@i42g2000cwa.googlegroups.com...
>>>
>>>>Hi,
>>>>
>>>>I just have an RGB volume buffer allocated like:
>>>>
>>>>   unsigned char pBuffer = new unsigned char[256 * 256 * 50 * 3];
>>>>
>>>>and I'd like to dump it straight to a file so I can read it back in
>>>>exactly as above. Can I do something like this:
>>>>
>>>>   ofstream o("C:\\test.raw");
>>>>   o << pBuffer;
>>>>   o.close();
>>>>
>>>>   // Later on read it back in...
>>>>   ifstream i("C:\\test.raw");
>>>>
>>>>   unsigned char *pLater = new unsigned char[256 * 256 * 50 * 3];
>>>>   i.read();
>>>>   i.close();
>>>>
>>>>Thanks
>>>>
>>>
>>>
>>
> 
> 
0
8/14/2006 8:20:38 PM
I only use binary files when the other side of some communication requires binary files.
Such as .bmp files, or .wav files, or something like that. The rest of the time, it just
doesn't matter very much.
					joe

On Mon, 14 Aug 2006 12:13:11 -0700, "Tom Serface" <tserface@msn.com> wrote:

>Sorry, I didn't notice the size of the data set.  You're right, the registry 
>would definitly not be the place of choice to store those elements.  That's 
>a lot for XML as well, but since they seem to only be reading and writing 
>them when opening or closing the program it wouldn't take too much time and 
>it would save a lot of time in debugging.
>
>Tom
>
>"Joseph M. Newcomer" <newcomer@flounder.com> wrote in message 
>news:jic1e2d7glk3mef7nur80k8h4k46k797s1@4ax.com...
>>I typically take your approach.  I use text files, these days preferrably 
>>XML.  For
>> something this large, the Registry is probably a non-starter.  Also .ini 
>> files, which are
>> limited to 64K characters, wouldn't work.
>>
>> I see very little cause these days for keeping binary files of stuff 
>> around.  The only
>> excuses for using raw binary were "file size" (irrelevant on modern 
>> machines) and
>> "efficiency" (but on a modern machine you can do a lot of text-to-binary 
>> conversion within
>> a half-rotation-delay of the disk, which means that for the simplest file 
>> you have orders
>> of magnitude more delay in physically reading the data than in converting 
>> text to binary,
>> so "efficiency" becomes irrelevant also).
>> joe
>
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15974)
8/14/2006 9:34:12 PM
Good points.   Like I said before, if this was just a file that was being 
used only by that application to save and restore data it probably wouldn't 
matter.  One of my big problems with "Serializing" the information from a 
document is that invariably someone else needs access to the data and then 
it's in a weird format that it difficult to set up in another program. 
However, in this case they were just going to pump out an array so as long 
as they read it exactly the same way it would probably be faster.  In any 
event, it's just a preference.  I've spent a lot of time trying to divine 
the mysteries of files I haven't touched the format of in years (ones I 
originally thought were perfectly easy to read in).

Tom

"Ian Semmel" <isemmelNOJUNK@NOKUNKrocketcomp.com.au> wrote in message 
news:O$FVa89vGHA.416@TK2MSFTNGP04.phx.gbl...
> The ability to read the contents of binary files and dumps with "stuff" in 
> them, although increasingly becoming a lost art, is still important in 
> applications such as those employing serial comms.
>
> A message 2n characters long will take twice as long to transmit as a 
> message n characters long.
>
> The same holds with shuffling messages around internally. Although 
> modern-day computers are ultra-fast compared to their predecessors, the 
> tendency to put everything into readable format means that a lot of time 
> is wasted. It all adds up when the seemingly negligible time difference is 
> multiplied by a factor of a zillion or so. The slow performance of many 
> applications such as VS2005 is probably due in part to such tecniques.


0
tserface (3861)
8/14/2006 9:43:10 PM
INI files used to be limited to 64K only in "MS-DOS", sorry, Win9x

"Joseph M. Newcomer" <newcomer@flounder.com> wrote in message 
news:jic1e2d7glk3mef7nur80k8h4k46k797s1@4ax.com...
>I typically take your approach.  I use text files, these days preferrably 
>XML.  For
> something this large, the Registry is probably a non-starter.  Also .ini 
> files, which are
> limited to 64K characters, wouldn't work.
>
> I see very little cause these days for keeping binary files of stuff 
> around.  The only
> excuses for using raw binary were "file size" (irrelevant on modern 
> machines) and
> "efficiency" (but on a modern machine you can do a lot of text-to-binary 
> conversion within
> a half-rotation-delay of the disk, which means that for the simplest file 
> you have orders
> of magnitude more delay in physically reading the data than in converting 
> text to binary,
> so "efficiency" becomes irrelevant also).
> joe
>


0
alegr (1131)
8/15/2006 2:38:46 AM
That must be where I remember it.  I know that one of my clients hit the 64K limit and I
converted the program to use the Registry, but they were probably using MS-DOS.
					joe

On Mon, 14 Aug 2006 19:38:46 -0700, "Alexander Grigoriev" <alegr@earthlink.net> wrote:

>INI files used to be limited to 64K only in "MS-DOS", sorry, Win9x
>
>"Joseph M. Newcomer" <newcomer@flounder.com> wrote in message 
>news:jic1e2d7glk3mef7nur80k8h4k46k797s1@4ax.com...
>>I typically take your approach.  I use text files, these days preferrably 
>>XML.  For
>> something this large, the Registry is probably a non-starter.  Also .ini 
>> files, which are
>> limited to 64K characters, wouldn't work.
>>
>> I see very little cause these days for keeping binary files of stuff 
>> around.  The only
>> excuses for using raw binary were "file size" (irrelevant on modern 
>> machines) and
>> "efficiency" (but on a modern machine you can do a lot of text-to-binary 
>> conversion within
>> a half-rotation-delay of the disk, which means that for the simplest file 
>> you have orders
>> of magnitude more delay in physically reading the data than in converting 
>> text to binary,
>> so "efficiency" becomes irrelevant also).
>> joe
>>
>
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15974)
8/15/2006 1:54:16 PM
I think writing 64K to the registry (or more) would be kind of ill advised 
anyway.  It's tough enough keeping the registry clean without adding all 
kinds of unreadable data to it.  If every program did that the size would 
grow and the backup would take longer, etc.  I think the registry should be 
used for minor settings, recent files, and things like that and any really 
big blobs should be managed by the application elsewhere.

Tom

"Joseph M. Newcomer" <newcomer@flounder.com> wrote in message 
news:mek3e210s0q6bf38vg40s3tfvqsbr8c7kf@4ax.com...
> That must be where I remember it.  I know that one of my clients hit the 
> 64K limit and I
> converted the program to use the Registry, but they were probably using 
> MS-DOS.
> joe
>


0
tserface (3861)
8/15/2006 8:27:55 PM
Microsoft themselves is guilty of such perversion. Just check the installer 
database in registry... Even worse, the text obfuscation is used, which 
makes any manual repair impossible, if anything gets screwed up.

"Tom Serface" <tserface@msn.com> wrote in message 
news:ekfGLlKwGHA.3264@TK2MSFTNGP03.phx.gbl...
>I think writing 64K to the registry (or more) would be kind of ill advised 
>anyway.  It's tough enough keeping the registry clean without adding all 
>kinds of unreadable data to it.  If every program did that the size would 
>grow and the backup would take longer, etc.  I think the registry should be 
>used for minor settings, recent files, and things like that and any really 
>big blobs should be managed by the application elsewhere.
>
> Tom
>
> "Joseph M. Newcomer" <newcomer@flounder.com> wrote in message 
> news:mek3e210s0q6bf38vg40s3tfvqsbr8c7kf@4ax.com...
>> That must be where I remember it.  I know that one of my clients hit the 
>> 64K limit and I
>> converted the program to use the Registry, but they were probably using 
>> MS-DOS.
>> joe
>>
>
> 


0
alegr (1131)
8/16/2006 4:21:52 AM
Yeah, that is unfortunately I agree.  I think we can only manage our own 
good behavior.

Tom

"Alexander Grigoriev" <alegr@earthlink.net> wrote in message 
news:OZWfAuOwGHA.4460@TK2MSFTNGP04.phx.gbl...
> Microsoft themselves is guilty of such perversion. Just check the 
> installer database in registry... Even worse, the text obfuscation is 
> used, which makes any manual repair impossible, if anything gets screwed 
> up.


0
tserface (3861)
8/17/2006 3:50:29 PM
Reply:

Similar Artilces:

Tr again: Modifying Calendar's "reading" view in 2003
In Outlook 2003, Calendar allows me to show the event's content in a "Reading" pane at the right or bottom of the calendar. But the layout of the Reading pane wastes a lot of space. Can its layout or content be modified? No, the content can't be modified. -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24 Hours Coauthor, OneNote 2003 for Windows (Visual QuickStart Guide) Author, Google and Other Search Engines (Visual QuickStart Guide) Outlook Tips: http://www.outlook-tips.net/ Outlook & Exchange Solutions Center: http://www.slipstick.com...

Backing Up Outlook Express Emails
Does anyone know how to back up email's in Outlook Express? Backup your dbx-files For more assistance ask in an Outlook Express forum. This is an Microsoft Office Outlook forum. Outlook Express is family of Internet Explorer and Outlook of the Office family. Here is the link for the right forum http://communities.microsoft.com/newsgroups/default.asp?icp=InternetExplorer Good Luck! -- Robert Sparnaaij [MVP-Outlook] www.howto-outlook.com Tips of the month: -Backup and Restore -Create an Office XP CD slipstreamed with Service Pack 3 ----- "Cindy" <anonymous@discussion...

Front End Exchange 2003 OWA for a Back end 2000
Hey everybody, At the minute we're in the process of upgrading our 30 odd servers to Windows Server 2003. The Domain Controllers are still running Windows 2000. My question is : Can I install an Exchange 2003 OWA on a Windows Server 2003 to connect to an Exchange 2000 Server in a Windows 2000 Domain (Native Mode) Do I have to upgrade the whole domain first ? What about notions of Front End / Back End ? We would like to do this to benefit from the new OWA (As it's sooooo cool :)) Thanks for your replies, Mike You can use an E2K3 FE to connecto to an E2K BE, but you only get OW...

Exporting file names to an excel spreadsheet.
I have a folder containing many many many .pdf files. Is there a way to export the filenames of these .pdf files into an excel spreadsheet? If this is a dumb question, I apologize. I didnt have any luck searching for the answer here. -- Kepf ------------------------------------------------------------------------ Kepf's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=30611 View this thread: http://www.excelforum.com/showthread.php?threadid=547520 I use Jim Cone's fine Add-in called "ListFiles"for this sort of thing. It's available free (a...

How to get XML data out of an XML file
I am trying to retrieve the Parameters first or second (0, 1 ,2) node from the following XML file: <?xml version="1.0" encoding="utf-8" ?> <Robot xmlns="http://tempuri.org/RobotDefaults.xsd"> <Parameters> <Name>Decker</Name> </Parameters> <Parameters> <Name>A</Name> </Parameters> <Parameters> <Name>B</Name> </Parameters> </Robot> There will be more data than just a name for each Parameters node. Here is my code: Dim node As XmlNode = xmlDocument.SelectSingleNode("/P...

Publisher file made in Publisher 2007 won't open in 2007
I produced an 8.5 x 11 brochure two days ago in Publisher 2007. I was able to save, resave and reopen the file many times during the day. When I tried to open the file today, I get the "Publisher cannot open the file" error message. I've tried to open the file on two different machines with Publisher 2007 and get the error message both time. One has XP Pro, the other has Visa Home Basic. It's a 1.6 meg file. I have a smaller publisher file of a bumper sticker (40 kb) which was made a couple of weeks ago which opens with no problem. This is the second time I ha...

Multiple PST Files #2
I am running Outlook 2003 and would like to have Outlook use two different .pst files (one for my work stuff and one for home) on the same computer. Is it possible to do this? If so, can I can I configure one of the pst files to get e-mail from one account, while the other pst file is configured to get mail from the other account? Thanks! -D Yes, you can create multiple PSTs. I keep mine stored in the same file location but with different names. Depending on which version of Outlook you run, you can creat a new pst from file/new/Outlook Data File (I run Outlook 2003 but had multiple P...

Money 2006 file repair application error
I cannot delete an old account because I get a "file may be courrupt" error so I am trying to repair my 2006 file. Following the deirections, when the progress bar almost completes, I get an application exception and send an error report to MS. My event log has 2 app errors 1) Event Type: Error Event Source: Application Error Event Category: None Event ID: 1001 Date: 4/12/2006 Time: 10:47:26 PM User: N/A Computer: xxx Description: Fault bucket 02266399. For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp. Data: 0000: 42 75 63 6b 65 ...

Application hanging on file load...
Okay, I'm having the strangest problem, and I'm hoping somebody here will be able to give me an idea of how to attack it... I have an MFC application that does some networked communication, multi-threading, fun stuff... I also load and save xml configuration files. Now, on most of the computers I've run my software on, I have absolutely no problems. On SOME boxes, however, whenever I use my menu to try to load or save a file... before the File Dialog box even comes up... the application hangs. All the boxes I've tried this on have been Windows 2000 boxes with Service Pack 4....

can't open files
I have Microsoft Office 2003 ~ all of a sudden when I go to my documents and try to open a file, I get this message "problem sending command to the program". Error 0646 and dt000 See the article "How to re-register Word when problems crop up opening files” at: http://www.word.mvps.org/FAQs/AppErrors/ReRegisterWord.htm -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP, originally posted via msnews.microsoft.com "Lost in Vegas" <Lo...

Error saving a Shared Workbook
I have a user using a shared workbook and gets an error everytime she does this ONE specific change. She deletes a line and then saves and gets a message that says, "EXCEL.exe has generated errors and will be shutdown by Windows... blah blah blah". If she makes anyother type of changes it saves just fine. I also had another user do the SAME change and that person also got that error message. When the file is changed to "Not Shared" then the line is deleted it saves fine also. The problem is obviously with the file itself and that is shared out. can anybody ...

I can no longer convert my files to pdf
I have Publisher 2003 and yesterday, my pdf menu on the top left disappeared and I can no longer convert my Publisher files to pdf. I've even uninstalled/reinstalled the Adobe Acrobat 7 and have also updated to 7.8 but still no luck. The next step was to uninstall and reinstall Publisher and still no luck. Any one know what may be the problem? Thanks. How are you trying to convert your files? When happens when you try? -- JoAnn Paules MVP Microsoft [Publisher] "darrellm" <darrellm@discussions.microsoft.com> wrote in message news:A78B7B52-981D-4FB7-8625-EAD9...

Outlook Data Files #4
I've done some reading but I'm still confused about the use of Office Outlook Personal Folders File (.pst) versus Outlook 97-2002 Personal Folders File (.pst). I understand the basic "Office Outlook Personal Folders File (.pst) to create a new Outlook 2003 .pst file. Click Outlook 97-2002 Personal Folders File (.pst) to create a new Outlook .pst file that is compatible with earlier versions of Outlook." When we have upgraded to Outlook 2003 or set up a new PC with Outlook 2003, when adding PST's you can chosse either of the two file type options and browse to chos...

Backup Excel file
I want to take backup of a file every time. I am using - save as - tools - general option - always create back up. The backup file is in the same location but I want to put it in a different folder. What should I do, kindly suggest. Thanks Jan Karel Pieterse's has an addin called AutoSafe (note spelling). http://www.jkp-ads.com/Download.htm (look for AutoSafe.zip, not autosafeVBE.zip, for your purposes.) It doesn't overwrite the existing workbook when it saves. It saves to a user selectable folder. And when it's done, it either deletes these backups (or puts them...

Utility (pref. script) to catalog .EDB files
Hi, I have a client that is using an Enterprise backup tool which, whilst able to back-up and restore, does not provide in-depth information like traditional Exchange-aware backup products. I have been asked to write a script to list the users in a flat .EDB file (which has been snapped and copied and flushed using SAN replication tools). I have taken a look at the ESE API, which can only be accessed using C + (I only use VB). Other than EXMERGE, does anyone know of any tools that allow you to list the basic mailbox details on a EDB file? Thanks, Hutton. ...

Money 30 Day Money Back Guarantee; instructions.
I tried out Money 2004 Small Business with an idea I might switch from quicken 2003 Home and Business. For a number of reasons that involve primairly invoices and Stock transaction updates, I'm sticking with Quicken. I purchased Money at Staples. At that time I asked the clerk about returning the product and he said I 'd have to deal directly with Microsoft. On the Money box there is a Money-Back 30 Day Guarantee Seal and that's all. No specific instructions as to what to do, where to send etc. If someone has this information please share it or directl me to where I might it...

List folders to file
Hi Does anyone have a macro that would list all the folders (with path) and subfolders to an excel sheet but not the files? Thanks Shona Shona- There's a function called CELL() that should return your filename (or any of a number of parameters) but I can't get it to work properly on my machine, so I can't make it work for you. The syntax is =CELL("filename") which ought to return the path and filename of the current file, and which you could then trim down to show just the path. Can anyone provide some guidance here? Dave, If it isn't working for you, it pro...

Hyperlink File Help
I am needing some major help. I have a file with hyperlinks in column F that link to a file on our server. I am needing to test to see if the file exists and if it does, copy the file to a folder in my documents called (CapturedFiles) and if it doesn't format the cell color to red. Can VBA do this and if so how? Any help would be greatly appreciated. Thanks in advance. Fileserver or webserver ? Tim On Nov 23, 7:20=A0am, Aaron <Aa...@discussions.microsoft.com> wrote: > I am needing some major help. =A0I have a file with hyperlinks in column = F that > l...

IMPORTING MONEY FILES DUP ENTRIES
I have been unable to run money98 files in money2003.Tried importing files but all tranfers between accounts are duplicated. Don't understand how to import all the accounts at once. I created new accounts in 2003 and imported one by one, but any transactions between accounts is duplicated. Follow the prompts on the import file dialog that tell you to select multiple files to import at the same time. There are other guidelines if investment accounts are involved. You might want to review postings on this subject in the group archives at http://groups.google.com. "JAYNE" &l...

Lost .pst files
I am using Office XP with Outlook 2002 (SP2). I recently had a boot track failure on my old computer which had 2 hard drives, using the second drive as back-up storage. I bought a new computer and installed the old main drive (the one with the failed boot track) in my new computer as a second drive and copied all the data onto the new main drive. All data and software works except Outlook. I cannot find any .pst files on my old drive. Where could they be. BTW I use Matadore as a spam blocker. In article <014e01c3462e$561cbdf0$a101280a@phx.gbl>, daddyray01 @sport.rr.com say...

Read file info using SMO locks database!
Hi! I'm using SMO from C# to restore a database from a backup file. Since I want to re-use the same datafiles I try to read the datafiles in my destination database and call RelocateFile to use these filenames during the restore. Everyting works fine except when I try to read the current datafilenames (see code below). If I skip this code and just hardcode the paths in relocatefile everything works fine. Database db = svr.Databases[destinationDBName]; foreach (FileGroup group in db.FileGroups) foreach (DataFile file in group.Files) Console.WriteLine...

Serializing array of userdefined types
Hello, I want to have a class that contains only a collection of another class. For example: public __gc class Alignment { public: Alignment(); ... }; // Probably using XmlIncludeAttribute such as this is wrong... [System::Xml::Serialization::XmlIncludeAttribute(__typeof(Alignment))] public __gc class Alignments : public System::Collections::ArrayList { public: Alignments(); ... }; I figured I could use Alignments like this: Alignment* alignment = new Alignment; Alignments* alignments = new Alignments; alignments->Add(alignment); BTW, I am using XmlSerializer and XmlTextWriter....

Back End Insecure (and don't you hate when that happens!)
A2000, used the splitter and security wizard, ended up with _BE not secured. When I try to open App_BE.mdb when joined with app's WIF, it asks for password. This is good. But when I open App_BE.mdb from the System.mdw shipped with Access it *doesn't* ask for password, just opens the database. This is bad. Any idea what is going wrong and how I can fix it? > Any idea what is going wrong and how I can fix it? Well, you never did have to use the security wizard to secure a database. The security wizard does not do anything that you can't do manually (it does not modify ...

Hyperlink To JPG File
I have added a hyperlink to a jpg (photo) file, and when i select the hyperlink, the jpg file opens in Corel Photo-Paint. Is there a way that I can force it to open with Windows Photo and Fax Viewer, Instead. Thanks GW Open Windows Explorer and find a *.jpg file. Select it and right-click and "Open With" Make Windows Photo and Fax Viewer the default "always open with". If you get an error, you may have to open Corel Photo-Paint and disassociate *.jpg files using probably some Options setting. If neither of these steps work for you, in Windows Explorer>Tools>...

how do I set up a spreadsheet file?
How do I set up a spread sheet file using Excel? Now this is going to be an interesting one to watch. Personally, I'd say you're going to need to be a lot more specific about what you want to do. Failing that, go buy some books on Excel. Regards Trevor "louis markos" <louis markos@discussions.microsoft.com> wrote in message news:A30023FF-61DE-4D21-8E31-77FF134B8F5C@microsoft.com... > How do I set up a spread sheet file using Excel? louis markos wrote: > How do I set up a spread sheet file using Excel? I did a quick search for an Excel tutori...