// ============================================ // Work.Ink Offer SDK - C Example // ============================================ // Build: cl example_c.c work-ink-offer-sdk-import.lib // Run: Place work-ink-offer-sdk.dll in same folder #include "work-ink-offer-sdk.h" #include int main() { printf("Work.Ink Offer SDK - C Example\n"); printf("================================\n\n"); // Replace 1 with your actual publisher ID int publisherId = 1; printf("Showing offer for publisher ID: %d\n", publisherId); int result = runOffer(publisherId); // Handle the result printf("\nResult: %d\n", result); switch (result) { case 1: printf("✅ SUCCESS: User accepted and installer launched!\n"); // Continue with your application... break; case 0: printf("⚠️ PARTIAL: Installer launch failed, browser opened\n"); // Still count as acceptance, continue... break; case -1: printf("❌ DECLINED: User declined the offer\n"); // User declined, continue with your app... break; case -2: printf("🚪 CLOSED: User closed the window\n"); // User closed without decision... break; case -3: printf("🌐 API ERROR: Could not fetch offers\n"); // Network error or no offers available... break; default: printf("❓ UNKNOWN: Unexpected result\n"); break; } return 0; }