' ============================================ ' Work.Ink Offer SDK - Visual Basic .NET Example ' ============================================ ' Build: vbc Example.vb ' Run: Place work-ink-offer-sdk.dll in same folder Imports System Imports System.Runtime.InteropServices Module WorkInkOfferSDK ' Import the native DLL function Public Function runOffer(ByVal pubId As Integer) As Integer End Function End Module Module Program Sub Main() Console.WriteLine("Work.Ink Offer SDK - VB.NET Example") Console.WriteLine("====================================") Console.WriteLine() ' Replace 1 with your actual publisher ID Dim publisherId As Integer = 1 Console.WriteLine($"Showing offer for publisher ID: {publisherId}") Try Dim result As Integer = runOffer(publisherId) ' Handle the result Console.WriteLine($"{Environment.NewLine}Result: {result}") Select Case result Case 1 Console.WriteLine("✅ SUCCESS: User accepted and installer launched!") ' Continue with your application... Case 0 Console.WriteLine("⚠️ PARTIAL: Installer launch failed, browser opened") ' Still count as acceptance, continue... Case -1 Console.WriteLine("❌ DECLINED: User declined the offer") ' User declined, continue with your app... Case -2 Console.WriteLine("🚪 CLOSED: User closed the window") ' User closed without decision... Case -3 Console.WriteLine("🌐 API ERROR: Could not fetch offers") ' Network error or no offers available... Case Else Console.WriteLine("❓ UNKNOWN: Unexpected result") End Select Console.WriteLine($"{Environment.NewLine}Continuing with application...") ' Your application logic here Catch ex As DllNotFoundException Console.WriteLine("ERROR: work-ink-offer-sdk.dll not found!") Console.WriteLine("Make sure the DLL is in the same folder as your executable.") Catch ex As Exception Console.WriteLine($"ERROR: {ex.Message}") End Try End Sub End Module