PC Review


Reply
Thread Tools Rate Thread

How can I use a DLL-Funktion that returns a float?

 
 
Markus
Guest
Posts: n/a
 
      26th Jul 2006
I'm using an extern DLL in my applicaiton.
To use the DLL-function I use this wrapper:

public static class OTRDecoderSDKWrapper
{
[DllImport("decoderdll.dll")]
private extern static int Decodieren(string aQuelle, string aZiel,
string aSchluessel, ushort Pause);
public static int decode(string aSource, string aTarget, string aKey,
ushort aDelay){
return Decodieren(aSource, aTarget, aKey, aDelay);
}
public static int decode(string aSource, string aTarget, string
aKey){
return Decodieren(aSource, aTarget, aKey, 0);
}
[DllImport("decoderdll.dll")]
private extern static float Status(ref byte Vorgang);
public static float getStatus(ref byte aOperation){
return Status(ref aOperation);
}
}

docde() decodes a file - this is done in a Thread.
getStatus() returns a percentage value of the decode()-Status.

My problem is, that getStatus() everytime returns 0.
I found this thread
http://www.dotnet247.com/247referenc...48/240427.aspx but that is
no option for me, because I don't have the DLL-sources.

Is there a way to use the getStatus()-function in my c#-application?

Kind regards

Markus

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with if funktion =?Utf-8?B?VGlt?= Microsoft Excel Worksheet Functions 5 22nd Sep 2007 11:27 AM
How can I add '+' or '-' before float value using float.ToString() ? cok119 Microsoft C# .NET 6 2nd Jan 2007 05:22 PM
array<float>^ to float* conversion xxx Microsoft VC .NET 5 4th Oct 2006 06:36 PM
managed float != unmanaged float Amir Kolsky via .NET 247 Microsoft VC .NET 1 6th Jul 2004 04:40 PM
TypeLoadException: C# interface member float a2[,], implemented as CPP float get_a2 __gc [,] =?Utf-8?B?SGFucyBCZXJlbmRl?= Microsoft C# .NET 0 8th Mar 2004 04:11 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:39 PM.