Click here to Skip to main content
15,915,328 members
Home / Discussions / C#
   

C#

 
QuestionHow can I make a dockable window (like Solution explorer in .NET) Pin
signbit24-Aug-05 1:08
signbit24-Aug-05 1:08 
AnswerRe: How can I make a dockable window (like Solution explorer in .NET) Pin
AETaylor24-Aug-05 10:42
AETaylor24-Aug-05 10:42 
GeneralRe: How can I make a dockable window (like Solution explorer in .NET) Pin
signbit25-Aug-05 21:35
signbit25-Aug-05 21:35 
Generallinkbuttons and textboxes Pin
carabrenna24-Aug-05 0:20
carabrenna24-Aug-05 0:20 
GeneralRe: linkbuttons and textboxes Pin
Guffa24-Aug-05 0:41
Guffa24-Aug-05 0:41 
GeneralListing all machines in the network Pin
AnsGe23-Aug-05 23:06
AnsGe23-Aug-05 23:06 
GeneralRe: Listing all machines in the network Pin
zagzagzag24-Aug-05 5:19
zagzagzag24-Aug-05 5:19 
GeneralC#, Fortran and dll's Pin
Kash23-Aug-05 22:55
Kash23-Aug-05 22:55 
Hi,
I am trying to call a Fortran dll in my simple C# example.
My Fortran bit looks like this:

'code'
subroutine sumit(x,i,r)
real , intent(in) :: x(i)
integer , intent(in) :: i
real , intent(out) :: r
!
!DEC$ATTRIBUTES STDCALL, DECORATE dllexport :: sumit
!DEC$ATTRIBUTES STDCALL, DECORATE, ALIAS:'sumit' :: sumit
!
integer :: j
r=0.0
do j=1,i
r=r+x(j)
end do
end subroutine sumit
'code'

and my C# bit looks like:

'code'
using System;
using System.Text;
using System.Runtime.InteropServices;

namespace ConsoleApplication1
{

class MyClass
{
[DllImport("Dll1.dll", EntryPoint="sumit")]
public static extern double sumit(double x,int i,double r);

public static void Main()
{
sumit(10.0,10,0.0);
}
}
}
'code'

But I get an exception error System.NullReferenceException.
I also tried to add reference but I get an error saying that the extension must be of type .dll but it is already.
Can anyone help.
Kash

GeneralRe: C#, Fortran and dll's Pin
leppie24-Aug-05 1:09
leppie24-Aug-05 1:09 
Generalhelp me please i really cant solve it Pin
nidhelp23-Aug-05 21:50
nidhelp23-Aug-05 21:50 
GeneralRe: help me please i really cant solve it Pin
Colin Angus Mackay23-Aug-05 22:39
Colin Angus Mackay23-Aug-05 22:39 
GeneralRe: help me please i really cant solve it Pin
nidhelp23-Aug-05 23:07
nidhelp23-Aug-05 23:07 
GeneralRe: help me please i really cant solve it Pin
Colin Angus Mackay23-Aug-05 23:15
Colin Angus Mackay23-Aug-05 23:15 
GeneralRe: help me please i really cant solve it Pin
nidhelp23-Aug-05 23:33
nidhelp23-Aug-05 23:33 
GeneralRe: help me please i really cant solve it Pin
Colin Angus Mackay23-Aug-05 23:52
Colin Angus Mackay23-Aug-05 23:52 
GeneralRe: help me please i really cant solve it Pin
nidhelp24-Aug-05 6:12
nidhelp24-Aug-05 6:12 
GeneralRe: help me please i really cant solve it Pin
Colin Angus Mackay24-Aug-05 13:13
Colin Angus Mackay24-Aug-05 13:13 
GeneralRe: help me please i really cant solve it Pin
tatchung24-Aug-05 15:23
tatchung24-Aug-05 15:23 
GeneralRe: help me please i really cant solve it Pin
tatchung24-Aug-05 16:35
tatchung24-Aug-05 16:35 
GeneralRe: help me please i really cant solve it Pin
nidhelp24-Aug-05 20:24
nidhelp24-Aug-05 20:24 
GeneralRe: help me please i really cant solve it Pin
nidhelp24-Aug-05 23:39
nidhelp24-Aug-05 23:39 
AnswerRe: help me please i really cant solve it Pin
Muammar©11-Nov-06 21:18
Muammar©11-Nov-06 21:18 
GeneralListboxes to datasets Pin
towneytowney23-Aug-05 21:47
towneytowney23-Aug-05 21:47 
GeneralListboxes to datasets Pin
towneytowney23-Aug-05 21:46
towneytowney23-Aug-05 21:46 
GeneralSystem.NullReferenceException Pin
oneyard23-Aug-05 21:34
oneyard23-Aug-05 21:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.