Re: DLL trouble (continued)
- Posted by Jonas Temple <jtemple at yhti.?et> Dec 04, 2007
- 562 views
Sorry about that last post...butterfingers. Read on. K. Einfeldt wrote: > The function I'm using does actually take a struct argument, not just a > pointer > to a struct. > (I tried it that way hoping the documentation was wrong, but it wasn't.) It's > true that this > isn't a very common occurance, but it does happen. Here's the function I'm > currently working > with: > "SetFilePOinterEx" in kernel32.dll (see <a > href="http://msdn2.microsoft.com/en-us/library/aa365542.aspx">http://msdn2.microsoft.com/en-us/library/aa365542.aspx</a> > ) I checked the docs on this function and it's defined as: BOOL WINAPI SetFilePointerEx( __in HANDLE hFile, __in LARGE_INTEGER liDistanceToMove, __out_opt PLARGE_INTEGER lpNewFilePointer, __in DWORD dwMoveMethod ); The move method is described as: dwMoveMethod The starting point for the file pointer move. This parameter can be one of the following values. Value Meaning FILE_BEGIN 0 The starting point is zero or the beginning of the file. If this flag is specified, then the liDistanceToMove parameter is interpreted as an unsigned value. FILE_CURRENT 1 The start point is the current value of the file pointer. FILE_END 2 The starting point is the current end-of-file position. So my understanding is you pass a constant for the move method (i.e. FILE_BEGIN). I might be missing something, but I don't see anything in MSDN that says this parm is a struct. What you might be getting confused by is it seems that MSDN is showing you that actual value of FILE_BEGIN, which I'm guessing is a 0. Of course you would want to define FILE_BEING somewhere in your code and pass that instead of a literal. HTH, Jonas Temple http://www.innovativesys.net