ImageGear Professional DLL v17.1 for Windows Accusoft
IG_load_internet
Send Feedback  
ImageGear Professional DLL v17.1 for Windows > API Reference Guide > Core Component API Reference > Core Component Functions Reference > Load Functions > IG_load_internet

Glossary Item Box

This function loads an image from the Internet into memory and returns to you a HIGEAR handle to it.

Declaration:

  Copy Code
AT_ERRCOUNT ACCUAPI IG_load_internet(
   const LPCHAR HostName,
   const LPCHAR URLPath,
   const LPCHAR UserName,
   const LPCHAR Password,
   const LONG nServerPort,
   DWORD dwService,
   LPHIGEAR lphIGear
);

Arguments:

HostName Set to the name of Internet host, for example "www.accusoft.com".
URLPath Set to the URL path to the desired file, such as "/images/image1.bmp". In general, this is a path to necessary file on the given host.
UserName Set to the proper user name to logon.
Password Give the proper password to logon.
nServerPort Set to the number of the Internet port. Use one of the settings from parameter 3 of the Win32 function InternetConnect.
dwService Set to one of the following values: INTERNET_SERVICE_FTP for FTP service, INTERNET_SERVICE_GOPHER for Gopher service, or INTERNET_SERVICE_HTTP for HTTP service.
lphIGear ImageGear returns you a HIGEAR handle to the newly loaded image.

Return Value:

Returns 0 if successful. Otherwise, returns the number of ImageGear errors that occurred during this function call.

Supported Raster Image Formats:

All pixel formats supported by ImageGear Professional.

Sample:

None

Example:

  Copy Code
AT_ERRCOUNT  nErrcount;
HIGEAR hIGear = 0;
nErrcount = IG_load_internet("Accusoft.com", "/images/image1.bmp", "Jon", "WebMaster",
    80, INTERNET_SERVICE_HTTP, &hIGear);

//...

// Destroy the image
if(IG_image_is_valid(hIGear))
{
    IG_image_delete(hIGear);
}

Remarks:

This function does essentially the same thing as IG_load_file, except that it also lets you pass user/password, Server Port, and Transfer Services information.

©2012. Accusoft Corporation. All Rights Reserved.