Copc: Dll

// Log an interaction start (call, chat, etc.) COPCDLL_API int __stdcall CopcLogStart(const char* interactionId);

cl /LD /DBUILDING_COPC_DLL copc_dll.c /FeCOPC.dll COPC DLL

auto init = (COPCDLL_API int(__stdcall*)(const char*, const char*))GetProcAddress(dll, "CopcInit"); auto start = (COPCDLL_API int(__stdcall*)(const char*))GetProcAddress(dll, "CopcLogStart"); auto end = (COPCDLL_API int(__stdcall*)(const char*, int))GetProcAddress(dll, "CopcLogEnd"); auto sl = (COPCDLL_API double(__stdcall*)(const char*))GetProcAddress(dll, "CopcGetServiceLevel"); // Log an interaction start (call, chat, etc

#endif

void __stdcall CopcShutdown(void) logEvent("CopcShutdown"); activeCount = 0; // Log an interaction start (call

if(init && start && end && sl) init("Agent007", "PremiumSupport"); start("INT-001"); Sleep(2000); end("INT-001", 0); printf("Service Level: %.1f%%\n", sl("PremiumSupport"));

int main() HMODULE dll = LoadLibraryA("COPC.dll"); if (!dll) return 1;