Carsten
Wed Sep 22 01:01:21 CDT 2004
Edmond,
another, less elegant, approach is to create a file on the server, and read
its creationtime.
Something like this:
StrToFile( "Nothing"," \\fs-server\folder1\dummy.txt" )
? FDate( \\fs-server\folder1\dummy.txt, 1) && Parameter 1 => Returns
DateTime instead of only Date.
--
Cheers
Carsten
_______________________________
<Edmond> schrieb im Newsbeitrag
news:#pb57gEoEHA.2808@TK2MSFTNGP10.phx.gbl...
> I got error after run to this
>
> serverdatetime = DATETIME(tod_year, tod_month, tod_day, ;
> tod_hours, tod_mins, tod_secs)
>
> syntax error
>
> "Gerben Kessen" <gerben.kessen(@)wantit.nl> ¦b¶l¥ó
> news:uLtvno7nEHA.3520@TK2MSFTNGP11.phx.gbl ¤¤¼¶¼g...
> > Look here:
http://support.microsoft.com/?id=249716
> >
> > Hth
> > Gerben Kessen
> >
> >
> > <Edmond> wrote in message news:eUAJA%235nEHA.132@TK2MSFTNGP09.phx.gbl...
> > > thanks so much..
> > >
> > > Could I ask one more question?
> > >
> > > is VFP can get server datetime ?
> > >
> > >
> > > "Gerben Kessen" <gerben.kessen(@)wantit.nl> ¦b¶l¥ó
> > > news:OgX86s5nEHA.556@tk2msftngp13.phx.gbl ¤¤¼¶¼g...
> > > > Hi Edmond,
> > > >
> > > > Try this....
> > > >
> > > > Gerben Kessen
> > > >
> > > > *- Credits to someone one the net......
> > > > IF NOT AppRunning()
> > > > QUIT
> > > > ENDIF
> > > >
> > > > FUNCTION AppRunning
> > > > #DEFINE SW_RESTORE 9
> > > > #DEFINE ERROR_ALREADY_EXISTS 183
> > > > #DEFINE GW_HWNDNEXT 2
> > > > #DEFINE GW_CHILD 5
> > > >
> > > > DECLARE INTEGER CreateMutex IN WIN32API INTEGER, INTEGER, STRING
@
> > > > DECLARE INTEGER CloseHandle IN WIN32API INTEGER
> > > > DECLARE INTEGER GetLastError IN WIN32API
> > > > DECLARE INTEGER SetProp IN WIN32API INTEGER, STRING @, INTEGER
> > > > DECLARE INTEGER GetProp IN WIN32API INTEGER, STRING @
> > > > DECLARE INTEGER RemoveProp IN WIN32API INTEGER, STRING @
> > > > DECLARE INTEGER IsIconic IN WIN32API INTEGER
> > > > DECLARE INTEGER SetForegroundWindow IN WIN32API INTEGER
> > > > DECLARE INTEGER GetWindow IN WIN32API INTEGER, INTEGER
> > > > DECLARE INTEGER ShowWindow IN WIN32API INTEGER, INTEGER
> > > > DECLARE INTEGER GetDesktopWindow IN WIN32API
> > > > DECLARE LONG FindWindow IN WIN32API LONG, STRING
> > > >
> > > > LOCAL lcFlag, lnHwnd, lnHwnd,llReturn
> > > >
> > > > lcFlag = STRTRAN(_screen.caption, " ", "") + CHR(0)
> > > > lnHwnd = CreateMutex(0, 1, @lcFlag)
> > > >
> > > > IF GetLastError() = ERROR_ALREADY_EXISTS
> > > > lnHwnd = GetWindow(GetDesktopWindow(), GW_CHILD)
> > > > DO WHILE lnHwnd > 0
> > > > IF GetProp(lnHwnd, @lcFlag) = 1
> > > > IF IsIconic(lnHwnd) > 0
> > > > ShowWindow(lnHwnd, SW_RESTORE)
> > > > ENDIF
> > > > SetForegroundWindow(lnHwnd)
> > > > EXIT
> > > > ENDIF
> > > > lnHwnd = GetWindow(lnHwnd, GW_HWNDNEXT)
> > > > ENDDO
> > > > CloseHandle(lnHwnd)
> > > > llReturn = .F.
> > > > ELSE
> > > > SetProp(FindWindow(0, _screen.caption), @lcFlag, 1)
> > > > llReturn = .T.
> > > > ENDIF
> > > > RETURN llRetVal
> > > > ENDFUNC
> > > >
> > > >
> > > >
> > > >
> > > > <Edmond> wrote in message
> news:OALsHY5nEHA.3324@TK2MSFTNGP15.phx.gbl...
> > > > > How to prevent user run the execute file again ?
> > > > >
> > > > > Thanks
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>