Using DDEshare utility delete the existing
Trusted Share and create a new Trusted Share with the following
properties enabled: Start Application Enable and
Initiate to Application Enable.
The following is a example which can be used to test this
problem:
DDE Server Machine
On the Windows NT Workstation create an Excel worksheet called
Book1.xls. Define cell R1C1 as testcell. Run DDEshare and
create a share called Excel$. Leave Old Style and New
Style fields blank. In the Static fields type Excel
for Application and Book1.xls for Topic Name.
Enable Allow start application and is service.
Also enable Grant access to all items. In the Permissions
give Everybody Full Control. Created a Trusted Share with
the following properties enabled: Start Application Enable
and Initiate to Application Enable. Run Excel with
Book1.xls opened.
DDE Client Machine
Use the following Cicode to test the connection:
hDDE =
DDEhInitiate("\ComputerName\NDDE$","Excel$");
/* Test Read */
sStr = DDEhRequest(hDDE,"testcell");
/*Test Write */
DDEhPoke(hDDE,"testcell","Hello World");
The following points should be noted:
- DDEhInitiate will return a handle of 0 even if the DDE
connection was not made, so if DDEhRequest does not return the
contents of testcell a vaild DDE connection was not made. To solve
the problem delete the Trusted Share and create a new one as
outlined above. Re-run the DDEhInitiate command and test
DDEhRequest again.
- DDEhInitiate will always prompt for a user Password either to
logon to Windows for Workgroups or a Domain. The DDE server machine
can be either part of a Workgroup or part of a Domain.
|