invoke lstrcat, record1, ADDR TimeBuff
; do i use this to get the person name to be the last line of file

invoke SetWindowText,NameBuff,hFile Posted on 2001-12-29 06:36:36 by cmax
Some questions:
1. What do you mean by line? 13,10?
2. Is there just one line in the file?
If you want to insert some text before existing text in the file
and after you can you this High level logic.
1. GetFileSize
2. Open file with CreateFile
3. GlobalAlloc Memory Size = (1.)
4. Read it into memory (3.)(1.)
5. Close file (2.)
6. CreateFile with the same name using CREATE_ALWAYS
7. Write 1st string
8. Write Memory (4)
9. Write Last string
10. Close Memory
11. Close File.
Posted on 2001-12-29 06:55:33 by The Svin
"What do you mean by line? 13,10?"
.. I just numbered each line..

"Is there just one line in the file?"
..There are Three Seprate lines from different thing.

I'm trying to experement with ASM in a difference way now. "In" Memory only with no edit boxes. I Must learn all i can about using strings "in Memory", and Buffers. Beside the old easy way of just using Teriminated string.

TimeBuff is accually a db String for a Tag

record1Buffer is an DWORD buffer that i read in Cookie Files using MapView and GlobalAlloc.

NameBuff is accually a db String for an additional Tag i use.

There are only three lines in each file. I said nothing about 13,10 but I'm glad you brought it up
because its is already added to TimeBuff Terminated strings But Not the DWORD string, I don't know how. If the SetEndofFile pointer work I need a way to do it or add another 13,10.... that is another problem.... But all ideas will be exploded.

Execue my terminology, just trying to make it easy to understand. So my terminology may be a little confussing.


Posted on 2001-12-29 08:18:41 by cmax
Can you use GlobalAlloc or VituralAlloc than Allocate one string at a time to it and than save it or whatever. Like copying a one file down to another but in memory using (VituralAlloc) .
If not at lease i know that the above ideas gives me an workable solution.

Posted on 2001-12-30 02:15:12 by cmax
When combining strings or extracting substrings, it's best to use a temporary buffer.

invoke lstrcpy, addr TempBuffer, addr FirstPartOfString
invoke lstrcat, addr TempBuffer, addr SecondPartOfString
; insert here as many lstrcat invokes as you need
invoke lstrcat, addr TempBuffer, addr LastPartOfString

Note that the first invoke uses lstrcpy.
Posted on 2001-12-31 16:45:12 by tank