Question 1: is it possible to add conditional compilation?
Question 2: is it possible to add a delegate?
The code I want to generate is:
Private Const LPC_SetWindowCaption = "setwindowcaption"
#if WEBASSEMBLY then
Public Sub SetWindowCaptionDelegate(caption as String)
Dim args As new RemObjects.Elements.RTL.Dictionary(Of String, String)
args.add("caption", caption)
LPC_Call.invoke(LPC_SetWindowCaption, args)
End Sub
#else
Public Delegate Sub SetWindowCaptionDelegate(caption as String)
Public SetWindowCaption as SetWindowCaptionDelegate
Public Sub SetWindowCaption_Dispatch(func As String, args As RemObjects.Elements.RTL.Dictionary(Of String, String), ByRef result As String) Handles Me.Dispatch
If func = LPC_SetWindowCaption Then
SetWindowCaption.Invoke(args("caption"))
result = LPC_Ok
End If
End Sub
#end if