🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.internet.web
7 messages
7 total messages Started by Safari Thu, 22 Jul 2004 20:19
InternetGetConnectedState
#1749
Author: Safari
Date: Thu, 22 Jul 2004 20:19
18 lines
1142 bytes
Error...!

#include "WinInet.hpp"

bool __fastcall GetIfOnline()
{
   WORD Flags;
   return InternetGetConnectedState(Flags, 0);
}

/*
This example is OK.
Function GetIfOnline: Boolean;
Var Flags: Word;
Begin
   Result := InternetGetConnectedState(@Flags, 0);
End;
*/
Re: InternetGetConnectedState
#1750
Author: Remy Lebeau (TeamB)
Date: Fri, 23 Jul 2004 03:24
19 lines
1350 bytes
"Safari" <Safari@alloymail.com> wrote in message
news:41005838@newsgroups.borland.com...

> Error...!

For future reference, please always specify what the errors actually are.

>    WORD Flags;
>    return InternetGetConnectedState(Flags, 0);

InternetGetConnectedState() expects a pointer for the first parameter.  Use
the '&' operator for that, ie:

    WORD Flags = 0;
    return InternetGetConnectedState(&Flags, 0);


Gambit
Re: InternetGetConnectedState
#1756
Author: Safari
Date: Fri, 23 Jul 2004 21:23
26 lines
1497 bytes
Thanks Remy,
Safari

Remy Lebeau (TeamB) wrote:
> "Safari" <Safari@alloymail.com> wrote in message
> news:41005838@newsgroups.borland.com...
> 
> 
>>Error...!
> 
> 
> For future reference, please always specify what the errors actually are.
> 
> 
>>   WORD Flags;
>>   return InternetGetConnectedState(Flags, 0);
> 
> 
> InternetGetConnectedState() expects a pointer for the first parameter.  Use
> the '&' operator for that, ie:
> 
>     WORD Flags = 0;
>     return InternetGetConnectedState(&Flags, 0);
> 
> Gambit
Re: InternetGetConnectedState
#1757
Author: Safari
Date: Fri, 23 Jul 2004 22:41
38 lines
1778 bytes
Hello Remy,
Error...!

bool __fastcall GetOnline()
{
   DWORD Flag = 0;
   return InternetGetConnectedState(&Flag, 0);
}

void __fastcall TMain::Button1Click(TObject *Sender)
{
   Timer->Enabled = GetOnline();
}

Thanks,
Safari

"Remy Lebeau (TeamB)" <gambit47.no.spam@no.spam.yahoo.com> wrote in message
news:4100849c@newsgroups.borland.com...
|
| "Safari" <Safari@alloymail.com> wrote in message
| news:41005838@newsgroups.borland.com...
|
| > Error...!
|
| For future reference, please always specify what the errors actually are.
|
| >    WORD Flags;
| >    return InternetGetConnectedState(Flags, 0);
|
| InternetGetConnectedState() expects a pointer for the first parameter.
Use
| the '&' operator for that, ie:
|
|     WORD Flags = 0;
|     return InternetGetConnectedState(&Flags, 0);
|
| Gambit
Re: InternetGetConnectedState
#1758
Author: Remy Lebeau (TeamB)
Date: Sat, 24 Jul 2004 05:18
12 lines
1232 bytes
"Safari" <Safari@alloymail.com> wrote in message
news:41019b63@newsgroups.borland.com...

> Error...!

Once again, I have to ask you to please always specify the actual errors.
Just saying that there are errors without explaining what they actually are
is not very helpful.


Gambit
Re: InternetGetConnectedState
#1763
Author: Safari
Date: Sun, 25 Jul 2004 14:17
31 lines
1739 bytes
bool __fastcall GetOnline()
{
   DWORD Flag = 0;
   return InternetGetConnectedState(&Flag, 0);
}

void __fastcall TMain::Button1Click(TObject *Sender)
{
   Button1->Enabled = GetOnline();
}

[Liner Error] Unresolved external 'InternetGetConnectedState'
referenced from C:\PROGRAM FILES\CBUILDER\PROJECTS\MYFILE.OBJ

Thanks again,
Safari

"Remy Lebeau (TeamB)" <gambit47.no.spam@no.spam.yahoo.com> wrote in message
news:4101f0cf$1@newsgroups.borland.com...
|
| "Safari" <Safari@alloymail.com> wrote in message
| news:41019b63@newsgroups.borland.com...
|
| > Error...!
|
| Once again, I have to ask you to please always specify the actual errors.
| Just saying that there are errors without explaining what they actually
are
| is not very helpful.
|
| Gambit
Re: InternetGetConnectedState
#1764
Author: Remy Lebeau (TeamB)
Date: Sun, 25 Jul 2004 23:11
11 lines
1296 bytes
"Safari" <Safari@alloymail.com> wrote in message
news:41041879@newsgroups.borland.com...

> [Liner Error] Unresolved external 'InternetGetConnectedState'
> referenced from C:\PROGRAM FILES\CBUILDER\PROJECTS\MYFILE.OBJ

You need to add inet.lib to your project.


Gambit
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads