replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - .NET Compact Framework support
forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

.NET Compact Framework support

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
SteveC



Joined: 27 Mar 2009
Posts: 1

PostPosted: Fri Mar 27, 2009 7:18 pm    Post subject: .NET Compact Framework support Reply with quote

I am looking for a way to access a Fortran DLL from a Windows Mobile app using the .NET Compact Framework. Is there a way to do this with FTN95?

I am able to compile and access the Fortran DLL using the .NET Framework on a standard Windows machine. But on a mobile device I receive the following error:

Can't find an Entry Point 'HELLO' in a PInvoke DLL 'FortranHelloWorldDLL.DLL'

Below is the code from a Fortran function that outputs a dumb.txt file with the "Hello World" text in it.

FUNCTION HELLO
ASSEMBLY_INTERFACE (name="HELLO")
IMPLICIT REAL*8 (A-H,O-Z)
IMPLICIT INTEGER*2 (I-N)
OPEN (1,FILE='DUMB.TXT')
WRITE (1,2)
2 FORMAT (' Hello World')
CLOSE (1)
RETURN
END

Here is the C# code I used to access it from a Windows Mobile form:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;

namespace PPC2003FortranDLL
{
public partial class Form1 : Form
{
[DllImport("FortranHelloDLL.DLL", EntryPoint="HELLO")]
public static extern void HELLO();

public Form1()
{
InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)
{
HELLO();
}
}
}

Am I missing anything?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
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


Powered by phpBB © 2001, 2005 phpBB Group