First of all, thank you for your answers.
I proceeded as follows:
1. I downloaded a c# interop form toolkit and wrote a simple dll called nettest.dll.
2. I registered this dll with regasm "nettest.dll" /codebase.
3. I generated an OleObject (new -> standard class) and named it n_oleobject_test
Sourcecode (PowerBuilder):
n_oleobject_test lnv_test
lnv_test = create n_oleobject_test
lnv_test.Connecttonewobject("NetTest.NetTest")
Messagebox("your default printer is?",String(lnv_test.of_getPrinter() ))
lnv_test.Disconnectobject( )
Destroy lnv_test
Sourcecode (visual studio):
public String of_getPrinter()
{
//get default printername
PrinterSettings ps = new PrinterSettings();
return ps.PrinterName ;
}
This works fine, but is this the right way at this time until PowerBuilder 2019 R2 will be released?
My preferred example of not-already-present-but-often-relevant is a temperature conversion NVO to mix and match scales like Celsius, Fahrenheit, Kelvin, and possibly more scales.