What's new

Solved Reading files remotely

  • Thread starter SyKeChaos
  • Start date
  • Views 153
S

SyKeChaos

Enthusiast
Messages
113
Reaction score
9
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
 
I

ImOx

(^._.^)ノ
Retired
Messages
9,968
Reaction score
2,962
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?
 
S

SyKeChaos

Enthusiast
Messages
113
Reaction score
9
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.
 
I

ImOx

(^._.^)ノ
Retired
Messages
9,968
Reaction score
2,962
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