Code Monkey home page Code Monkey logo

specshell.software.ndde's Introduction

NDde

Nuget

This library provides a convenient and easy way to integrate .NET applications with legacy applications that use Dynamic Data Exchange (DDE). DDE is an older interprocess communication protocol that relies heavily on passing windows messages back and forth between applications. Other, more modern and robust, techniques for interprocess communication are available and should be used when available. This library is only intended to be used when no other alternatives exist.

Supports net6.0-windows

Original Project

Migrated from https://ndde.codeplex.com/ Credit to https://www.codeplex.com/site/users/view/briangideon

specshell.software.ndde's People

Contributors

dependabot[bot] avatar jespermonsted avatar jetersen avatar specshell-workflows-app[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

specshell.software.ndde's Issues

Can't install nuget version on Win 10

Hi,
I can not use the nuget package of NDDE on Windows 10, with VS2019 and .net5 (net5.0-windows10).
If I understand the error correct, is it only compatible with Windows 7. So can you release a updated version for Windows 10?

Severity	Code	Description	Project	File	Line	Suppression State
Error	NU1202	Package Specshell.NDde 3.0.6 is not compatible with net5.0 (.NETCoreApp,Version=v5.0). Package Specshell.NDde 3.0.6 supports: net5.0-windows7.0 (.NETCoreApp,Version=v5.0)	dde_testC:\Users\[...]\dde_test.csproj	1

NDde.Internal.DdemlException: 'The client failed to initiate an advise loop for

Hello,

I am trying to connect to three legacy programs supporting DDE, and are designed to connect with Excel as a client. I can connect directly with excel for all programs and be able to get data.

However, when trying to use the sample clientwin app, and connecting to those programs, I am using the below NDde format id when calling the client.StartAdvise(myItem, xltableFormat, true, 60000) fuction.

When I use 1 in the function instead of xltableFormat (see below), i receive no errors but the textbox in the client sample app shows nothing and the client_Advise(object sender, DdeAdviseEventArgs args) function will never be executed.

    //Get the xlTable format id to be used in the advise
    int xltableFormat = System.Convert.ToInt32(System.Windows.Forms.DataFormats.GetFormat("XlTable").Id);

So, calling the StartAdvise function, because the legacy apps supports Excel, I have to use xlTable as without it the client won't be able to connect to the DDE server of the legacy programs.

        ddeClientCompany = new DdeClient(myService, myTopic, this);
        ddeClientCompany.Advise += clientAllCompanies_Advise;
        ddeClientCompany.Connect();
        ddeClientCompany.StartAdvise(myItem, xltableFormat, true, 60000);

In summary:

Program 1 succeeded to connect and got the data from the legacy app, but with the programs 2 & 3, I received an error in DdemlClient.cs Line 845 as below message with Exception Thrown. "NDde.Internal.DdemlException: 'The client failed to initiate an advise loop for "MRegionalDdeServer|STTDWL�1010�TDWL!HIGH".'" But as mentioned above, receive no updates when using 1 for the format id.

I am not sure what's the root cause of the issue. The only difference that I noticed between Program 1 and 2 is that the string for Item in Program 2 has a text (LOW) instead of a number (22). Also, there is as well the use of FS (File Separator) special character (�) or the hex value (0x1C) in the string instead of the character ~.

For Program 3, I was not sure how to break the string into the Topic and Item parts. Some suggestions are truly appreciated.

I have attached an image of the code. Your help is truly appreciated. Thanks in advance!

Program 1 (successful connection): MRegionalDdeServer|'BOTDWL~1010~0'!'22'*1

        // Program 1
        // = MRegionalDdeServer | 'BOTDWL~1010~0'!'10' * 1
        myService = "MRegionalDdeServer";
        myTopic = "BOTDWL~1010~0";
        myItem = "22";

Program 2 (Failed connection): MRegionalDdeServer|'STTDWL�1010�TDWL'!HIGH
NDde.Foundation.DdemlException: 'The client failed to initiate an advise loop for "MRegionalDdeServer|'STTDWL�1010�TDWL'!HIGH".'

        // Program 2
        // =TickerChart|Live!'QO.1010.TAD$HIGH'
        myService = "TickerChart";
        myTopic = "Live";
        myItem = "'QO.1010.TAD$low'";

Program 3 (Failed connection): TickerChart|Live!'QO.1010.TAD$High'
NDde.Foundation.DdemlException: 'The client failed to initiate an advise loop for "TickerChart|Live!'QO.1010.TAD$High'".'

        // Program 3
        // = MRegionalDdeServer|'STTDWL�1010�TDWL'!High
        myService = "MRegionalDdeServer";
        myTopic = "STTDWL�1010�TDWL";
        myItem = "LOW";

image

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.