///////////////////////////////////////////////////////////////////////////// // // File : gicscaldll.h // // Author : Davon Cannon // // Date : May 20, 1999 // // Purpose : Contains functions in gicscal.dll // ///////////////////////////////////////////////////////////////////////////// #ifndef __GICSCALDLL_H__ #define __GICSCALDLL_H__ //extern BOOL LoadCalProc(char* szProcName, FARPROC* proc); // You can use something similar to the following function // to load the DLL into the programming proccess. // Function below should work with VC 4.2, 5.0, and 6.0 HINSTANCE LoadCalProc(char* szProcName, FARPROC* proc) { HINSTANCE hInst; // Load ICS DLL hInst = ::GetModuleHandle("gicscal.dll"); if (NULL == hInst) hInst = ::LoadLibrary("gicscal.dll"); if (hInst) { (*proc) = ::GetProcAddress(hInst, szProcName); if ((*proc) == NULL) { ::FreeLibrary(hInst); hInst = NULL; } } else { AfxMessageBox("gicscal.dll is missing"); } return hInst; //(((*proc) != NULL) && (hInst != NULL)); } /********************************************************** // An example using the function above to load the DLL. // Function variable BOOL (CALLBACK* proc)(char, char*); // Load the DLL and get pointer to a function in the DLL if (LoadCalProc("SetOccasionName", (FARPROC*) &proc)) { // Call the function with parameters (*proc)('I', "Caller Note"); } */ /* ///////////////////////////////////////////////////////////////////////////// // Method : SaveOccasion // Purpose : Saves an occasion to the calendar database // Parameter(s) : [in] COleDateTime oleDateTime - The time for the occasion // [in] char* szMessage - The occasion message. // [in] int nNotifyFlag - The user wants to be notified of occasion // [in] char cOccasion - The character id of the occasion // [in] int p_nAttrib - Occasion attributes // IC_IGNORE_TIME - Does not use the time passed. // [in] char* p_szUserName - The user to add the occasion to. // Returns : TRUE if successful ///////////////////////////////////////////////////////////////////////////// extern "C" //__declspec(dllexport) BOOL __stdcall ICSaveOccasion(COleDateTime oleDateTime, const char* szMessage, int nNotifyFlag, char cOccasion, int p_nAttrib, const char* p_szUserName = NULL); ///////////////////////////////////////////////////////////////////////////// // Method : SaveOccasionEx // Purpose : Saves an occasion to the calendar database // Parameter(s) : [in] int p_nYear // [in] int p_nMonth // [in] int p_nDay // [in] int p_nHour // [in] int p_nMinute // [in] char* szMessage - The occasion message. // [in] int nNotifyFlag - The user wants to be notified of occasion // [in] char cOccasion - The character id of the occasion // [in] int p_nAttribs - Occasion attributes // IC_IGNORE_TIME - Does not use the time passed. // [in] char* p_szUserName - The user to add the occasion to. // Default is NULL (default user). // Returns : BOOL ///////////////////////////////////////////////////////////////////////////// extern "C" //__declspec(dllexport) BOOL __stdcall ICSaveOccasionEx(int p_nYear, int p_nMonth, int p_nDay, int p_nHour, int p_nMinute, const char* p_szMessage, int p_nNotifyFlag, char p_cOccasion, int p_nAttribs, const char* p_szUserName = NULL); ///////////////////////////////////////////////////////////////////////////// // Method : GetUserPath // Purpose : Retrieves the database path for the selected user. // Parameter(s) : [in] char* szUserName - the user to retrieve the path for. // [out] char* szUserPath - the selected user's path // [in] int nSize - the size of the szUserPath string // Returns : True if successful ///////////////////////////////////////////////////////////////////////////// extern "C" //__declspec(dllexport) BOOL __stdcall ICGetUserPath(const char* p_szUserName, char* p_szUserPath, int p_nSize); ///////////////////////////////////////////////////////////////////////////// // Method : GetProgramPath // Purpose : Retreives the program path for IDEAL Calendar. // Parameter(s) : [out] char* szProgramPath - returns the program path // [in] int nSize - the size of the program path char array // Returns : True if successful ///////////////////////////////////////////////////////////////////////////// extern "C" //__declspec(dllexport) BOOL __stdcall ICGetProgramPath(char* pszProgramPath, int nSize); ///////////////////////////////////////////////////////////////////////////// // Method : SetOccasionName // Purpose : Sets the occasion name and character id // Parameter(s) : [in] char p_cOccasion - the occasion character // [in] char* p_szOccasion - The occasion name // Returns : TRUE if successful ///////////////////////////////////////////////////////////////////////////// extern "C" //__declspec(dllexport) BOOL __stdcall ICSetOccasionName(char p_cOccasion, const char* p_szOccasion); ///////////////////////////////////////////////////////////////////////////// // Method : DeleteOccasionName // Purpose : Deletes the occasion name // Parameter(s) : [in] char cOccasion // Returns : BOOL ///////////////////////////////////////////////////////////////////////////// extern "C" //__declspec(dllexport) BOOL __stdcall ICDeleteOccasionName(char p_cOccasion); ///////////////////////////////////////////////////////////////////////////// // Method : GetOccasionName // Purpose : // Parameter(s) : [in] char cOccasion - The occasion character // [out] char* pszOccasion - The occasion name // [in] int nOccSize - The size of the pszOccasion string // Returns : TRUE if successful ///////////////////////////////////////////////////////////////////////////// extern "C" //__declspec(dllexport) BOOL __stdcall ICGetOccasionName(char cOccasion, char* pszOccasion, int nOccSize); ///////////////////////////////////////////////////////////////////////////// // Method : GetCurrentUser // Purpose : Gets the current user of IDEAL Calendar. // Parameter(s) : [out] char* pszUser - returns current user name // [in] nSize - the size of the pszUser array. // Returns : TRUE (1) if successful ///////////////////////////////////////////////////////////////////////////// extern "C" //__declspec(dllexport) BOOL __stdcall ICGetCurrentUser(char* pszUserName, int nSize); ///////////////////////////////////////////////////////////////////////////// // Method : AddProgram // Purpose : Adds a program menu item to the calendar menu // Parameter(s) : [in] const char* szName - The display name for the program // [in] const char* szPath - program path // Returns : BOOL ///////////////////////////////////////////////////////////////////////////// extern "C" //__declspec(dllexport) BOOL __stdcall ICAddProgram(const char* szName, const char* szPath); ///////////////////////////////////////////////////////////////////////////// // Method : DeletesProgram // Purpose : Deletes a program menu item from the calendar menu // Parameter(s) : [in] const char* szName - The display name for the program // Returns : BOOL ///////////////////////////////////////////////////////////////////////////// extern "C" //__declspec(dllexport) BOOL __stdcall ICDeleteProgram(const char* szName); ///////////////////////////////////////////////////////////////////////////// // Method : AddTool // Purpose : Adds a tool menu item to the calendar menu // Parameter(s) : const char* szName - The display name for the program // const char* szPath - program path // Returns : BOOL ///////////////////////////////////////////////////////////////////////////// extern "C" //__declspec(dllexport) BOOL __stdcall ICAddTool(const char* szName, const char* szPath); */ #endif //__GICSCALDLL_H__