Can you give me an idea how to load file in memory after "openfilereqester" and to read from txt file a line, then this line must be put in the specific "line$" for example? ( did somebody undrstood me???
Load file in memory
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by MrVainSCL.
Hi XuMuk,
If you want load the complete file into memory, just get the filelenght with "lenght = Lof()" of your specific file, then allocate the needed memory with "result = AllocateMemory(#Memory, Size, Flags)" and load read your file using "ReadData(*MemoryBuffer, LengthToRead" into your allocated memory! This is only a basical example how to get it work. Please note, that reading files with >256 or 512 MB, like movies for example will slow down your program, due fact of reading/writing all time temp to the big temp file of windows...
PIII450, 256MB Ram, 80GB HD + 6,4 GB, RivaTNT, DirectX9.0, SB AWE64, Win2000 + all Updates...
greetz
MrVainSCL! aka Thorsten
Hi XuMuk,
If you want load the complete file into memory, just get the filelenght with "lenght = Lof()" of your specific file, then allocate the needed memory with "result = AllocateMemory(#Memory, Size, Flags)" and load read your file using "ReadData(*MemoryBuffer, LengthToRead" into your allocated memory! This is only a basical example how to get it work. Please note, that reading files with >256 or 512 MB, like movies for example will slow down your program, due fact of reading/writing all time temp to the big temp file of windows...
PIII450, 256MB Ram, 80GB HD + 6,4 GB, RivaTNT, DirectX9.0, SB AWE64, Win2000 + all Updates...
greetz
MrVainSCL! aka Thorsten
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by MrVainSCL.
Hi XuMuk,
just search on the forum or take a look at:
viewtopic.php?t=2450
maybe this will help you while coding your stuff...!?
PIII450, 256MB Ram, 80GB HD + 6,4 GB, RivaTNT, DirectX9.0, SB AWE64, Win2000 + all Updates...
greetz
MrVainSCL! aka Thorsten
Hi XuMuk,
just search on the forum or take a look at:
viewtopic.php?t=2450
maybe this will help you while coding your stuff...!?
PIII450, 256MB Ram, 80GB HD + 6,4 GB, RivaTNT, DirectX9.0, SB AWE64, Win2000 + all Updates...
greetz
MrVainSCL! aka Thorsten
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm