Copc Dll Direct
It exports a few functions that could be used by a CTI or reporting system. #ifndef COPCDLL_H #define COPCDLL_H #ifdef BUILDING_COPC_DLL #define COPCDLL_API __declspec(dllexport) #else #define COPCDLL_API __declspec(dllimport) #endif
#ifdef __cplusplus extern "C" #endif
cl /LD /DBUILDING_COPC_DLL copc_dll.c /FeCOPC.dll COPC DLL
#endif
int __stdcall CopcLogEnd(const char* interactionId, int abandoned) for (int i = 0; i < activeCount; i++) if (strcmp(activeInteractions[i].interactionId, interactionId) == 0) time_t now = time(NULL); double handleTime = difftime(now, activeInteractions[i].startTime); // In real COPC: update handle time, service level stats char buf[256]; sprintf(buf, "End %s, abandoned=%d, handle=%.2f sec", interactionId, abandoned, handleTime); logEvent(buf); // remove by swapping with last activeInteractions[i] = activeInteractions[--activeCount]; return 0; It exports a few functions that could be
int __stdcall CopcLogStart(const char* interactionId) if (!interactionId i++) if (strcmp(activeInteractions[i].interactionId
// Cleanup resources COPCDLL_API void __stdcall CopcShutdown(void);