Record locking on Windows Mobile 5.01

User avatar
Eugeniusz Owsiak
Posts: 60
Joined: Fri Oct 07, 2005 5:38 am
Location: Poland

Record locking on Windows Mobile 5.01

Post by Eugeniusz Owsiak »

Is it posible?

regards,
Eugeniusz
User avatar
Eugeniusz Owsiak
Posts: 60
Joined: Fri Oct 07, 2005 5:38 am
Location: Poland

Post 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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Eugeniusz,

We are going to do some tests to check it.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post 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
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Eugeniusz Owsiak
Posts: 60
Joined: Fri Oct 07, 2005 5:38 am
Location: Poland

Post by Eugeniusz Owsiak »

Antonio,
this is a very good news. I wait for next build of FWPPC.

Thank You

Eugeniusz
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post 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 :)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Maurizio
Posts: 705
Joined: Mon Oct 10, 2005 1:29 pm
Contact:

Post by Maurizio »

Hello Antonio
Is is possible to have this on WindowsCE ?

Regards Maurizio
User avatar
Eugeniusz Owsiak
Posts: 60
Joined: Fri Oct 07, 2005 5:38 am
Location: Poland

Post 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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Mauricio,

Yes, it is automatic. Just try it :)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Eugeniusz,

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

Antonio Linares
www.fivetechsoft.com
User avatar
Eugeniusz Owsiak
Posts: 60
Joined: Fri Oct 07, 2005 5:38 am
Location: Poland

Post 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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post 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.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post 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 ? :)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Eugeniusz Owsiak
Posts: 60
Joined: Fri Oct 07, 2005 5:38 am
Location: Poland

Post 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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post 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 ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply