Click here to Skip to main content
15,887,596 members
Home / Discussions / C#
   

C#

 
GeneralRe: Transparency Pin
MrEyes11-Nov-02 3:35
MrEyes11-Nov-02 3:35 
GeneralRe: Transparency Pin
MrEyes11-Nov-02 4:03
MrEyes11-Nov-02 4:03 
GeneralRe: How do i find if user clik "ok" on my Modal Dialog? Pin
perlmunger8-Nov-02 4:24
perlmunger8-Nov-02 4:24 
GeneralRecomended Data Store... Pin
Steve McLenithan8-Nov-02 2:32
Steve McLenithan8-Nov-02 2:32 
GeneralRe: Recomended Data Store... Pin
perlmunger8-Nov-02 5:20
perlmunger8-Nov-02 5:20 
GeneralRe: Recomended Data Store... Pin
Paul Watson8-Nov-02 6:54
sitebuilderPaul Watson8-Nov-02 6:54 
GeneralRe: Recomended Data Store... Pin
Steve McLenithan8-Nov-02 12:00
Steve McLenithan8-Nov-02 12:00 
GeneralNeed Help!!! C# Interfaces and C++ Classes Pin
Chris Powers8-Nov-02 1:51
Chris Powers8-Nov-02 1:51 
I have sucessfully wrapped existing C++ code that controls dialogic telephony hardware into one nice managed dll file.

Here is an interface from the origional Managed C++ DLL
---------------------------------------------------------
#pragma once

#using <mscorlib.dll>

using namespace System;

namespace Telephony
{
public __gc __interface ITelephony
{
public:
// METHODS
void ClearDigitsBuffer();
void Dial( String __gc* phoneNumber);
String __gc* GetDigits(int maxDigits, float timeOutSec, String __gc* termDigits, float digitTimeOutSec, float silenceTimeOutSec,String __gc* &termDigit);
String __gc* GetDigits(int maxDigits, float timeOutSec, String __gc* termDigits, float digitTimeOutSec);
void GiveDialTone();
void OffHook();
void OnHook();
void PlayFile(String __gc* fileName, String __gc* termDigits, bool terminate);
void PlayFile(String __gc* fileName);

// PROPERTIES
__property String __gc* get_CallerId();
};
}
---------------------------------------------------------

The above worked perfectly...

I have since decided that it would be beter if I had taken the ITelephony interface out of the dialogic dll and placed it in a more generic dll file that can used to implement future wrappers for other Telephony hardware.

For this task I decided to use C# and the following is the result...
---------------------------------------------------------
using System;

namespace Telephony
{
public interface ITelephony
{
// METHODS
void ClearDigitsBuffer();
void Dial(string phoneNumber);
string GetDigits(int maxDigits, float timeOutSec, string termDigits, float digitTimeOutSec, float silenceTimeOutSec, ref string termDigit);
string GetDigits(int maxDigits, float timeOutSec, string termDigits, float digitTimeOutSec);
void GiveDialTone();
void OffHook();
void OnHook();
void PlayFile(string fileName, string termDigits, bool terminate);
void PlayFile(string fileName);

// PROPERTIES
string CallerId
{
get;
}
}
}
---------------------------------------------------------

When I recompiled the solution I noticed that any C++ class that inherited from the C# interface was now considered abstract. To confirm this I used ILDASM

---------------------------------------------------------
.class public abstract auto ansi Line
extends [mscorlib]System.Object
implements [Telephony]Telephony.ITelephony
---------------------------------------------------------

I have since found a work around for this problem by instead creating the generic dll in managed C++ using the origional C++ interface from above. Now when I use ILDASM I see this...
---------------------------------------------------------
.class public auto ansi Line
extends [mscorlib]System.Object
implements [TelTest]Telephony.ITelephony
---------------------------------------------------------

Have I made a mistake in converting my C++ interface into C# or is there a noted problem when creating C++ classes which inherite from C# interfaces?

Thanks,
Any help would be appreciated
QuestionHow do i find if user clik "ok" on my Modal Dialog? Pin
Karavaev Denis8-Nov-02 0:54
Karavaev Denis8-Nov-02 0:54 
AnswerRe: How do i find if user clik "ok" on my Modal Dialog? Pin
Chad Smith8-Nov-02 3:30
professionalChad Smith8-Nov-02 3:30 
GeneralRe: How do i find if user clik "ok" on my Modal Dialog? Pin
Karavaev Denis8-Nov-02 3:46
Karavaev Denis8-Nov-02 3:46 
GeneralScroll Listbox with API Pin
CristianRicciolo7-Nov-02 23:32
CristianRicciolo7-Nov-02 23:32 
GeneralComponent based programming in C# (newbie!) Pin
AaronStibich7-Nov-02 16:41
AaronStibich7-Nov-02 16:41 
GeneralRe: Component based programming in C# (newbie!) Pin
Nick Parker7-Nov-02 17:44
protectorNick Parker7-Nov-02 17:44 
GeneralRe: Component based programming in C# (newbie!) Pin
Stephane Rodriguez.7-Nov-02 19:11
Stephane Rodriguez.7-Nov-02 19:11 
GeneralRe: Component based programming in C# (newbie!) Pin
Nick Parker8-Nov-02 1:54
protectorNick Parker8-Nov-02 1:54 
GeneralRe: Component based programming in C# (newbie!) Pin
Stephane Rodriguez.8-Nov-02 2:26
Stephane Rodriguez.8-Nov-02 2:26 
GeneralRe: Component based programming in C# (newbie!) Pin
Nick Parker8-Nov-02 3:36
protectorNick Parker8-Nov-02 3:36 
GeneralRe: Component based programming in C# (newbie!) Pin
Stephane Rodriguez.8-Nov-02 3:45
Stephane Rodriguez.8-Nov-02 3:45 
GeneralRe: Component based programming in C# (newbie!) Pin
Nick Parker8-Nov-02 17:20
protectorNick Parker8-Nov-02 17:20 
GeneralRe: Component based programming in C# (newbie!) Pin
Stephane Rodriguez.8-Nov-02 19:26
Stephane Rodriguez.8-Nov-02 19:26 
GeneralRe: Component based programming in C# (newbie!) Pin
Nick Parker9-Nov-02 2:07
protectorNick Parker9-Nov-02 2:07 
General.INI file usage in C# Pin
Darryl Borden7-Nov-02 11:54
Darryl Borden7-Nov-02 11:54 
GeneralRe: .INI file usage in C# Pin
Nick Parker7-Nov-02 13:20
protectorNick Parker7-Nov-02 13:20 
GeneralBy the way, ... Pin
Anonymous7-Nov-02 20:33
Anonymous7-Nov-02 20:33 

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.