APLDN Forum Index APLDN
APL2000 Developer Network Forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Calling a VisualAPL dll by other .NET code

 
Post new topic   Reply to topic    APLDN Forum Index -> VisualAPL
View previous topic :: View next topic  
Author Message
izhelezny



Joined: 26 Jul 2010
Posts: 2

PostPosted: Tue Jul 27, 2010 14:07 UTC    Post subject: Calling a VisualAPL dll by other .NET code Reply with quote

== reposting from an earlier private message ==

To VisualAPL tech support,
I am trying to do a simple proof of concept with VisualAPL. Following a COM example I was able to make the program below work as a COM object, calling it from APL+Win and VBA. I need to make the same code work calling it as a dll either from C# or VB .NET. Is there an online example of a simple console .NET C# or VB program calling a VisualAPL dll?

#region Using directives

using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices

#endregion

namespace APLPOC1{
[Guid("E7BD7ACF-770D-4747-8810-6A61A4DFEC2D")]
[ClassInterface(ClassInterfaceType.AutoDual)]
[ProgId("APLPOC1")]
public class Circle{
public function double Area(double Radius)
{return ○1×Radius*2}
public function Area_NoStringType(Radius)
{return ○1×Radius*2}
}
}
Back to top
View user's profile Send private message
joe_blaze



Joined: 11 Feb 2007
Posts: 230
Location: Box 361 Brielle, NJ 08730-0361

PostPosted: Wed Jul 28, 2010 1:32 UTC    Post subject: Changing the default Class1 class name Reply with quote

Attached is your project modified so that it now operates properly. Basically I manually modified the Circle class name back to Class1 and re-built the solution. In addition I added a C# console project to the VisualAPL solution to server as an illustrative test harness. This console project shows how the VisualAPL .Net assembly can be used by C# or any other .Net language.

To change the default Class1 class name to Circle, follow the instruction at: http://forum.apl2000.com/viewtopic.php?t=453

I have also attached a pdf-format document which shows various elements of the working project.

Keep those questions coming!!!



APLPOC1_workingNow.pdf
 Description:
A few print screens of elements of the working example

Download
 Filename:  APLPOC1_workingNow.pdf
 Filesize:  544.61 KB
 Downloaded:  8 Time(s)


APLPOC1.zip
 Description:
The working example.

Download
 Filename:  APLPOC1.zip
 Filesize:  1.19 MB
 Downloaded:  8 Time(s)


_________________
Bringing APL into the .Net mainstream! Ask me about the VisualAPL application software development environment that is fully integrated with Microsoft Visual Studio.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
izhelezny



Joined: 26 Jul 2010
Posts: 2

PostPosted: Wed Jul 28, 2010 2:18 UTC    Post subject: Reply with quote

Thank you!

I actually ended up writing code in VB.NET, and now have yours in C#.NET, which will complete my proof of concept.
Back to top
View user's profile Send private message
joe_blaze



Joined: 11 Feb 2007
Posts: 230
Location: Box 361 Brielle, NJ 08730-0361

PostPosted: Wed Jul 28, 2010 3:44 UTC    Post subject: VB.Net code accessing VisualAPL .Net assembly Reply with quote

When time permits, please reply with an attachment of your VB.Net code illustrating this. It would be a good example for the forum.
_________________
Bringing APL into the .Net mainstream! Ask me about the VisualAPL application software development environment that is fully integrated with Microsoft Visual Studio.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    APLDN Forum Index -> VisualAPL All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group