L5 Software Code Libraries -w32Tools- Page


Library Name   w32Tools
Description Routines and classes for building MS Windows applications
Status in production, code in use in released products
Header Files
CW32Reg.h       Windows Registry accessor class
DirPickr.h Directory picker dialog class
L5WnInet.h WinInet support API
StatLink.h class CStaticLink implements a static control that's a hyperlink to any file on your desktop or the Web. When clicked, it opens the file or URL.
w32Tools.h External declarations for routines using w32Tools.lib services
Functions
BOOL        w32CheckedShellExecute  // tests the result, reports errors
            (
                HWND hwnd,              // window handle of the parent window
                LPCTSTR lpOperation,    // operation to perform
                LPCTSTR lpFile,         // string specifying file or folder
                LPCTSTR lpParameters,   // parameters to pass to application
                LPCTSTR lpDirectory,    // default directory
                INT nShowCmd            // how the new app. is to be shown
            );
BOOL        w32ConfirmBox(const char* szMsg);
void        w32ErrorBox(const char* szMsg);
const char* w32ErrorText(int nErr);
void        w32GetProgramVersionNumber(char* szModule,char szVerNum[24]);
char*       w32GetSysError(char* szBuffer,int nMaxBuffer);
char*       w32GetSysError(LONG lErr,char* szBuffer,int nMaxBuffer);
void        w32GetVersionCopyright(char* szModule,char* buf,int& cnt);
const char* w32GetVersionKey
            (
                const char* VI,         // version information block
                const char* szPrefix,   // prefix "\StringFileInfo\LanguageID"
                const char* szItem      // the item to return
            );
BOOL        w32IsErrorFatal(int nError);
BOOL        w32IsErrorFatal(void);
int         w32LastError(void);
const char* w32LastErrorText(void);
BOOL        w32LoadTextFile(CString& csBfr,const char* szFile);
void        w32NotImplemented(const char* szWhat,BOOL bReleaseBeep=TRUE);
void        w32ProgramMessage(const char* szMsg,UINT uIcon=0);
void        w32RegistryErrorAbort(void);
void        w32ReportMemoryError(const char* szWhat,size_t nBytes);
void        w32RunMsgPump(void);
BOOL        w32SetDesktopWallpaper(const char* szBMPfilename);
void        w32TakeNap(DWORD dwMilliseconds,DWORD dwSegLength=50);
void        w32WarningBox(const char* szMsg);
**
******************************************************************************
**
** in L5WnInet.h
**
******************************************************************************
**
DWORD       w32GetWinInetStatCode(HINTERNET hStat);
const char* w32GetWinInetStatText(DWORD dwStatus);
const char* w32InetStatusText(DWORD dwStatus);
BOOL        w32IsWinInetError(DWORD dwErr);
const char* w32WinInetErrText(DWORD dwErr);
**
******************************************************************************
**
** in CW32Reg.h
**
******************************************************************************
**
class Cw32Registry : public CL5Initializer
{
    static CSTRC szData;    // "Data"    // private strings used as initializers
    static CSTRC szMT;      // empty string
public:
    // --- construction/destruction -------------------------------------------
                    Cw32Registry            // constructor
                    (
                        const char* szKey=szMT,     // Registry key path
                        const char* szClass=szData  // Registry key class name
                    );
                    ~Cw32Registry(void);    // destructor
    // --- public methods -----------------------------------------------------
    BOOL            Class                   // set class name, fails if open
                    (
                        const char* szClass // class name for this instance
                    );
    BOOL            Close(void);            // close key if open
    BOOL            CreateOpen              // open key, create if not exist
                    (
                        BOOL* pbNew         // TRUE on return if created
                    );
    BOOL            DeleteOneValue          // open key, del.value, close key
                    (
                        const char* szVal   // name of the value to delete
                    );
    BOOL            DeleteValue             // delete a value from an open key
                    (
                        const char* szVal   // name of the value to delete
                    );
    BOOL            GetOneValue             // open key, get value, close key
                    (
                        const char* szVal,  // name of the value to write
                        void* pData,        // where to return data
                        DWORD* pdwSize      // size of the data buffer
                    );
    BOOL            GetValue                // get one value from an open key
                    (
                        const char* szVal,  // name of the value to write
                        void* pData,        // where to return data
                        DWORD* pdwSize      // size of the data buffer
                    );
    BOOL            KeyName                 // set key name, fails if open
                    (
                        const char* szKey   // key name for this instance
                    );
    int             LastError(void);        // returns the last error code
    char*           LastErrorText           // returns xlated last error value
                    (
                        char* szErr,        // where to write the error text
                        DWORD dwSize        // size of the error text buffer
                    );
    BOOL            Open(void);             // open an existing key
    BOOL            SetOneValue             // open key, set value, close key
                    (
                        const char* szVal,  // name of the value to write
                        DWORD dwType,       // data type
                        void* pData,        // data to be written
                        DWORD dwSize        // size of the data buffer
                    );
    BOOL            SetValue                // set one value in an open key
                    (
                        const char* szVal,  // name of the value to write
                        DWORD dwType,       // data type
                        void* pData,        // data to be written
                        DWORD dwSize        // size of the data buffer
                    );
    // --- inline method declarations -----------------------------------------
    inline
    BOOL            IsValid(void)
                    { return(m_bValid); }
    inline
    const char*     Class(void)
                    { return(m_szClass); }
    inline
    const char*     KeyName(void)
                    { return(m_szKey); }
protected:
    // --- protected data -----------------------------------------------------
    char*            m_szClass; // e.g., "Data", Registry class, value name
    char*            m_szKey;   // e.g., "SOFTWARE\\vendor\\progname\\Settings"
};
		

For more information, click here, or send email to codelibs@L5Software.com with "Library::w32Tools inquiry" in the subject line.

 

L5 Software Code Libraries Home Page
L5 Software Development


All sales of these products help finance the operations of The L5 Development Group,
a private enterprise space exploration and development effort.
Visit The L5 Development Group for more info about space colonies and space business.

L5 Software Code Libraries -w32Tools- Page / Webmaster / Last modified December 8, 2002 @ 10:13 am
Copyright © 2017 by L5 Software Development. All rights reserved.

Hosted by FKEinternet