473,326 Members | 2,104 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

DDEClientTransaction doesn't work

Hello,
I'm trying to setup DDE converzation using VB.NET. I used APIfinctions. I have initialized DDEML & got connection. I haveproblem to send the command to the application. The functionalways return 0. Can sombody give me any direction hov to solvethis, please.

I have declared DDEClientTransastion this way:

Public Declare Function DdeClientTransaction Lib "user32" Alias"DdeClientTransaction" (ByRef pData As String, ByVal cbData AsInteger, ByVal hConv As Integer, ByVal hszItem As Integer, ByValwFmt As Integer, ByVal wType As Integer, ByVal dwTimeout AsInteger, ByRef pdwResult As Integer) As Integer

I'm trying to use this function, where 'DdeCommand' is command,'StrLength' is length of command +1, 'ConnectId' is DDEConnecthandle & Result = 0

DdeClientTransaction(DdeCommand, StrLength, ConnectId, 0, 0,XTYP_EXECUTE, 2000, Result)

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>Dz1rGVLKAEWII87BXcpGZA==</Id>
Nov 21 '05 #1
1 2927

valdo 77 via .NET 247 wrote:
Hello,
I'm trying to setup DDE converzation using VB.NET. I used API finctions. I have initialized DDEML & got connection. I have problem to
send the command to the application. The function always return 0. Can
sombody give me any direction hov to solve this, please.
I have declared DDEClientTransastion this way:

Public Declare Function DdeClientTransaction Lib "user32" Alias "DdeClientTransaction" (ByRef pData As String, ByVal cbData As Integer,
ByVal hConv As Integer, ByVal hszItem As Integer, ByVal wFmt As
Integer, ByVal wType As Integer, ByVal dwTimeout As Integer, ByRef
pdwResult As Integer) As Integer
I'm trying to use this function, where 'DdeCommand' is command, 'StrLength' is length of command +1, 'ConnectId' is DDEConnect handle &
Result = 0
DdeClientTransaction(DdeCommand, StrLength, ConnectId, 0, 0, XTYP_EXECUTE, 2000, Result)


There is a lot involved in getting the DDEML to work. Take a look at
the following sample.

Watch for wrap...
http://www.gotdotnet.com/Community/U...4-2ED516B75181

Nov 21 '05 #2

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

Similar topics

7
by: AnnMarie | last post by:
My JavaScript Form Validation doesn't work at all in Netscape, but it works fine in IE. I made some of the suggested changes which enabled it to work in IE. I couldn't make all the changes...
39
by: Mark Johnson | last post by:
It doesn't seem possible. But would the following also seem a violation of the general notions behind css? You have a DIV, say asociated with class, 'topdiv'. Inside of that you have an anchor...
3
by: Matt | last post by:
I want to know if readOnly attribute doesn't work for drop down list? If I try disabled attribute, it works fine for drop down list. When I try text box, it works fine for both disabled and...
149
by: Christopher Benson-Manica | last post by:
(Followups set to comp.std.c. Apologies if the crosspost is unwelcome.) strchr() is to strrchr() as strstr() is to strrstr(), but strrstr() isn't part of the standard. Why not? --...
6
by: A.M-SG | last post by:
Hi, I have an aspx page at the web server that provides PDF documents for smart client applications. Here is the code in aspx page that defines content type: Response.ContentType =...
4
by: bbp | last post by:
Hello, In an ASPX page I have a "Quit" button which make a simple redirect in code-behind. This button doesn't work no more since (I think) I moved from the framework 1.0 to 1.1 and it doesn't...
3
by: Dave Moore | last post by:
Hi All, Ok, here's my problem. I want to open a file and process its contents. However, because it is possible that the file may not exist, I also want to check whether the file() function is...
10
by: Sourcerer | last post by:
I wrote this very simple code in .NET VC++. I compiled it on my system, and tried to run it on my friend's computer (he doesn't have the compiler). We both have Windows XP Professional. I have .NET...
6
by: Johnny Jörgensen | last post by:
I've got a usercontrol derived from a normal ComboBox that contains some special formatting code. On my main form I've got a lot of my custom comboboxes. I discovered a bug in the derived...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.