Click here to Skip to main content
15,918,211 members
Home / Discussions / C#
   

C#

 
AnswerRe: c++ codeparser Pin
Alomgir Miah31-Aug-05 6:59
Alomgir Miah31-Aug-05 6:59 
AnswerRe: c++ codeparser Pin
S. Senthil Kumar31-Aug-05 7:48
S. Senthil Kumar31-Aug-05 7:48 
AnswerRe: c++ codeparser Pin
VickyC#3-Sep-05 10:29
VickyC#3-Sep-05 10:29 
QuestionAdd reference problem ? Pin
Kash31-Aug-05 4:41
Kash31-Aug-05 4:41 
AnswerRe: Add reference problem ? Pin
Alomgir Miah31-Aug-05 7:02
Alomgir Miah31-Aug-05 7:02 
GeneralRe: Add reference problem ? Pin
Kash31-Aug-05 7:12
Kash31-Aug-05 7:12 
GeneralRe: Add reference problem ? Pin
Dave Kreskowiak31-Aug-05 10:08
mveDave Kreskowiak31-Aug-05 10:08 
GeneralRe: Add reference problem ? Pin
Kash31-Aug-05 23:34
Kash31-Aug-05 23:34 
The actual dll is written in Fortran and I performaed a test in C++ using a void function declaration and it worked. What I'm trying to do is do the same in C#. I'm very new to C#, sorry if this is basic.

I've tried putting the code in an unsafe context but still not returning xo althought both xi and xo (xi**2) in the dll are correct.

	class MyClass<br />
	{<br />
		[DllImport(@"square.dll", EntryPoint="aFunc")]<br />
		<br />
		unsafe public static extern void aFunc(float xi, out float * xo);<br />
<br />
		public static int Main() {<br />
			float xi=20.0F;<br />
			unsafe {<br />
				float * xo;<br />
				aFunc(xi,out xo);<br />
				Console.WriteLine(*xo);<br />
			}<br />
			return 0;<br />
		}<br />
	}<br />
}


thanks in advance.
GeneralRe: Add reference problem ? Pin
Dave Kreskowiak1-Sep-05 1:33
mveDave Kreskowiak1-Sep-05 1:33 
GeneralRe: Add reference problem ? Pin
Kash1-Sep-05 1:46
Kash1-Sep-05 1:46 
Questionremote database connection question Pin
theStorminMormon31-Aug-05 4:39
theStorminMormon31-Aug-05 4:39 
Answermy code doesn't really have smileys in it Pin
theStorminMormon31-Aug-05 4:42
theStorminMormon31-Aug-05 4:42 
AnswerRe: remote database connection question Pin
Susan Hernandez31-Aug-05 14:08
Susan Hernandez31-Aug-05 14:08 
GeneralRe: remote database connection question Pin
theStorminMormon31-Aug-05 14:44
theStorminMormon31-Aug-05 14:44 
AnswerRe: remote database connection question Pin
Susan Hernandez31-Aug-05 15:09
Susan Hernandez31-Aug-05 15:09 
Generalcan't find Enterprise Manager Pin
theStorminMormon1-Sep-05 2:08
theStorminMormon1-Sep-05 2:08 
GeneralRe: can't find Enterprise Manager Pin
Susan Hernandez1-Sep-05 5:32
Susan Hernandez1-Sep-05 5:32 
GeneralRe: can't find Enterprise Manager Pin
theStorminMormon1-Sep-05 6:07
theStorminMormon1-Sep-05 6:07 
GeneralRe: can't find Enterprise Manager Pin
Susan Hernandez1-Sep-05 5:36
Susan Hernandez1-Sep-05 5:36 
GeneralRe: can't find Enterprise Manager Pin
theStorminMormon1-Sep-05 6:10
theStorminMormon1-Sep-05 6:10 
GeneralRe: remote database connection question Pin
Susan Hernandez31-Aug-05 15:20
Susan Hernandez31-Aug-05 15:20 
GeneralRe: remote database connection question Pin
theStorminMormon1-Sep-05 1:37
theStorminMormon1-Sep-05 1:37 
AnswerMore info on MSDE Pin
Susan Hernandez1-Sep-05 7:35
Susan Hernandez1-Sep-05 7:35 
QuestionGetting CMYK colors from bmp Pin
yarns31-Aug-05 4:19
yarns31-Aug-05 4:19 
AnswerRe: Getting CMYK colors from bmp Pin
Niklas Ulvinge31-Aug-05 8:10
Niklas Ulvinge31-Aug-05 8:10 

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.