Author Topic: How to call O2 dll from C#  (Read 1948 times)

0 Members and 1 Guest are viewing this topic.

chrisc

  • Guest
How to call O2 dll from C#
« on: January 26, 2018, 08:21:02 AM »
I have C# programs that can call powerbasic dll  and that they work very well.

I want to know how C# can call oxygen dll , any sample codes please?
Regards
Chris

Charles Pegge

  • Guest
Re: How to call O2 dll from C#
« Reply #1 on: January 26, 2018, 10:32:19 AM »
OxygenBasic produces standard dlls.

Here is a demo 32bit standalone dll to try:

Code: [Select]
% dll
% filename "t.dll"
uses rtl32

function greet(s as char) as long, export
print "hello "+s
return 42
end function

[attachment deleted by admin]

chrisc

  • Guest
Re: How to call O2 dll from C#
« Reply #2 on: January 26, 2018, 06:03:18 PM »
Thanxx Charles

Do you have a C# code to make the calling ?


JRS

  • Guest
Re: How to call O2 dll from C#
« Reply #3 on: January 26, 2018, 10:26:21 PM »
Quote
Do you have a C# code to make the calling ?

Would you like Charles to make dinner for you as well?  ::)

Aurel

  • Guest
Re: How to call O2 dll from C#
« Reply #4 on: January 26, 2018, 10:42:53 PM »
easy johnny...easy....  ;D


@chris
just found some code in C# or VB.net which call dll.s
something like this:
http://www.dreamincode.net/forums/topic/121314-creating-a-dll-and-using-it-in-your-application/

Charles Pegge

  • Guest
Re: How to call O2 dll from C#
« Reply #5 on: January 27, 2018, 02:16:02 AM »
I have never used .net but this enquiry might help:

https://stackoverflow.com/questions/16332701/how-to-call-c-dll-in-c-sharp

OxygenBasic does not mangle DLL function names, and does not alter the case of the name,  unless you specify an alias to use.

chrisc

  • Guest
Re: How to call O2 dll from C#
« Reply #6 on: April 13, 2018, 03:56:22 PM »