473,651 Members | 2,512 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Regarding Windows Messages

Hi,

I want to implement a DDE server in VC++ and then use it from a
Java application to provide real time data to excel or any other DDE
client .

For this a dll was created with 3 different functions in VC++
for

1.. Ddeml initialization - for initializing the ddeml dll
2.. CallDdePostAdvi se - Function to call the DdePostAdvise method - to
notify the clients that data have been changed
3.. DdeCallBack method - callback method of the server
Now I access these functions from Java application using JNI. in the order

First Ddeml initialization to initialize the ddeml library and
register the application.

Then whenever there is any change in data that is being
provided to clients I call CallDdePostAdvi se method so that it calls
DdePostAdvise method of ddeml library.

Now if a client tries to connect to the dde server and calls DdeConnect
method after all initializations have been done then the method should
return a valid conversation handle .But in practice the DdeConnect method
never returns owing to a bug in the Dde. Which states that when
DdeConnect method calls SendMessage method, the SendMessage method puts a
message in the message queue of the target thread and block the calling
thread . Now if the target thread doesn't have a message loop it will
never get processed and the DdeConnect method will never return.

Please follow the link for detail about the bug.

http://support.microsoft.com/default...b;EN-US;136218

The current solution to this problem is to put a message loop in the target
thread i.e. in the Dde Server

But according to requirement VC++ function is to return to Java
after initialization is done and then call the DdePostAdvise method using
JNI whenever required. So it is not possible to keep a message loop running
in VC++ code.

Can anyone help me out or suggest any alternative to follow.

Thanks and Regards

Vijay
Nov 17 '05 #1
0 872

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
11465
by: LG | last post by:
Just have a question with regards to the clipboard, and how to read what other applications (Adobe InDesignCS) place in the clipboard. I am currently in the process of creating a booklet from a database, and I need the data to be laid out in a tabular format, and set out in a specific way. At the current point in time, I am copy/pasting the raw text from the database into a table layout in InDesign. What I was thinking is that if I could...
0
1183
by: Magdalena Temple | last post by:
dfbdbfdz lent baseman chiefdom inquisitive cyanamid jolt bungle climatic guillotine goldman rampant bellwether Spcontextual dirty garrisonian danish cinematic pandemonium brunch walnut blast divan mortem bourbaki longhand washington cuckoo areawide budweiser reticulate sunnyvale cowpea severalfold combinatoric arc dunn spare dayton oases chastise hausdorff transmit note blustery densitometer maritime am Remecalculus digit...
0
1587
by: piyush | last post by:
Sorry for repeated posting but I couldnt get things right/completely in the first post. I am in the process of deciding the IPC mechanisms to use for communication between 1) An application API (which would be set up as a NT service). It could be C++ or C#. The API as such might be talking to the underlying application (UA) via WM_COPYDATA messages.
8
1651
by: Bf | last post by:
I was creating test projects using c# and was surprised that there seems to be only a form based windows applications available. Is it safe to assume that classic window applications that utilize a parent window with child windows can only be done in c++ and mfc and there's nothing else in .net that is meant to be used like that? It seems to be that c# should be used for either form based windows apps, console apps, and web apps (also...
0
1807
by: piyush | last post by:
Sorry for repeated posts, I couldnt get things right and complete in the previous post. I am in the process of deciding the IPC mechanisms to use for communication between 1) An application API (which would be set up as a NT service). It could be C++ or C#. The API as such might be talking to the underlying application (UA) via WM_COPYDATA messages.
14
4906
by: Brian Keating EI9FXB | last post by:
I wonder can anyone reccomment a solution to this problem. Let me explain, I've services running on my system, my application receives diagnostic messages from these services, what i want to do is create an MDIChild window for each service that is sending messages. Ok so far so good, but I get problems if one service is constantly sending messages to it's window because, this window is very busy updating it's view, hence because it's...
8
16337
by: Brian Keating EI9FXB | last post by:
Would I be correct in saying that the only way to get a user message into a Windows form would be to use P/Invoke with Message? Of is there some part of the .NET API that I am totally un aware of? Thanks for any help Brian
3
1563
by: Javaman59 | last post by:
I've spent the last 3 years programming VC++, and learnt that Windows programming is all about messages. Now I'm doing C#, and there isn't a windows message to be seen! Now, I don't miss those messages at all - in fact I'm very glad to see the end of them, but I am puzzled as to where they've gone. Has .Net got rid of windows messages, or are they just hidden inside the CLR, where windows windows (to use the VC++ term for the real...
3
7481
by: Chris Paul | last post by:
I'm having trouble with PHP & PostgreSQL/OpenLDAP/Apache on Windows. I've set this up countless times on BSD (piece of cake) but I'm trying to do this on Windows now so that my developer can work on her local machine. Everything looks pretty good. OpenLDAP/cygwin works great. PostgreSQL works great. Apache runs. PHP runs. But when I try to connect to my PostgreSQL server using PHPPgAdmin, I
5
3573
by: Aravind | last post by:
Hi! I have to write an application that runs in the background in the system tray. It should listen to keyboard events and send messages to another program that is currently active. Can anyone suggest me solution. Thank you,
0
8352
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8802
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8579
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7297
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6158
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5612
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4283
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2699
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1909
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.