Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2011-08

Build command menu on WinXP is broken(?)

25 messages · 10 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Marcos Douglas

Hi,
I think something wrong in "Lazarus Build menu command", trunk version on WinXP. I got the new sources of trunk; compiled with new branch fixes_2_6 (2.5.1) with sucess; open the IDE (using my old PCP directory with my environment and packages configurations because I want to migrate the packages from 0.9.30 to 0.9.31 trunk)
and clicked 'Install/Unistall packages' and chose one package just to "refresh" the packages to show in component bar; clicked in 'Save and Build button';
the IDE reopened with sucess and all components showed in component bar, how I wanted. So the migration worked, right?

So, I tried to compile the IDE using Tools/Build (Clean Up + Build All) and I got the error (see printscreen in attachment).

So, I compiled Lazarus with lazbuild tool using the same PCP and... everything worked, again.

Marcos Douglas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: printscreen.jpg
Type: image/jpeg
Size: 39536 bytes
Desc: not available
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20110808/cfda3c2a/attachment-0001.jpg>

Reply by email

Marcos Douglas
to Marcos Douglas
Marcos Douglas wrote 17 lines
Hi, I think something wrong in "Lazarus Build menu command", trunk version on WinXP. I got the new sources of trunk; compiled with new branch fixes_2_6 (2.5.1) with sucess; open the IDE (using my old PCP directory with my environment and packages configurations because I want to migrate the packages from 0.9.30 to 0.9.31 trunk) and clicked 'Install/Unistall packages' and chose one package just to "refresh" the packages to show in component bar; clicked in 'Save and Build button'; the IDE reopened with sucess and all components showed in component bar, how I wanted. So the migration worked, right? So, I tried to compile the IDE using Tools/Build (Clean Up + Build All) and I got the error (see printscreen in attachment). So, I compiled Lazarus with lazbuild tool using the same PCP and... everything worked, again.

Is there a code for lazbuild and other to Lazarus IDE? If yes, IMHO is wrong. I have a problem to compile Lazarus trunk on the WinXP using the IDE, but not using lazbuild tool.

It was to be the same code, isn't?

Marcos Douglas

Reply by email

Marcos Douglas
to Marcos Douglas: I think something wrong in "Lazarus Build menu command", trunk version on WinXP. I got…
Marcos Douglas wrote 18 lines
Hi, I think something wrong in "Lazarus Build menu command", trunk version on WinXP. I got the new sources of trunk; compiled with new branch fixes_2_6 (2.5.1) with sucess; open the IDE (using my old PCP directory with my environment and packages configurations because I want to migrate the packages from 0.9.30 to 0.9.31 trunk) and clicked 'Install/Unistall packages' and chose one package just to "refresh" the packages to show in component bar; clicked in 'Save and Build button'; the IDE reopened with sucess and all components showed in component bar, how I wanted. So the migration worked, right? So, I tried to compile the IDE using Tools/Build (Clean Up + Build All) and I got the error (see printscreen in attachment). So, I compiled Lazarus with lazbuild tool using the same PCP and... everything worked, again.

Nobody answer me... =(

Well, I continued my tests:
1- I compiled Lazarus /branches/fixes_0_9_30/ (I had it compiled with FPC 2.4.5) using lazbuild tool and FPC 2.5.1 (branches/fixes_2_6/) 2- Looks like worked...
3- I opened the IDE and change the FPC directories 3- I clicked in Compile... ERROR: I can't find the Interfaces unit... blablabla...

The lazbuild tool compiled, but did not worked!

So, I clicked in "Build + Clean" and IDE menu to compile with the new FPC version (branches/fixes_2_6/)... everything works now (WORKING IN 0.9.30 NOT IN 0.9.31 trunk").

Marcos Douglas

Reply by email

Marcos Douglas
to Felipe Monteiro de Carvalho
Felipe Monteiro de Carvalho wrote 6 lines
On Mon, Aug 8, 2011 at 8:57 PM, Marcos Douglas wrote: > It was to be the same code, isn't? As far as I know they don't use the same code. Mattias should know better, but he hasn't been in the mailling list lately, so I suppose he is traveling or something.

Felipe,
Thanks for answer my second mail...

I think the Build All from IDE it works, at least the /branches/fixes_0_9_30, but not works correctly in /trunk -- on WinXP.

I can wait Mattias (or somebody that knows the problem) because I have the /branches/fixes_0_9_30/ working fine with FPC 2.5.1 now... but I want to test Lazarus trunk too.

Marcos Douglas

Reply by email

Juan Sánchez
to Marcos Douglas

Hello Marcos,

I hasn't any problem building all IDE in menu in Windows7 with last svn (31925) and FPC from svn (2.7.1). The only problem for me came from Zeos components (ZAbstractRODataset in line 3114 that check for FPC2_1UP to let ftString and ftBlob and it seems that it's not defined in new FPC) but, al least in Windows7, there's not seem to be problem on building all IDE (I build it in Optimized IDE mode with options of clean all and update "revision.inc" checked).

Regards.
Juan.

2011/8/9 Marcos Douglas

Show quoted text 27 lines
On Tue, Aug 9, 2011 at 1:18 PM, Felipe Monteiro de Carvalho wrote: > On Mon, Aug 8, 2011 at 8:57 PM, Marcos Douglas wrote: >> It was to be the same code, isn't? > > As far as I know they don't use the same code. Mattias should know > better, but he hasn't been in the mailling list lately, so I suppose > he is traveling or something. Felipe, Thanks for answer my second mail... I think the Build All from IDE it works, at least the /branches/fixes_0_9_30, but not works correctly in /trunk -- on WinXP. I can wait Mattias (or somebody that knows the problem) because I have the /branches/fixes_0_9_30/ working fine with FPC 2.5.1 now... but I want to test Lazarus trunk too. Marcos Douglas -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20110809/0f811249/attachment.html>

Reply by email

Marcos Douglas
to Juan Sánchez

2011/8/9 Juan S?nchez :

Show quoted text 9 lines
Hello Marcos, ??? I hasn't any problem building all IDE in menu in Windows7 with last svn (31925) and FPC from svn (2.7.1). The only problem for me came from Zeos components (ZAbstractRODataset in line 3114 that check for FPC2_1UP to let?ftString and?ftBlob and it seems that it's not defined in new FPC) but, al least in Windows7, there's not seem to be problem on building all IDE (I build it in Optimized IDE mode with options of clean all and update "revision.inc" checked).

Juan,
I'm using FPC 2.5.1 (fixes_2_6) but I don't think that is the problem. There is no problem with Zeos too, because I can use it in Lazarus /branches/fixes_0_9_30/ with FPC 2.5.1 now.

IMHO, the 'Build all' menu isn't working in trunk (on WinXP).

Marcos Douglas

Reply by email

Maxim Ganetsky
to Marcos Douglas

09.08.2011 23:07, Marcos Douglas ?????:

Show quoted text 17 lines
2011/8/9 Juan S?nchez: > Hello Marcos, > > I hasn't any problem building all IDE in menu in Windows7 with last svn > (31925) and FPC from svn (2.7.1). The only problem for me came from Zeos > components (ZAbstractRODataset in line 3114 that check for FPC2_1UP to > let ftString and ftBlob and it seems that it's not defined in new FPC) but, > al least in Windows7, there's not seem to be problem on building all IDE (I > build it in Optimized IDE mode with options of clean all and update > "revision.inc" checked). Juan, I'm using FPC 2.5.1 (fixes_2_6) but I don't think that is the problem. There is no problem with Zeos too, because I can use it in Lazarus /branches/fixes_0_9_30/ with FPC 2.5.1 now. IMHO, the 'Build all' menu isn't working in trunk (on WinXP).

It does work indeed. Check your installed packages.

Best regards, Maxim Ganetsky mailto:

Reply by email

Marcos Douglas
to Maxim Ganetsky
Maxim Ganetsky wrote 25 lines
09.08.2011 23:07, Marcos Douglas ?????: > > 2011/8/9 Juan S?nchez: >> >> Hello Marcos, >> >> ? ? I hasn't any problem building all IDE in menu in Windows7 with last >> svn >> (31925) and FPC from svn (2.7.1). The only problem for me came from Zeos >> components (ZAbstractRODataset in line 3114 that check for FPC2_1UP to >> let ftString and ftBlob and it seems that it's not defined in new FPC) >> but, >> al least in Windows7, there's not seem to be problem on building all IDE >> (I >> build it in Optimized IDE mode with options of clean all and update >> "revision.inc" checked). > > Juan, > I'm using FPC 2.5.1 (fixes_2_6) but I don't think that is the problem. > There is no problem with Zeos too, because I can use it in Lazarus > /branches/fixes_0_9_30/ with FPC 2.5.1 now. > > IMHO, the 'Build all' menu isn't working in trunk (on WinXP). It does work indeed. Check your installed packages.

The packages are RX and Zeos... others is default in Lazarus. Why the IDE show the image (error) in attachment after a Build?

Marcos Douglas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: printscreen.jpg
Type: image/jpeg
Size: 39536 bytes
Desc: not available
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20110809/75b3fe6a/attachment-0001.jpg>

Reply by email

Flávio Etrusco
to Marcos Douglas
Show quoted text 6 lines
The packages are RX and Zeos... others is default in Lazarus. Why the IDE show the image (error) in attachment after a Build? Marcos Douglas

I don't think you're giving enough details. The message is clearly indicative that the error is in an application or package (I doubt there's a form in Lazarus named TForm1. And what's that console window?). And please stop whining about people not replying to emails.

-Fl?vio

Reply by email

Hans-Peter Diettrich
to Marcos Douglas: Nobody answer me... =( Well, I continued my tests: 1- I compiled Lazarus…
Show quoted text 7 lines
Well, I continued my tests: 1- I compiled Lazarus /branches/fixes_0_9_30/ (I had it compiled with FPC 2.4.5) using lazbuild tool and FPC 2.5.1 (branches/fixes_2_6/) 2- Looks like worked... 3- I opened the IDE and change the FPC directories 3- I clicked in Compile... ERROR: I can't find the Interfaces unit... blablabla...

I had the same problem on Ubuntu. Removed all evitable packages, and the problem disappeared. It may be a not cleaned unit in some package?

BTW it would be nice to have package descriptions, shown in the install/remove packages dialog.

DoDi

Reply by email

waldo kitty
to Marcos Douglas: On Tue, Aug 9, 2011 at 1:18 PM, Felipe Monteiro de Carvalho Thanks for answer my second…
Marcos Douglas wrote 14 lines
On Tue, Aug 9, 2011 at 1:18 PM, Felipe Monteiro de Carvalho wrote: > On Mon, Aug 8, 2011 at 8:57 PM, Marcos Douglas wrote: >> It was to be the same code, isn't? > > As far as I know they don't use the same code. Mattias should know > better, but he hasn't been in the mailling list lately, so I suppose > he is traveling or something. Felipe, Thanks for answer my second mail... I think the Build All from IDE it works, at least the /branches/fixes_0_9_30, but not works correctly in /trunk -- on WinXP.

i haven't tried any newer FPC that i know of but i have run into a situation in that two of my platforms with supposedly identical SVN configurations have differing options... on one of them (w2k) i do not have the same options for compiling lazarus as i do on my vista box... the lazarus.exe on my w2k box is only 75Meg whereas the one on my vista box is 125Meg and has several defines in play... ie godwarf as one IIRC...

i'm not sure why or what caused this difference but i do know that i rebuilt each several times from the base script stuffs on the wiki page... by that i mean that i have wiped completely everything and started all over from the bottom...

Reply by email

Marcos Douglas
to Flávio Etrusco: I don't think you're giving enough details. The message is clearly indicative that the…

2011/8/9 Fl?vio Etrusco :

Show quoted text 9 lines
> > The packages are RX and Zeos... others is default in Lazarus. > Why the IDE show the image (error) in attachment after a Build? > I don't think you're giving enough details. The message is clearly indicative that the error is in an application or package (I doubt there's a form in Lazarus named TForm1. And what's that console window?). And please stop whining about people not replying to emails.

1. I'm giving you all details that I can see (printscreen in the first mail on this thread).
2. You doubt there is a form in Lazarus named TForm1... ok, I doubt too. But are you SURE about that? Well... I think this is a Form for a new project, when you opens the IDE... but is just a guess.
3. "What's that console window?"... that I want to know since the first mail!!!
4. I'm not whining... was a joke. Have you a sense of humor? =)

Marcos Douglas

Reply by email

Marcos Douglas
to Hans-Peter Diettrich: I had the same problem on Ubuntu. Removed all evitable packages, and the problem…
Hans-Peter Diettrich wrote 12 lines
Marcos Douglas schrieb: > Well, I continued my tests: > 1- I compiled Lazarus /branches/fixes_0_9_30/ (I had it compiled with > FPC 2.4.5) using lazbuild tool and FPC 2.5.1 (branches/fixes_2_6/) > 2- Looks like worked... > 3- I opened the IDE and change the FPC directories > 3- I clicked in Compile... ERROR: I can't find the Interfaces unit... > blablabla... I had the same problem on Ubuntu. Removed all evitable packages, and the ?problem disappeared. It may be a not cleaned unit in some package?

To Lazarus 0.9.30 the Build All in IDE works...
To Lazarus 0.9.31 the lazbuild tool works, but not the Build All in IDE... very strange.

BTW it would be nice to have package descriptions, shown in the install/remove packages dialog.

+1 !
How I can guess wich package is broken?

Marcos Douglas

Reply by email

Vincent Snijders
to Marcos Douglas: I think something wrong in "Lazarus Build menu command", trunk version on WinXP. I got…

2011/8/8 Marcos Douglas :

Show quoted text 14 lines
Hi, I think something wrong in "Lazarus Build menu command", trunk version on WinXP. I got the new sources of trunk; compiled with new branch fixes_2_6 (2.5.1) with sucess; open the IDE (using my old PCP directory with my environment and packages configurations because I want to migrate the packages from 0.9.30 to 0.9.31 trunk) and clicked 'Install/Unistall packages' and chose one package just to "refresh" the packages to show in component bar; clicked in 'Save and Build button'; the IDE reopened with sucess and all components showed in component bar, how I wanted. So the migration worked, right? So, I tried to compile the IDE using Tools/Build (Clean Up + Build All) and I got the error (see printscreen in attachment).

Is the build action of the examples in Tools -> Configure Build Lazarus set to none?

Vincent

Reply by email

Marcos Douglas
to Vincent Snijders
Vincent Snijders wrote 18 lines
2011/8/8 Marcos Douglas : > Hi, > I think something wrong in "Lazarus Build menu command", trunk version on WinXP. > I got the new sources of trunk; compiled with new branch fixes_2_6 (2.5.1) with > sucess; open the IDE (using my old PCP directory with my environment and > packages configurations because I want to migrate the packages from > 0.9.30 to 0.9.31 trunk) > and clicked 'Install/Unistall packages' and chose one package just to > "refresh" the packages to show in component bar; clicked in 'Save and > Build button'; > the IDE reopened with sucess and all components showed in component bar, > how I wanted. So the migration worked, right? > > So, I tried to compile the IDE using Tools/Build (Clean Up + Build > All) and I got the error (see printscreen in attachment). Is the build action of the examples in Tools -> Configure Build Lazarus set to none?

Is set to Clean+Build.
See the differences between 0.9.30 and 0.9.31 in attachment, please.

Marcos Douglas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0.9.30.jpg
Type: image/jpeg
Size: 56508 bytes
Desc: not available
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20110810/4a6ee253/attachment-0002.jpg> -------------- next part --------------
A non-text attachment was scrubbed...
Name: 0.9.31.jpg
Type: image/jpeg
Size: 52175 bytes
Desc: not available
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20110810/4a6ee253/attachment-0003.jpg>

Reply by email

Vincent Snijders
to Marcos Douglas

2011/8/10 Marcos Douglas :

Show quoted text 8 lines
On Wed, Aug 10, 2011 at 9:17 AM, Vincent Snijders wrote: > 2011/8/8 Marcos Douglas : > Is the build action of the examples in Tools -> Configure Build > Lazarus set to none? Is set to Clean+Build. See the differences between 0.9.30 and 0.9.31 in attachment, please.

That is why other people didn't have this problem, they don't build the examples.

Vincent

Reply by email

Marcos Douglas
to Vincent Snijders: 2011/8/8 Marcos Douglas : Is the build action of the examples in Tools -> Configure Build…
Vincent Snijders wrote 18 lines
2011/8/8 Marcos Douglas : > Hi, > I think something wrong in "Lazarus Build menu command", trunk version on WinXP. > I got the new sources of trunk; compiled with new branch fixes_2_6 (2.5.1) with > sucess; open the IDE (using my old PCP directory with my environment and > packages configurations because I want to migrate the packages from > 0.9.30 to 0.9.31 trunk) > and clicked 'Install/Unistall packages' and chose one package just to > "refresh" the packages to show in component bar; clicked in 'Save and > Build button'; > the IDE reopened with sucess and all components showed in component bar, > how I wanted. So the migration worked, right? > > So, I tried to compile the IDE using Tools/Build (Clean Up + Build > All) and I got the error (see printscreen in attachment). Is the build action of the examples in Tools -> Configure Build Lazarus set to none?

Is set to Clean+Build.
(I sent 2 images showing the differences between 0.9.30 and 0.9.31 but the mail is in moderator approval)

Marcos Douglas

Reply by email

Marcos Douglas
to Vincent Snijders: 2011/8/10 Marcos Douglas : That is why other people didn't have this problem, they don't…
Vincent Snijders wrote 12 lines
2011/8/10 Marcos Douglas : > On Wed, Aug 10, 2011 at 9:17 AM, Vincent Snijders > wrote: >> 2011/8/8 Marcos Douglas : >> Is the build action of the examples in Tools -> Configure Build >> Lazarus set to none? > > Is set to Clean+Build. > See the differences between 0.9.30 and 0.9.31 in attachment, please. That is why other people didn't have this problem, they don't build the examples.

Hmm... ok I will try.
But I can't build the examples?

Marcos Douglas

Reply by email

Marcos Douglas
to Marcos Douglas
Marcos Douglas wrote 17 lines
On Wed, Aug 10, 2011 at 9:41 AM, Vincent Snijders wrote: > 2011/8/10 Marcos Douglas : >> On Wed, Aug 10, 2011 at 9:17 AM, Vincent Snijders >> wrote: >>> 2011/8/8 Marcos Douglas : >>> Is the build action of the examples in Tools -> Configure Build >>> Lazarus set to none? >> >> Is set to Clean+Build. >> See the differences between 0.9.30 and 0.9.31 in attachment, please. > > That is why other people didn't have this problem, they don't build > the examples. Hmm... ok I will try. But I can't build the examples?

BTW, why 0.9.31 only have to options to Build: IDE and examples and the 0.9.30 have more?

Marcos Douglas

Reply by email

Tommi Prami
to Marcos Douglas

Hello, seems that RAS-api is only available for WinCE, if so (that I am not mistaken), why is that, and how I would get the API easiest way for both WinCE and Win32

(I need to kick up the GPRS connection and redo that if it disconnects). (We use lNet as internet connection component, and it seems that it does not kick the connection up. Seems that .NET does just that on WinCE...)

Any hints on this???

-TP-

Reply by email

Maxim Ganetsky
to Vincent Snijders: 2011/8/10 Marcos Douglas : That is why other people didn't have this problem, they don't…

10.08.2011 16:41, Vincent Snijders ?????:

Show quoted text 12 lines
2011/8/10 Marcos Douglas: > On Wed, Aug 10, 2011 at 9:17 AM, Vincent Snijders > wrote: >> 2011/8/8 Marcos Douglas: >> Is the build action of the examples in Tools -> Configure Build >> Lazarus set to none? > > Is set to Clean+Build. > See the differences between 0.9.30 and 0.9.31 in attachment, please. That is why other people didn't have this problem, they don't build the examples.

All examples compile correctly.

Best regards, Maxim Ganetsky mailto:

Reply by email

Sven Barth
to Tommi Prami: Hello, seems that RAS-api is only available for WinCE, if so (that I am not mistaken),…
Tommi Prami wrote 9 lines
Hello, seems that RAS-api is only available for WinCE, if so (that I am not mistaken), why is that, and how I would get the API easiest way for both WinCE and Win32 (I need to kick up the GPRS connection and redo that if it disconnects). (We use lNet as internet connection component, and it seems that it does not kick the connection up. Seems that .NET does just that on WinCE...) Any hints on this???

1. Don't hijack other threads, because it unpolite and also you are likely to not receive answers, because one might think that you answer belongs to the thread.

2. It seems that nobody was yet interested in using RAS on Windows. You can try to use the RAS unit from WinCE which is located in %fpc%\packages\winceunits\src\. You need to change the "{$calling cdecl}" to "{$calling stdcall}" and then this "should" be enough to compile on Windows. Maybe you need to compare the used functions to the ones on MSDN to see whether they are the same for WinCE and Win32.

3. Regarding GPRS. I might have a solution for that, but currently I don't have access to the code; you'd need to wait till this evening, then I can check whether that could help you.

Regards,
Sven

Reply by email

Sven Barth
to Sven Barth
Sven Barth wrote
3. Regarding GPRS. I might have a solution for that, but currently I don't have access to the code; you'd need to wait till this evening, then I can check whether that could help you.

Ok, I have found the code. Strangely though I only use it in the older version of my application, but the newer one connects as well... strange.

=== source fragments begin ===

uses
   ConnMgr;
var
   ConInfo: TConnMgrConnectionInfo;
   ConStatus: DWord;
begin
   FillChar(ConInfo, SizeOf(TConnMgrConnectionInfo), 0);
   ConInfo.cbSize := SizeOf(TConnMgrConnectionInfo);
   ConInfo.dwParams := CONNMGR_PARAM_GUIDDESTNET;
   ConInfo.dwPriority := CONNMGR_PRIORITY_USERINTERACTIVE;
   ConInfo.bExclusive := False;
   ConInfo.guidDestNet := IID_DestNetInternet;
   if ConnMgrEstablishConnection(@ConInfo, @fConHandle)  S_OK then
     raise Exception.Create('Error creating connection; check your
settings');
   while True do begin
     Application.ProcessMessages;
     Sleep(50);
     ConnMgrConnectionStatus(fConHandle, @ConStatus);
     case ConStatus of
       CONNMGR_STATUS_CONNECTED: begin
         SetStatus('Connection established');
         Break;
       end;
       CONNMGR_STATUS_WAITINGFORPHONE: begin
         SetStatus('Call blocks connection');
       end;
       CONNMGR_STATUS_NOPATHTODESTINATION: begin
         SetStatus('No suitable connection found');
         raise Exception.Create('Could not find suitable connection');
       end;
       CONNMGR_STATUS_WAITINGFORPATH: begin
         SetStatus('Cannot establish connection. (Bad signal?)');
       end;
       CONNMGR_STATUS_CONNECTIONFAILED: begin
         SetStatus('Connection failed');
         raise Exception.Create('Couldn''t establish connection. Try
again later');
       end;
       CONNMGR_STATUS_CONNECTIONCANCELED: begin
         SetStatus('Connection canceled');
         raise Exception.Create('The connection was canceled');
       end;
     end;
   end;
end;

=== source fragment end ===

"SetStatus" was used to set the content of a status label and the text's are rough translations from my German ones.

Even if this shouldn't work as is it might give you the necessary pointers for MSDN. And this code will work on Windows CE/Mobile only (at least as far as I'm aware of).

Regards,
Sven

Reply by email

Tommi Prami
to Sven Barth
Sven Barth wrote 78 lines
On 11.08.2011 14:13, Sven Barth wrote: > 3. Regarding GPRS. I might have a solution for that, but currently I > don't have access to the code; you'd need to wait till this evening, > then I can check whether that could help you. Ok, I have found the code. Strangely though I only use it in the older version of my application, but the newer one connects as well... strange. === source fragments begin === uses ConnMgr; var ConInfo: TConnMgrConnectionInfo; ConStatus: DWord; begin FillChar(ConInfo, SizeOf(TConnMgrConnectionInfo), 0); ConInfo.cbSize := SizeOf(TConnMgrConnectionInfo); ConInfo.dwParams := CONNMGR_PARAM_GUIDDESTNET; ConInfo.dwPriority := CONNMGR_PRIORITY_USERINTERACTIVE; ConInfo.bExclusive := False; ConInfo.guidDestNet := IID_DestNetInternet; if ConnMgrEstablishConnection(@ConInfo, @fConHandle) S_OK then raise Exception.Create('Error creating connection; check your settings'); while True do begin Application.ProcessMessages; Sleep(50); ConnMgrConnectionStatus(fConHandle, @ConStatus); case ConStatus of CONNMGR_STATUS_CONNECTED: begin SetStatus('Connection established'); Break; end; CONNMGR_STATUS_WAITINGFORPHONE: begin SetStatus('Call blocks connection'); end; CONNMGR_STATUS_NOPATHTODESTINATION: begin SetStatus('No suitable connection found'); raise Exception.Create('Could not find suitable connection'); end; CONNMGR_STATUS_WAITINGFORPATH: begin SetStatus('Cannot establish connection. (Bad signal?)'); end; CONNMGR_STATUS_CONNECTIONFAILED: begin SetStatus('Connection failed'); raise Exception.Create('Couldn''t establish connection. Try again later'); end; CONNMGR_STATUS_CONNECTIONCANCELED: begin SetStatus('Connection canceled'); raise Exception.Create('The connection was canceled'); end; end; end; end; === source fragment end === "SetStatus" was used to set the content of a status label and the text's are rough translations from my German ones. Even if this shouldn't work as is it might give you the necessary pointers for MSDN. And this code will work on Windows CE/Mobile only (at least as far as I'm aware of). Regards, Sven -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Thanks...

I try to explore it later...

-TP-

Reply by email