|
Overview |
|
|
|
Group |
|
|
|
Quick Info
Windows NT
| Yes
| Win95
| Yes
| Win32s
| Yes
| Import Library
| user32.lib
| Header File
| ddeml.h
| Unicode
| No
| Platform Notes
| None
|
|
|
DdeNameService
The DdeNameService function registers or unregisters the service names a dynamic data exchange
(DDE) server supports. This function causes the system to send XTYP_REGISTER or XTYP_UNREGISTER transactions to other running Dynamic Data Exchange Management Library (DDEML) client applications.
A server application should call this function to register each service name
that it supports and to unregister names it previously registered but no longer
supports. A server should also call this function to unregister its service
names just before terminating.
HDDEDATA DdeNameService(
DWORD idInst,
| // instance identifier
| HSZ hsz1,
| // handle to service name string
| HSZ hsz2,
| // reserved
| UINT afCmd
| // service name flags
| );
|
|
Parameters
idInst
Specifies the application instance identifier obtained by a previous call to
the DdeInitialize function.
hsz1
Identifies the string that specifies the service name the server is
registering or unregistering. An application that is unregistering all of its service
names should set this parameter to 0L.
hsz2
Reserved; should be set to 0L.
afCmd
Specifies the service name flags. This parameter can be one of the following
flags:
Flag
| Meaning
| DNS_REGISTER
| Registers the error code service name.
| DNS_UNREGISTER
| Unregisters the error code service name. If the hsz1 parameter is 0L, all service names registered by the server will be
unregistered.
| DNS_FILTERON
| Turns on service name initiation filtering. The filter prevents a server from
receiving XTYP_CONNECT transactions for service names it has not registered.
This is the default setting for this filter.
|
| If a server application does not register any service names, the application
cannot receive XTYP_WILDCONNECT transactions.
| DNS_FILTEROFF
| Turns off service name initiation filtering. If this flag is specified, the
server receives an XTYP_CONNECT transaction whenever another DDE application
calls the DdeConnect function, regardless of the service name.
|
Return Values
If the funcion succeeds, it returns a nonzero value. That value is not a true
HDDEDATA value, merely a Boolean indicator of success. The function is typed
HDDEDATA to allow for possible future expansion of the function and a more
sophisticated return value.
If the function fails, the return value is 0L.
Errors
The DdeGetLastError function can be used to get the error code, which may be one of the following
values:
DMLERR_DLL_NOT_INITIALIZED
DMLERR_DLL_USAGE
DMLERR_INVALIDPARAMETER
DMLERR_NO_ERROR
Remarks
The service name identified by the hsz1 parameter should be a base name (that is, the name should contain no
instance-specific information). The system generates an instance-specific name and
sends it along with the base name during the XTYP_REGISTER and XTYP_UNREGISTER
transactions. The receiving applications can then connect to the specific
application instance.
See Also
DdeConnect, DdeConnectList, DdeInitialize, XTYP_REGISTER, XTYP_UNREGISTER
| Last news from Greatis Software |
 |
|
Nostalgia .Net |
|
.Net is powerful, but not all-powerful, so sometimes we need to use Win32 API for our .Net applications. It's simple enough with Platform Invoke if you have Win32 skill, but we do not always have time to dig the ancient documentation, declare the special types that are compatible with Win32, find the values of the Win32's constants and so on. Nostalgia .Net offers several simple-to-use classes, and components that will allow you to forget about the headache of Win32 and just use the power of Win32 in your application the same way as you use the native. Net classes. More » |
| Recommended software for developers |
 |
|
Ultimate Pack |
|
Component pack for Delphi and C++ Builder that contains runtime form designer, runtime object inspector, print suite and much more for the very special price. More » |
 |
|
Form Designer .Net |
|
Unique runtime form design solution that allows to edit any form in .Net WinForms application at runtime with full source codes for only 300 euro! More » |
 |
|
Print Suite .Net |
|
Print Suite .Net is a set of components for easy printing texts, images and grids from your WinForms applications. Full C# source codes are available More » |
 |
|
Gradient Controls .Net |
|
Gradient Controls .Net offers controls with gradient background feature. Labels, panels and so on... Full C# source codes are available More » |
 |
|
Greatis iGrid |
|
iGrid plots drawing grid right over your desktop, so you can use it everywhere, with any drawing application without any special plugins for different graphic editors. More » |
All the contacts and projectsDmitry Vasiliev (just.dmitry)
Related LinksSoftware for Visual Studio .NET developers Software for Delphi and C++ Builder developers Software for Visual Basic 6 developers Delphi Tips&Tricks MegaDetailed.NET More Online Helps Win32 Programmer's Reference Win32 Multimedia Programmer's Reference OLE Programmer's Reference Microsoft Windows Pen API Programmer's Reference Microsoft Windows Sockets 2 Reference Microsoft Windows Telephony API (TAPI) Programmer's Reference Unix Manual Pages
|