What's new

Solved Reading files remotely

  • Thread starter SyKeChaos
  • Start date
  • Views 304
SyKeChaos

SyKeChaos

Enthusiast
Messages
113
Reaction score
9
Points
95
Sin$
0
Anyone got any advice on reading bytes from files via JRPC? Xdevkit.dll's "ReadFileBytes" doesn't seem to work.

I've started a workaround of getting a handle to the file, setting the pointer, reading it and then closing the handle. And it works. But for some reason I'm getting a fatal crash when reading the file.

Think I might need to create an overlapped structure and reference that in the ReadFile call. any ideas?

Thanks in advance
 
SyKeChaos

SyKeChaos

Enthusiast
Messages
113
Reaction score
9
Points
95
Sin$
0
Don't know why you're crashing or whatever, but for a workaround:
What if you just download the file (JRPC2 or xdvk lib had this function all ready, forgot which one) in question to your computer, and then just use e.g. System.IO.File.ReadAllBytes?

It was xdvk that had DownloadFile function. I can do that, but the problem with that is when you only want to read 4 bytes per file, it seems silly to spend 40 minutes downloading 100s of MBs of files just to read 4 bytes of each.
 
ImOx

ImOx

(^._.^)ノ
Retired
Programmer MotM Platinum Record
Messages
9,961
Reaction score
2,963
Points
2,180
Sin$
0
It was xdvk that had DownloadFile function. I can do that, but the problem with that is when you only want to read 4 bytes per file, it seems silly to spend 40 minutes downloading 100s of MBs of files just to read 4 bytes of each.
Ah, yes would be stupid since you're working with such large files.
Hope you get it fixed.
 
Top Bottom
Login
Register