FILEDESCRIPTOR filesize

Hey,

I'm trying to set the file size of a file through the FILEDESCRIPTOR and came across nFileSizeHigh and nFileSizeLow.

Those are descripted as following:

nFileSizeHigh
Type: DWORD

The high-order DWORD of the file size, in bytes.

nFileSizeLow
Type: DWORD

The low-order DWORD of the file size, in bytes.



Since I've rarely had to deal with such high and low order stuff can anyone help me to set those correctly when I know the exact bytes for my file?

I feel like the solution is pretty easy but I just can't figure it out right now.
Last edited on
I think you need nFileSizeHigh only when the filesize is > UINT_MAX. Otherwise set nFileSizeHigh to 0 and nFileSizeLow to the required size. Remember DWORD is an unsigned int .

What excatly do you want to do? Maybe there are easier / better ways.
ah ok now i understand, this brought me a bit closer now. for me DWORD seems to be an unsigned long btw.


I'm trying to create multiple files on the clipboard through an istream.

Currently I'm able to create those virtual files but with the wrong filecontents.
The problem is I have a FILEGROUPDESCRIPTOR with multiple files (FILEDESCRIPTORS) and one IStream for all together and I'm not sure how to set the variables for the filedescriptors and istream correctly, so each file gets the correct data from the IStream.
Topic archived. No new replies allowed.