Re: [lazarus] WinCE, howto open a networkpath?

2007-11-21 Thread John vd Waeter
Sorry if I go a little out of the topic... but WinCE is not discussed 
much here so I take the occasion to ask:

is there someway to manage the dialogs of WinCE?

I would need, for example, a way to force the keyboard to appear and 
disappear...


Sorry, didn't get that far yet, so I don't know.
However, since Lazarus is becoming more popular, I think the discussion
about WinCE will increase...

regards,
John



Thank you for the code about the networkpath, I also needed that.


Cheers,

Adrian.


_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] WinCE, howto open a networkpath?

2007-11-21 Thread Razvan Adrian Bogdan
 With the INet components, I managed to use a UDP-component to frequently
 ask an internetserver for some data.

I guess you can try synapse and indy too, they might provide better
system for getting the info you need.

Razvan

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] WinCE, howto open a networkpath?

2007-11-20 Thread Adrian Veith

Hi,

You have to to use the connection manager api from microsoft. I have 
translated some parts of it to object pascal (source is attached). The 
source is not well tested now, but it works for me. For a simple 
connection to the internet you can use the following code.


Cheers, Adrian.

var
   ConnInfo: CONNMGR_CONNECTIONINFO;

begin
   ZeroMemory(@ConnInfo, sizeof(ConnInfo));
   ConnInfo.cbSize:= sizeof(ConnInfo);
   ConnInfo.dwParams:= CONNMGR_PARAM_GUIDDESTNET;
   ConnInfo.dwPriority:= CONNMGR_PRIORITY_USERBACKGROUND ;
   ConnInfo.guidDestNet:= IID_DestNetInternet;

   if ConnMgrEstablishConnectionSync(ConnInfo, FConnection, 6, 
FStatus)  S_OK

   then
 raise Exception.Create('No connection');



John vd Waeter schrieb:

Hi all,

With the INet components, I managed to use a UDP-component to 
frequently ask an internetserver for some data.


However, no traffic is generated when the handheld is powered up. I 
first have to initiate internet explorer, ask for some trivial page 
and after that my application can continu its UDP traffic.


I guess starting IE opened a networkpath and takes care of obtaining 
an ipnr etc.


What do I have to call to ensure a networkpath (GPRS, WiFi, whatever 
is available) is opened the same way IE does?


tia!
John

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

unit connmgr;
interface
uses
  Windows;

  const
External_library='cellcore'; {Setup as you need}

{$IFDEF FPC}
{$PACKRECORDS C}
{$ENDIF}


  { 436EF144-B4FB-4863-A041-8F905A62C572 }
  {DEFINE_GUID(IID_DestNetInternet, 0x436ef144, 0xb4fb, 0x4863, 0xa0, 0x41, 
0x8f, 0x90, 0x5a, 0x62, 0xc5, 0x72); }
  { A1182988-0D73-439e-87AD-2A5B369F808B }
  {DEFINE_GUID(IID_DestNetCorp, 0xa1182988, 0x0d73, 0x439e, 0x87, 0xad, 
0x2a, 0x5b, 0x36, 0x9f, 0x80, 0x8b); }
  { 7022E968-5A97-4051-BC1C-C578E2FBA5D9 }
  {DEFINE_GUID(IID_DestNetWAP,  0x7022e968, 0x5a97, 0x4051, 0xbc, 0x1c, 
0xc5, 0x78, 0xe2, 0xfb, 0xa5, 0xd9); }
  { F28D1F74-72BE-4394-A4A7-4E296219390C }
  {DEFINE_GUID(IID_DestNetSecureWAP,0xf28d1f74, 0x72be, 0x4394, 0xa4, 0xa7, 
0x4e, 0x29, 0x62, 0x19, 0x39, 0x0c); }
  { }


  const
IID_DestNetInternet: GUID = (D1: $436ef144; D2: $b4fb; D3: $4863 ;D4: ($a0, 
$41, $8f, $90, $5a, $62, $c5, $72));
IID_DestNetCorp: GUID = (D1: $a1182988; D2: $0d73; D3: $439e; D4: ($87, 
$ad, $2a, $5b, $36, $9f, $80, $8b));
IID_DestNetWAP: GUID = (D1: $7022e968; D2: $5a97; D3: $4051; D4: ($bc, $1c, 
$c5, $78, $e2, $fb, $a5, $d9));
IID_DestNetSecureWAP: GUID = (D1: $f28d1f74; D2: $72be; D3: $4394; D4: 
($a4, $a7, $4e, $29, $62, $19, $39, $0c));
  
 CONNMGR_PARAM_GUIDDESTNET = $1; { @constdefine guidDestNet field is 
valid }
 CONNMGR_PARAM_MAXCOST = $2; { @constdefine MaxCost field is valid }
 CONNMGR_PARAM_MINRCVBW = $4; { @constdefine MinRcvBw field is valid }
 CONNMGR_PARAM_MAXCONNLATENCY = $8; { @constdefine MaxConnLatency field 
is valid }

  { 
- }

 CONNMGR_FLAG_PROXY_HTTP = $1; { @constdefine HTTP Proxy supported }
 CONNMGR_FLAG_PROXY_WAP = $2; { @constdefine WAP Proxy (gateway) 
supported }
 CONNMGR_FLAG_PROXY_SOCKS4 = $4; { @constdefine SOCKS4 Proxy supported }
 CONNMGR_FLAG_PROXY_SOCKS5 = $8; { @constdefine SOCKS5 Proxy supported }
  { 
- }
 CONNMGR_FLAG_SUSPEND_AWARE = $10; { @constdefine suspended connections 
supported }
 CONNMGR_FLAG_REGISTERED_HOME = $20; { @constdefine only dial out if 
we're registered on the home network }
 CONNMGR_FLAG_NO_ERROR_MSGS = $40; { @constdefine don't show any error 
messages for failed connections }
 CONNMGR_FLAG_WAKE_ON_INCOMING = $80; { @constdefine to satisfy request 
use only those interfaces that can wake the system on incoming traffic }
  { 
- }
 CONNMGR_PRIORITY_VOICE = $2;
  { @constdefine Voice, highest priority, reserved for internal use only. }
 CONNMGR_PRIORITY_USERINTERACTIVE = $08000; 
  { @constdefine User initiated action caused this request, and UI is   
 }
  { currently pending on the creation of this connection. }
  { This is appropriate for an interactive browsing session, }
  { or if the user selects MORE at the bottom of a truncated }
  { mail message, etc. }
 CONNMGR_PRIORITY_USERBACKGROUND = $02000; 
  { @constdefine User initiated connection which has recently become idle. }
  { A connection should be marked as idle when it is no }
  { longer the user's current task.  }
 CONNMGR_PRIORITY_USERIDLE = $0800; 
  { @constdefine Interactive user task which has 

Re: [lazarus] WinCE, howto open a networkpath?

2007-11-20 Thread John vd Waeter

Hi Adrian,

Thanks!

Looks just like the thing I need!

Do you know of a parameter I can set that hides the 
Connection-in-progress dialog that comes up?


kind regards,
John




if ConnMgrEstablishConnectionSync(ConnInfo, FConnection, 6,
 FStatus)  S_OK



Adrian Veith wrote:

Hi,

You have to to use the connection manager api from microsoft. I have 
translated some parts of it to object pascal (source is attached). The 
source is not well tested now, but it works for me. For a simple 
connection to the internet you can use the following code.


Cheers, Adrian.

var
   ConnInfo: CONNMGR_CONNECTIONINFO;

begin
   ZeroMemory(@ConnInfo, sizeof(ConnInfo));
   ConnInfo.cbSize:= sizeof(ConnInfo);
   ConnInfo.dwParams:= CONNMGR_PARAM_GUIDDESTNET;
   ConnInfo.dwPriority:= CONNMGR_PRIORITY_USERBACKGROUND ;
   ConnInfo.guidDestNet:= IID_DestNetInternet;

   if ConnMgrEstablishConnectionSync(ConnInfo, FConnection, 6, 
FStatus)  S_OK

   then
 raise Exception.Create('No connection');



John vd Waeter schrieb:

Hi all,

With the INet components, I managed to use a UDP-component to 
frequently ask an internetserver for some data.


However, no traffic is generated when the handheld is powered up. I 
first have to initiate internet explorer, ask for some trivial page 
and after that my application can continu its UDP traffic.


I guess starting IE opened a networkpath and takes care of obtaining 
an ipnr etc.


What do I have to call to ensure a networkpath (GPRS, WiFi, whatever 
is available) is opened the same way IE does?


tia!
John

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives



_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] WinCE, howto open a networkpath?

2007-11-20 Thread Adrian Veith

Hi John,

the description of the connection manager API is on the msnd website: 
http://msdn2.microsoft.com/en-us/library/aa457271.aspx


I haven't found any parameter to disable the progress dialog.

Cheers,

Adrian.

John vd Waeter schrieb:

Hi Adrian,

Thanks!

Looks just like the thing I need!

Do you know of a parameter I can set that hides the 
Connection-in-progress dialog that comes up?


kind regards,
John




if ConnMgrEstablishConnectionSync(ConnInfo, FConnection, 6,
 FStatus)  S_OK



Adrian Veith wrote:

Hi,

You have to to use the connection manager api from microsoft. I have 
translated some parts of it to object pascal (source is attached). 
The source is not well tested now, but it works for me. For a simple 
connection to the internet you can use the following code.


Cheers, Adrian.

var
   ConnInfo: CONNMGR_CONNECTIONINFO;

begin
   ZeroMemory(@ConnInfo, sizeof(ConnInfo));
   ConnInfo.cbSize:= sizeof(ConnInfo);
   ConnInfo.dwParams:= CONNMGR_PARAM_GUIDDESTNET;
   ConnInfo.dwPriority:= CONNMGR_PRIORITY_USERBACKGROUND ;
   ConnInfo.guidDestNet:= IID_DestNetInternet;

   if ConnMgrEstablishConnectionSync(ConnInfo, FConnection, 
6, FStatus)  S_OK

   then
 raise Exception.Create('No connection');



John vd Waeter schrieb:

Hi all,

With the INet components, I managed to use a UDP-component to 
frequently ask an internetserver for some data.


However, no traffic is generated when the handheld is powered up. I 
first have to initiate internet explorer, ask for some trivial page 
and after that my application can continu its UDP traffic.


I guess starting IE opened a networkpath and takes care of obtaining 
an ipnr etc.


What do I have to call to ensure a networkpath (GPRS, WiFi, whatever 
is available) is opened the same way IE does?


tia!
John

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives



_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives



_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] WinCE, howto open a networkpath?

2007-11-20 Thread Alvise Nicoletti

Adrian Veith ha scritto:

Hi John,

the description of the connection manager API is on the msnd website: 
http://msdn2.microsoft.com/en-us/library/aa457271.aspx


I haven't found any parameter to disable the progress dialog.
Sorry if I go a little out of the topic... but WinCE is not discussed 
much here so I take the occasion to ask:

is there someway to manage the dialogs of WinCE?

I would need, for example, a way to force the keyboard to appear and 
disappear...


Thank you for the code about the networkpath, I also needed that.


Cheers,

Adrian.

John vd Waeter schrieb:

Hi Adrian,

Thanks!

Looks just like the thing I need!

Do you know of a parameter I can set that hides the 
Connection-in-progress dialog that comes up?


kind regards,
John




if ConnMgrEstablishConnectionSync(ConnInfo, FConnection, 6,
 FStatus)  S_OK



Adrian Veith wrote:

Hi,

You have to to use the connection manager api from microsoft. I have 
translated some parts of it to object pascal (source is attached). 
The source is not well tested now, but it works for me. For a simple 
connection to the internet you can use the following code.


Cheers, Adrian.

var
   ConnInfo: CONNMGR_CONNECTIONINFO;

begin
   ZeroMemory(@ConnInfo, sizeof(ConnInfo));
   ConnInfo.cbSize:= sizeof(ConnInfo);
   ConnInfo.dwParams:= CONNMGR_PARAM_GUIDDESTNET;
   ConnInfo.dwPriority:= CONNMGR_PRIORITY_USERBACKGROUND ;
   ConnInfo.guidDestNet:= IID_DestNetInternet;

   if ConnMgrEstablishConnectionSync(ConnInfo, FConnection, 
6, FStatus)  S_OK

   then
 raise Exception.Create('No connection');



John vd Waeter schrieb:

Hi all,

With the INet components, I managed to use a UDP-component to 
frequently ask an internetserver for some data.


However, no traffic is generated when the handheld is powered up. I 
first have to initiate internet explorer, ask for some trivial page 
and after that my application can continu its UDP traffic.


I guess starting IE opened a networkpath and takes care of 
obtaining an ipnr etc.


What do I have to call to ensure a networkpath (GPRS, WiFi, 
whatever is available) is opened the same way IE does?


tia!
John

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives



_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives



_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives





_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] WinCE, howto open a networkpath?

2007-11-19 Thread John vd Waeter

Hi all,

With the INet components, I managed to use a UDP-component to frequently 
ask an internetserver for some data.


However, no traffic is generated when the handheld is powered up. I 
first have to initiate internet explorer, ask for some trivial page and 
after that my application can continu its UDP traffic.


I guess starting IE opened a networkpath and takes care of obtaining an 
ipnr etc.


What do I have to call to ensure a networkpath (GPRS, WiFi, whatever is 
available) is opened the same way IE does?


tia!
John

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives