FLibrary Function Calls

Version 3.8.0
Updated: 09/08/2011
TradeMark

Flibrary.DLL is a Dynamic link library written in C/C++ to expand functionality of other programming languages.

FLibrary functions:

  • FLibVersion - Get the version of FLibrary.dll.
  •       C/C++ - extern "C" LPTSTR FLibVersion();
          VFP/Basic - declare string FLibVersion in "FLibrary.dll"

    Return Value:
    Returns the version of flibrary functions as a string.

    Example:
    strVersion=FLibVersion();

    Go Top

  • WaitBox - A function to enhance the MessageBox() function with a timeout.
  •       C/C++ - extern "C" int PASCAL EXPORT WaitBox(char Message[],int style,int Seconds,char Header[])
          VFP/Basic - declare integer WaitBox in "FLibrary.dll" string,integer,integer,string

    Parameters:
    Message - The formatted string to display in the main message of the dialog box.

    style - Specifies the buttons and icons that appear in the dialog box, the default button when the dialog box is displayed, and the behavior of the dialog box.

    Value Dialog box buttons
    0 OK button only
    1 OK and Cancel buttons
    2 Abort, Retry, and Ignore buttons
    3 Yes, No, and Cancel buttons
    4 Yes and No buttons
    5 Retry and Cancel buttons

    Value Icon
    16 Stop sign
    32 Question mark
    48 Exclamation point
    64 Information (i) icon

    Value Default button
    0 First button
    256 Second button
    512 Third button

    One value from each of the preceding tables can be the added together for different style messages. For example 1+48+512 will display a waitbox with the ok and cancel buttons, an exclamation mark, and the cancel button is the default (third button). Notice that the first button is not an option for style 1

    Seconds - The time in seconds (0-9999) the wait window will timeout if no option is selected.

    Seconds - The formatted string to display in the title bar of the dialog box.

    Return Value:
    The WaitBox returns a numeric value from the following table:
    Return value Button
    -2 INVALID STYLE PARAMETER
    -1 RETURN VALUE UNKNOWN
    0 WaitBox Timeout
    1 OK
    2 Cancel
    3 Abort
    4 Retry
    5 Ignore
    6 Yes
    7 No

    Example:
    ix=WaitBox("Hello World",0,15,"Message");

    Go Top

  • ScreenRes - A function to change the screen resolution.
  •       C/C++ - extern "C" BOOL PASCAL EXPORT ScreenRes(int x, int y);
          VFP/Basic - declare short ScreenRes in "FLibrary.dll" integer,integer

    Parameters:
    X - The New X resolution value.

    Y - The New Y resolution value.

    Return Value:
    Returns TRUE if the function succeeded, or FALSE if the function failed. A message box will display the error if the function failed.

    Example:
    bReturn=ScreenRes(800,600);

    Go Top

  • GetResX - A function to capture the current X screen resolution.
  •       C/C++ - extern "C" int PASCAL EXPORT GetResX();
          VFP/Basic - declare integer GetResX in "FLibrary.dll"

    Return Value:
    Returns the X Screen resolution if the function succeeded, or 0 if the function failed.

    Example:
    ix=GetResX();

    Go Top

  • GetResY - A function to capture the current Y screen resolution.
  •       C/C++ - extern "C" int PASCAL EXPORT GetResY();
          VFP/Basic - declare integer GetResY in "FLibrary.dll"

    Return Value:
    Returns the X Screen resolution if the function succeeded, or 0 if the function failed.

    Example:
    iy=GetResY();

    Go Top

  • InitConnection - A function to establish a dialup connection.
  •       C/C++ - extern "C" long PASCAL EXPORT InitConnection(char ConnectionFile[]);
          VFP/Basic - declare integer InitConnection in "FLibrary.dll" string

    Parameters:
    ConnectionFile - A formatted string of the name of an existing dialup connection to establish from the system's network connections.

    Return Value:
    Returns a numeric handle to the connection if succeeded, or 0 if the function failed to connect.

    Example:
    dwhandle=InitConnection("My Dialup Connection");

    Go Top

  • HangUp - A function to hangup a connected dialup connection.
  •       C/C++ - extern "C" long PASCAL EXPORT HangUp(DWORD dwconnect);
          VFP/Basic - declare integer HangUp in "FLibrary.dll" integer

    Parameters:
    dwconnect - A numeric handle of the connected dialup connection to disconnect.

    Return Value:
    Returns a 0 if succeeded, or a numeric win32 error code if the function fails.

    Example:
    dwReturn=HangUp(dwhandle);

    Go Top

  • CreateConnection - A function to create a dialup connection.
  •       C/C++ - extern "C" int CreateConnection(char cName[]);
          VFP/Basic - declare integer CreateConnection in "FLibrary.dll" string

    Parameters:
    cName - A formatted string of the name for a new dialup connection.

    Return Value:
    Returns a 0 if succeeded, or a 1 if the function fails.

    Remarks:
    The CreateConnection function displays the following dialog box for required data about the new connection. Any other dialup settings are set to optimal defaults for use with the flibrary InitConnection and HangUp function calls.

    Example:
    iReturn=CreateConnection("My Dialup Connection");

    Go Top

  • RestartComputer - Restart the computer.
  •       C/C++ - extern "C" int RestartComputer();
          VFP/Basic - declare integer RestartComputer in "FLibrary.dll"

    Return Value:
    -4 = Failed to exit Windows.
    -3 = Failed to adjust system token privileges to shutdown.
    -2 = Failed to open current process token.
    -1 = Canceled.
    0 = Succeeded.
    Remarks:
    The RestartComputer function displays a confirmation box before restarting the system.

    Example:
    iReturn=RestartComputer();

    Go Top

  • AddRegistryEntry - Adds an entry in the windows registry.
  •       C/C++ - extern "C" int AddRegistryEntry(char SubKey[],char StringValue[],char Value[]);
          VFP/Basic - declare integer AddRegistryEntry in "Flibrary.dll" string,string,string

    Parameters:
    SubKey - The key to store a value in.
    StringValue - second parameter is the value to store.
    Value - third parameter is the string to store.

    Return Value:
    0 = success
    -1 = Could not create the key
    -2 = bad parameter passed to function
    -3 = could not set the value to the key

    Remarks:
    The program calling this function will require administrator access in Windows version Vista or later to actually write the registry value.

    Example:
    iReturn=AddRegistryEntry("Software\Microsoft\Windows\CurrentVersion\Run\","ipconfig","ipconfig.exe");

    Go Top

  • PingTest - Ping a computer on the network by IP address.
  •       C/C++ - extern "C" BOOL PASCAL EXPORT PingTest(char ComputerName[]);
          VFP/Basic - declare short PingTest in "FLibrary.dll" string

    Parameters:
    ComputerName - A formatted string containing the IP address of a computer on the network to send an ICMP echo request to.

    Return Value:
    Return value is greater than 0 if majority of 4 packets are returned, or 0 if the target IP does not return a response.

    Remarks:
    This function only will work in windows XP and prior.

    Example:
    bReturn=PingTest("127.0.0.1");

    Go Top

  • SystemFolderPath - Obtains the system folder path.
  •       C/C++ - extern "C" LPTSTR PASCAL EXPORT SystemFolderPath();
          VFP/Basic - declare string SystemFolderPath in "FLibrary.dll"

    Return Value:
    Return the system path and directory as a formatted string, or an empty value if failed.

    Example:
    strWindowsFolder=SystemFolderPath();

    Go Top

  • DeskTopFolderPath - Obtains the Desktop folder path.
  •       C/C++ - extern "C" LPTSTR PASCAL EXPORT DeskTopFolderPath();
          VFP/Basic - declare string DeskTopFolderPath in "FLibrary.dll"

    Return Value:
    Return the current users desktop path and directory as a formatted string, or an empty value if failed.

    Example:
    strDesktopFolder=DeskTopFolderPath();

    Go Top

  • TempFolderPath - Obtains the current users temp folder path.
  •       C/C++ - extern "C" LPTSTR PASCAL EXPORT TempFolderPath();
          VFP/Basic - declare string TempFolderPath in "FLibrary.dll"

    Return Value:
    Return the current users temporary files path and directory as a formatted string, or an empty value if failed.

    Example:
    strTempFolder=TempFolderPath();

    Go Top

  • GetFolderPath - Obtains a folder path by CSIDL.
  •       C/C++ - extern "C" LPTSTR PASCAL EXPORT GetFolderPath(int iCSIDL);
          VFP/Basic - declare string GetFolderPath in "FLibrary.dll" integer

    Parameters:
    iCSIDL - the value of the directory to obtained.
    CSIDL Button
    CSIDL_FLAG_CREATE (0x8000) Version 5.0. Combine this CSIDL with any of the following CSIDLs to force the creation of the associated folder.
    CSIDL_ADMINTOOLS (0x0030) Version 5.0. The file system directory that is used to store administrative tools for an individual user. The Microsoft Management Console (MMC) will save customized consoles to this directory, and it will roam with the user.
    CSIDL_ALTSTARTUP (0x001d) The file system directory that corresponds to the user's nonlocalized Startup program group.
    CSIDL_APPDATA (0x001a) Version 4.71. The file system directory that serves as a common repository for application-specific data. A typical path is C:\Documents and Settings\username\Application Data. This CSIDL is supported by the redistributable Shfolder.dll for systems that do not have the Microsoft Internet Explorer 4.0 integrated Shell installed.
    CSIDL_BITBUCKET (0x000a) The virtual folder containing the objects in the user's Recycle Bin.
    CSIDL_CDBURN_AREA (0x003b) Version 6.0. The file system directory acting as a staging area for files waiting to be written to CD. A typical path is C:\Documents and Settings\username\Local Settings\Application Data\Microsoft\CD Burning.
    CSIDL_COMMON_ADMINTOOLS (0x002f) Version 5.0. The file system directory containing administrative tools for all users of the computer.
    CSIDL_COMMON_ALTSTARTUP (0x001e) The file system directory that corresponds to the nonlocalized Startup program group for all users. Valid only for Microsoft Windows NT systems.
    CSIDL_COMMON_APPDATA (0x0023) Version 5.0. The file system directory containing application data for all users. A typical path is C:\Documents and Settings\All Users\Application Data.
    CSIDL_COMMON_DESKTOPDIRECTORY (0x0019) The file system directory that contains files and folders that appear on the desktop for all users. A typical path is C:\Documents and Settings\All Users\Desktop. Valid only for Windows NT systems.
    CSIDL_COMMON_DOCUMENTS (0x002e) The file system directory that contains documents that are common to all users. A typical paths is C:\Documents and Settings\All Users\Documents. Valid for Windows NT systems and Microsoft Windows 95 and Windows 98 systems with Shfolder.dll installed.
    CSIDL_COMMON_FAVORITES (0x001f) The file system directory that serves as a common repository for favorite items common to all users. Valid only for Windows NT systems.
    CSIDL_COMMON_MUSIC (0x0035) Version 6.0. The file system directory that serves as a repository for music files common to all users. A typical path is C:\Documents and Settings\All Users\Documents\My Music.
    CSIDL_COMMON_PICTURES (0x0036) Version 6.0. The file system directory that serves as a repository for image files common to all users. A typical path is C:\Documents and Settings\All Users\Documents\My Pictures.
    CSIDL_COMMON_PROGRAMS (0x0017) The file system directory that contains the directories for the common program groups that appear on the Start menu for all users. A typical path is C:\Documents and Settings\All Users\Start Menu\Programs. Valid only for Windows NT systems.
    CSIDL_COMMON_STARTMENU (0x0016) The file system directory that contains the programs and folders that appear on the Start menu for all users. A typical path is C:\Documents and Settings\All Users\Start Menu. Valid only for Windows NT systems.
    CSIDL_COMMON_STARTUP (0x0018) The file system directory that contains the programs that appear in the Startup folder for all users. A typical path is C:\Documents and Settings\All Users\Start Menu\Programs\Startup. Valid only for Windows NT systems.
    CSIDL_COMMON_TEMPLATES (0x002d) The file system directory that contains the templates that are available to all users. A typical path is C:\Documents and Settings\All Users\Templates. Valid only for Windows NT systems.
    CSIDL_COMMON_VIDEO (0x0037) Version 6.0. The file system directory that serves as a repository for video files common to all users. A typical path is C:\Documents and Settings\All Users\Documents\My Videos.
    CSIDL_COMPUTERSNEARME (0x003d) The folder representing other machines in your workgroup.
    CSIDL_CONNECTIONS (0x0031) The virtual folder representing Network Connections, containing network and dial-up connections.
    CSIDL_CONTROLS (0x0003) The virtual folder containing icons for the Control Panel applications.
    CSIDL_COOKIES (0x0021) The file system directory that serves as a common repository for Internet cookies. A typical path is C:\Documents and Settings\username\Cookies.
    CSIDL_DESKTOP (0x0000) The virtual folder representing the Windows desktop, the root of the namespace.
    CSIDL_DESKTOPDIRECTORY (0x0010) The file system directory used to physically store file objects on the desktop (not to be confused with the desktop folder itself). A typical path is C:\Documents and Settings\username\Desktop.
    CSIDL_DRIVES (0x0011) The virtual folder representing My Computer, containing everything on the local computer: storage devices, printers, and Control Panel. The folder may also contain mapped network drives.
    CSIDL_FAVORITES (0x0006) The file system directory that serves as a common repository for the user's favorite items. A typical path is C:\Documents and Settings\username\Favorites.
    CSIDL_FLAG_DONT_VERIFY (0x4000) Combine with another CSIDL constant, except for CSIDL_FLAG_CREATE, to return an unverified folder path—with no attempt to create or initialize the folder.
    CSIDL_FONTS (0x0014) A virtual folder containing fonts. A typical path is C:\Windows\Fonts.
    CSIDL_HISTORY (0x0022) The file system directory that serves as a common repository for Internet history items.
    CSIDL_INTERNET (0x0001) A viritual folder for Internet Explorer (icon on desktop).
    CSIDL_INTERNET_CACHE (0x0020) Version 4.72. The file system directory that serves as a common repository for temporary Internet files. A typical path is C:\Documents and Settings\username\Local Settings\Temporary Internet Files.
    CSIDL_LOCAL_APPDATA (0x001c) Version 5.0. The file system directory that serves as a data repository for local (nonroaming) applications. A typical path is C:\Documents and Settings\username\Local Settings\Application Data.
    CSIDL_MYDOCUMENTS (0x000c) Version 6.0. The virtual folder representing the My Documents desktop item.
    CSIDL_MYMUSIC (0x000d) The file system directory that serves as a common repository for music files. A typical path is C:\Documents and Settings\User\My Documents\My Music.
    CSIDL_MYPICTURES (0x0027) Version 5.0. The file system directory that serves as a common repository for image files. A typical path is C:\Documents and Settings\username\My Documents\My Pictures.
    CSIDL_MYVIDEO (0x000e) Version 6.0. The file system directory that serves as a common repository for video files. A typical path is C:\Documents and Settings\username\My Documents\My Videos. A file system directory containing the link objects that may exist in the My Network Places virtual folder. It is not the same as CSIDL_NETWORK, which represents the network namespace root. A typical path is C:\Documents and Settings\username\NetHood.
    CSIDL_NETWORK (0x0012) A virtual folder representing Network Neighborhood, the root of the network namespace hierarchy.
    CSIDL_PERSONAL (0x0005) Version 6.0. The virtual folder representing the My Documents desktop item. This is equivalent to CSIDL_MYDOCUMENTS. Previous to Version 6.0. The file system directory used to physically store a user's common repository of documents. A typical path is C:\Documents and Settings\username\My Documents. This should be distinguished from the virtual My Documents folder in the namespace. To access that virtual folder, use SHGetFolderLocation, which returns the ITEMIDLIST for the virtual location, or refer to the technique described in Managing the File System.
    CSIDL_PHOTOALBUMS (0x0045) Note This documentation is preliminary and is subject to change. Windows Vista and later. The virtual folder used to store photo albums, typically username\My Pictures\Photo Albums.
    CSIDL_PLAYLISTS (0x003f) Note This documentation is preliminary and is subject to change. Windows Vista and later. The virtual folder used to store play albums, typically username\My Music\Playlists.
    CSIDL_PRINTERS (0x0004) The virtual folder containing installed printers.
    CSIDL_PRINTHOOD (0x001b) The file system directory that contains the link objects that can exist in the Printers virtual folder. A typical path is C:\Documents and Settings\username\PrintHood.
    CSIDL_PROFILE (0x0028) Version 5.0. The user's profile folder. A typical path is C:\Documents and Settings\username. Applications should not create files or folders at this level; they should put their data under the locations referred to by CSIDL_APPDATA or CSIDL_LOCAL_APPDATA.
    CSIDL_PROGRAM_FILES (0x0026) Version 5.0. The Program Files folder. A typical path is C:\Program Files.
    CSIDL_PROGRAM_FILES_COMMON (0x002b) Version 5.0. A folder for components that are shared across applications. A typical path is C:\Program Files\Common. Valid only for Windows NT, Windows 2000, and Windows XP systems. Not valid for Windows Millennium Edition (Windows Me).
    CSIDL_PROGRAMS (0x0002) The file system directory that contains the user's program groups (which are themselves file system directories). A typical path is C:\Documents and Settings\username\Start Menu\Programs.
    CSIDL_RECENT (0x0008) The file system directory that contains shortcuts to the user's most recently used documents. A typical path is C:\Documents and Settings\username\My Recent Documents. To create a shortcut in this folder, use SHAddToRecentDocs. In addition to creating the shortcut, this function updates the Shell's list of recent documents and adds the shortcut to the My Recent Documents submenu of the Start menu.
    CSIDL_RESOURCES (0x0038) Note This documentation is preliminary and is subject to change. Windows Vista and later. The file system directory that contains resource data. A typical path is C:\Windows\Resources.
    CSIDL_SAMPLE_MUSIC (0x0040) Note This documentation is preliminary and is subject to change. Windows Vista and later. The file system directory that contains sample music. A typical path is C:\Documents and Settings\username\My Documents\My Music\Sample Music.
    CSIDL_SAMPLE_PLAYLISTS (0x0041) Note This documentation is preliminary and is subject to change. Windows Vista and later. The file system directory that contains sample playlists. A typical path is C:\Documents and Settings\username\My Documents\My Music\Sample Playlists.
    CSIDL_SAMPLE_PICTURES (0x0042) Note This documentation is preliminary and is subject to change. Windows Vista and later. The file system directory that contains sample pictures. A typical path is C:\Documents and Settings\username\My Documents\My Pictures\Sample Pictures.
    CSIDL_SAMPLE_VIDEOS (0x0043) Note This documentation is preliminary and is subject to change. Windows Vista and later. The file system directory that contains sample videos. A typical path is C:\Documents and Settings\username\My Documents\My Videos\Sample Videos.
    CSIDL_SENDTO (0x0009) The file system directory that contains Send To menu items. A typical path is C:\Documents and Settings\username\SendTo.
    CSIDL_STARTMENU (0x000b) The file system directory containing Start menu items. A typical path is C:\Documents and Settings\username\Start Menu.
    CSIDL_STARTUP (0x0007) The file system directory that corresponds to the user's Startup program group. The system starts these programs whenever any user logs onto Windows NT or starts Windows 95. A typical path is C:\Documents and Settings\username\Start Menu\Programs\Startup.
    CSIDL_SYSTEM (0x0025) Version 5.0. The Windows System folder. A typical path is C:\Windows\System32.
    CSIDL_TEMPLATES (0x0015) The file system directory that serves as a common repository for document templates. A typical path is C:\Documents and Settings\username\Templates.
    CSIDL_WINDOWS (0x0024) Version 5.0. The Windows directory or SYSROOT. This corresponds to the %windir% or %SYSTEMROOT% environment variables. A typical path is C:\Windows.

    Return Value:
    The folder path and directory as a formatted string of the CSIDL paramter, or an empty value if failed.

    Example:
    strTempFolder=TempFolderPath();

    Go Top

  • GetWindowsVersion - Obtains which version of Windows is running the application.
  •       C/C++ - extern "C" LPTSTR PASCAL EXPORT GetWindowsVersion(BOOL bShowNumbers=FALSE);
          VFP/Basic - declare string GetWindowsVersion in 'Flibrary.dll' integer

    Parameters:
    bShowNumbers = if set to true the the major.minor version along with 'build #' of windows will follow the name returned.

    Return Value:
    A empty string if failed otherwise
    WIN32
    WIN9X
    WINNT
    WIN2K
    WINXP
    WIN2003
    VISTA
    SEVEN

    Example:
    strReturn=GetWindowsVersion(1);
    strReturn=='SEVEN 6.1 build 7600'

    Go Top

  • FormatDrive - Brings up the system format a drive dialog box.
  •       C/C++ - extern "C" BOOL PASCAL EXPORT FormatDrive(int iDrive);
          VFP/Basic - declare short FormatDrive in "FLibrary.dll" integer

    Parameters:
    iDrive - The target drive to format.
    0 = A
    1 = B
    2 = C
    ...

    Return Value:
    Returns a 0 if fails, or a value if succeeds.

    Example:
    iReturn=FormatDrive(0);

    Go Top

  • RemoveFile - changes a files attributes to normal and deletes that file from disk.
  •       C/C++ - extern "C" BOOL PASCAL EXPORT RemoveFile(char cfile[],BOOL bConfirm=TRUE);
          VFP/Basic - declare short RemoveFile in "FLibrary.dll" string, short

    Parameters:
    cFile - The path and file to delete.
    bConfirm - Display a confirmation box if TRUE. Just delete the file with no user interaction if FALSE.

    Return Value:
    Returns a 0 if fails, or a value if succeeds.

    Example:
    bReturn=RemoveFile("c:\\temp.bak");

    Go Top

  • ExecuteSoftware - Execute a program in the programs own name space.
  •       C/C++ - extern "C" LPTSTR PASCAL EXPORT ExecuteSoftware(char cProgram[],char cParam[],BOOL bAdmin=FALSE,DWORD dwModal=0);
          VFP/Basic - declare string ExecuteSoftware in "FLibrary.dll" string, string,integer,integer

    Parameters:
    cProgram - The path and file of a program to execute.
    cParam - Parameters include with the program to execute.
    bAdmin - Set TRUE (1) to run as with administrtor rights.
    dwModal - Timeout value in milliseconds to execute the cProgram application in a mdoal state before closing the cProgram application and returning to the calling application . A value of 0 runs the cProgram application in its own names space leaving the cProgram application open and returning a value from this function immediatly.

    Return Value:
    If the program is executed the return value will be the cProgram parameter. If the function fails the return value will be a string ('starting with 'Failed') describing the failure. If the function times out while executing in a modal state the returned failure string will be preceded with 'Process'.

    Example:
    strProgram=ExecuteSoftware("iexplore.exe","www.squaredtechnologies.com",FALSE,0);

    Go Top

  • FTP - A one liner File Transfer Protocol.
  •       C/C++ - extern "C" int PASCAL EXPORT FTP(char IpAddress[],char Source[],char Destination[], char User[],char Password[],int iCommand,BOOL bProgBar=FALSE);
          VFP/Basic - declare short FTP in "Flibrary.dll" string,string,string,string,string,integer,integer

    Parameters:
    IpAddress - the destination server to login to.
    Source - file for copying.
    Destination - file for creating from Source.
    User - user name to login to server.
    Password - password for login to server.
    iCommand
          0 for Put
          1 for Get.
          2 test if file exists
          3 delete file
          +254 to turn off user escape ability (ex 0+254 meains put with no escape, 1+254 means get with no escape, etc) bProgBar - 0 false (default) or 1 show.

    Return Value:
    returns greater than 0 if success
    1 function returned success
    0 function returned false
    -1 bad function paramter
    -2 internet exception
    -3 user excaped
    -4 failed to find source
    -5 failed to open dest
    -6 target exists already
    -7 failed to open source

    Example:
    bReturn=ftp("ftp.squaredtechnologies.com","c:\\program.dat","program.dat","USER","USERPASSWORD",0,1);

    Go Top

  • Host - Performs a DNS lookup on an IP address.
  •       C/C++ - extern "C" LPTSTR PASCAL EXPORT Host(char cResolve[]);
          VFP/Basic - declare string Host in "FLibrary.dll" string

    Parameters:
    cResolve - IPv4 address to resolve

    Return Value:
    returns "ERROR: "+mesage if fails
    returns resloved hostname if success

    Example:
    strHostName=Host("72.240.20.7");

    Go Top

  • ExtractIconToFile - Extracts an Icon to the buffer and then saves that buffer to an output file.
  •       C/C++ - extern "C" LPTSTR PASCAL EXPORT ExtractIconToFile(char cSourceFile[],char cDestFile[] = _T("") ,int iIconResource =0,BOOL bReplace=FALSE,int iIconSize=0);
          VFP/Basic - DECLARE string ExtractIconToFile IN 'Flibrary.dll' string,string,integer,integer,integer

    Parameters:
    cSourceFile - The file to extract the icon from.
    cDestFile - Destination icon file. If this option is left empty then the default will be the users temp folder.
    iIconResource - If the source file contains more than one icon the set this to the icon resource value.
    bReplace - Set to FALSE if you want to just use the existing file as the return value, or if the value is TRUE to delete an existing file and create a new file.
    iIconSize - if extracting the icon from a file set 0 for default icon, 1 for small icon, 2 for largeicon, 3 for shell icon size else if extracting from a resource (iIconResource > 0) set to dimension of icon (Ex 48x48 icon this value was set to 48).

    Return Value:
    returns "ERROR: "+mesage if fails
    returns path and icon file if succeeds

    Example:
    strMyIconPathAndFile = ExtractIconToFile(strSystem32Path + "shell32.dll",strTempPath+"MyComputer.ico",16,1,0);

    Go Top

  • HwndToImage - Copys the screen shot to the clipboard then to a file.
  •       C/C++ - extern "C" LPTSTR PASCAL EXPORT HwndToImage(HWND hWnd,char cDestFile[]);
          VFP/Basic - DECLARE string HwndToImage IN 'Flibrary.dll' integer,string

    Parameters:
    hWnd - Handle to the window to take a picture of.
    cDestFile - Destination file. bmp by default or by file extension (jpg,jpeg,png,tif,tiff).

    Return Value:
    returns "ERROR: "+mesage if fails
    returns path and file if succeeds

    Example:
    strMyScreenshotPathAndFile = HwndToImage(pWnd->hWnd,strTempPath+"MyComputer.jpg");

    Go Top

  • Implementing DLL Function Calls - The following examples illustrate how to use dynamic link library function calls in your programs by demonstrating the 'waitbox' function call.
    C/C++

    yourmain.h

    yourmain.cpp

    VFP/Basic

    Go Top

    Home