On Tue, Nov 26, 2002 at 04:33:00PM -0500, Jason D. Kleban wrote:
> Falchnet recognizes and colorizes my constant inetCfgNameDefWireless but
> gives a bunch of compiler errors.

It would be easier to help you if you told us what compiler errors you
were getting.

When I tried compiling your code, I got two compilation errors, both of
which indicated reasonably obvious mistakes in your code.

>       Char* serverResponse; // Server Response
[...]
>               FldInsert(fieldReturnPtr, &serverResponse, 1);

If you care to look up FldInsert() in the manual, I am sure you will see
your mistake.

>       INetLibConfigIndexFromName(libRefNum, inetCfgNameDefWireless,
> &WirelessConfig);

INetLibConfigIndexFromName() expects a pointer to a INetConfigNameType
as its second parameter.  After studying the Reference, Companion, and
SDK examples (ha! -- no INetLib examples), it's not clear to me what the
intended way of using string literals such as inetCfgNameDefWireless
with it is, but just using them is certainly not sufficient.

Looking at INetMgr.h, it would appear that just casting would be
sufficient:

  INetLibConfigIndexFromName
    (libRefNum, (INetConfigNameType *) inetCfgNameDefWireless,
     &WirelessConfig);

or you could cons up your own INetConfigNameType:

  static const INetConfigNameType defwireless = { inetCfgNameDefWireless };
  [...]
  INetLibConfigIndexFromName (libRefNum, &defwireless, &WirelessConfig);

except that the @#!?#! parameter isn't const.  So drop the "const" and
the valiant attempt to avoid the gratuitous dependency on having globals.

Neither of these is particularly satisfactory, but the second I suppose
is less distasteful and is probably what was intended.

> I've also had to comment out the following from my StartApplication
> routine:
> 
>       ErrFatalDisplayIf(FtrGet(inetLibFtrCreator, 
>               inetFtrNumVersion, &value) == 0 && 
>               value != 0, "Error Getting the Internet Library Feature");

You don't say why you found that you had to comment this out.  Perhaps
you should reconsider the sense of your logic!

    John

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to