Jorge Arredondo wrote:
Windows
cocurrent'jmf'
K32=: 2^32
K31=: 2^31
MAXLONG32=: <._1+K31

long64to32=: 3 : 0
       y=. (2$K32)#:y
       ({.;(}.))|.<.((y>K31)*-K32)+y
)
long32to64=: <.@(K32&#.)@|:@(K32&|)@;@|.

SetFilePointerDLLCALL=: >@{.@('kernel32 SetFilePointer i i i *i i'&(15!:0))
GetFileSizeDLLCALL=: >@{.@('kernel32 GetFileSize i i *i'&(15!:0))

SetFilePointerR=: verb define
       'hFile lDistanceToMove lpDistanceToMoveHigh dwMoveMethod'=. y
       if. (lpDistanceToMoveHigh-:NULLPTR) *. (lDistanceToMove>MAXLONG32) do.
               'lDistanceToMove lpDistanceToMoveHigh'=. long64to32
lDistanceToMove
       end.
       SetFilePointerDLLCALL
hFile;lDistanceToMove;lpDistanceToMoveHigh;dwMoveMethod
)

GetFileSizeR=: verb define
       hFile=. >{.y
       lpFileSizeHigh=. ,2
       lpFileSize=. GetFileSizeDLLCALL hFile;lpFileSizeHigh
       long32to64 lpFileSize,lpFileSizeHigh
)


Thank you. Could you also test if the GetFileSizeEx and SetFilePointerEx in the svn also works?

http://www.jsoftware.com/svn/base/trunk/api/mapped/init.ijs

regards,

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to