On Saturday, December 9, 2000, at 01:56 PM, kail wrote:
> the function prototype for INetLibOpen() looks like this: 
>  
>             Err INetLibOpen (UInt16 libRefnum, UInt16 config, 
>             UInt32 flags, DmOpenRef cacheRef, 
>             UInt32 cacheSize, MemHandle* inetHP) 
>  
> the last parameter appears to want a pointer to a MemHandle that i have 
> already created with MemHandleNew().  is this correct? 

No, INetLibOpen creates a MemHandle for you and returns it to you.  

> Does anyone have a code example of the simplest, most default usage 
> of INetLibOpen? 
 

Here's an example:

UInt16 gRefNum;
MemHandle gINetHandle;

Err DoOpen(UInt16 configIndex)
{
  Err err;
  const UInt16 kFlags = 0;  // none 
defined
  DmOpenRef kCacheDatabase = 0; // no caching
  const UInt16 kCacheSize = 0;
  

  err = INetLibOpen(gRefNum, configIndex, 
    kFlags, kCacheDatabase, kCacheSize,
   
 &gINetHandle);
  return err;
}

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

Reply via email to