Page 1 of 2

Record locking on Windows Mobile 5.01

Posted: Tue Mar 28, 2006 8:41 am
by Eugeniusz Owsiak
Is it posible?

regards,
Eugeniusz

Posted: Tue Mar 28, 2006 8:24 pm
by Eugeniusz Owsiak
I know the previus version of OS (Windows Mobile 2003) can not share any file on server because it have no build in any net function. Windows Mobile 5.0 should have that net properties and I try to share some dbf file opened on server with other user. When I try I get error - net function in Harbour and FWPPC are not ready. What can I do?
Antonio, can You help me?

Eugeniusz

Posted: Tue Mar 28, 2006 11:16 pm
by Antonio Linares
Eugeniusz,

We are going to do some tests to check it.

Posted: Wed Mar 29, 2006 7:40 am
by Antonio Linares
Eugeniusz,

Yes, it is available :)

We have performed this little test and it returns a valid value under Windows Mobile 5 and return zero under Windows Mobile 2003:

We are going to modify FWPPC to automatically use it if the app is running under Windows Mobile 5 :)

Code: Select all

#include "FWCE.ch" 

function Main() 

   MsgInfo( Test() )

return nil

#pragma BEGINDUMP

#include <hbapi.h>

#define UNDER_CE

#include <windows.h>

LPWSTR AnsiToWide( LPSTR );

HB_FUNC( TEST )
{
   LPWSTR pW1 = AnsiToWide( "coredll.dll" );
   LPWSTR pW2 = AnsiToWide( "LockFileEx" );
   HINSTANCE hDLL = LoadLibrary( pW1 );
   
   hb_retnl( ( LONG ) GetProcAddress( hDLL, pW2 ) );
   
   hb_xfree( pW1 );
   hb_xfree( pW2 );
   
   FreeLibrary( hDLL );
}   

#pragma ENDDUMP

Posted: Wed Mar 29, 2006 8:21 am
by Eugeniusz Owsiak
Antonio,
this is a very good news. I wait for next build of FWPPC.

Thank You

Eugeniusz

Posted: Wed Mar 29, 2006 12:13 pm
by Antonio Linares
Eugeniusz,

Ok, there is a new FWPPC build with records/files lock/unlock support for Windows Mobile 5. It automatically detects if Windows Mobile 5 is used.

Please try it and let us know how it works for you, thanks :)

Posted: Wed Mar 29, 2006 1:01 pm
by Maurizio
Hello Antonio
Is is possible to have this on WindowsCE ?

Regards Maurizio

Posted: Wed Mar 29, 2006 3:19 pm
by Eugeniusz Owsiak
Antonio,
Thanks for Your great work - but effects are not optimistic.
When I try lock record on local 'drive' it works ok. I cannot do this on server - wd->(rLock()) return .F. - don't know why.

regards,
Eugeniusz

Posted: Wed Mar 29, 2006 4:26 pm
by Antonio Linares
Mauricio,

Yes, it is automatic. Just try it :)

Posted: Wed Mar 29, 2006 4:30 pm
by Antonio Linares
Eugeniusz,

We are uploading a new FWPPC build right now. Please download it and try it again, thanks.

Posted: Wed Mar 29, 2006 6:30 pm
by Eugeniusz Owsiak
Antonio,
Maby I do something wrong, result is the same.
rLock(), fLock() return .F. :(

Have anybody pocketPC with WM 5.0 to help us testing?

regards,
Eugeniusz

Posted: Wed Mar 29, 2006 6:50 pm
by Antonio Linares
Eugeniusz,

We may use the WM 5 emulator to test it.

Also we have asked Microsoft to know their answer regarding this lan issue.

Posted: Wed Mar 29, 2006 8:21 pm
by Antonio Linares
Eugeniusz,

We are trying to use a DBF on a lan computer from the emulator, this way:

USE "\\192.168.0.15\share\customer.dbf" SHARED

but it can't access that network path. We have configured the pocket pc lan so we can open google from the emulator.

Does this work for you ? If yes, how you do it ? :)

Posted: Wed Mar 29, 2006 8:56 pm
by Eugeniusz Owsiak
Antonio,
On my PocketPC I can map any path of my LAN computer.
I use TotalCommander for PPC or simply File Explorer - it has ability do make net path mapping. So I open both exe file and dbf file from PPC on LAN.

USE (CurDir()+"\dbffile") new shared alias wd
if wd->(rLock())
wd->field1:="any value"
Else
msgInfo("LAN error")
EndIf

use ("\\192.168.0.15\share\customer") shared -> display "open error" on my PPC

regards Eugeniusz

Posted: Wed Mar 29, 2006 10:43 pm
by Antonio Linares
Eugeniusz,

> On my PocketPC I can map any path of my LAN computer.

Have you tried the same on the Windows Mobile 5 emulator ?