Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dialer??
Message
De
05/11/2008 14:55:48
 
 
À
05/11/2008 12:08:30
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Versions des environnements
Environment:
C# 3.0
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Divers
Thread ID:
01359668
Message ID:
01359947
Vues:
23
Can you give me an example..or an artcle I could read to understand this other approach? Thanks!!!

bob

>Hi,
>
>Is it possible that an error is occurring in the DLL but that it is not raising an exception?
>
>Is this a COM DLL - if so have you tried adding it as a reference and using Interop instead?
>
>
>>In the original FoxPro the code is as follows:
>>
>>DECLARE INTEGER Dial IN ("autodial.dll") ;
>> INTEGER nPortNum, STRING cdial
>>...
>>
>>m.nError = Dial(m.nHandle,m.cModemString)
>>
>>It works great. In C# I rewrote the code like this:
>>
>>
>>public class AutoDial
>>{
>>[DllImport("AutoDial.dll")]
>>public static extern int Dial(int nPort, string DialString);
>>}
>>public class Dialer
>>{
>>public static void Dial(string DialString, int nPort)
>>{
>>try
>>{
>>int nError = AutoDial.Dial(nHandle, DialString);
>>}
>>catch (Exception ex)
>>{
>>MessageBox.Show(ex.Message, "Auto Dial Error", MessageBoxButtons.OK, MessageBoxIcon.Information);
>>}
>>}
>>
>>I get no errors, but it doesn't work. So I just assumed that C# couldn't talk to the DLL like FoxPro could. I contracted with someone in 1998 to create the DLL. Am I missing something obvious?
>>
>>Bob
>>
>>>>I am converting a VFP program to C#. In the VFP program I had an autodialer that would dial the phone then prompt the user to pickup the headset and then click the mouse to hang up the phone. The original dialer was written in C and worked with a DLL and a DECLARE statement in Foxpro.
>>>>
>>>>I can't get this (OLD) DLL to work with C# so I was wondering if anyone has attempted this in C# using .NET.
>>>
>>>So how and what have you done to try to get it to work?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform