The NetMessageNameAdd API registers a name in the message name table.
Restrictions
This API can be called from DLS and OS/2 workstations. Administrator authority is required to call this API remotely. However, no access authority is required for local execution.
#include <netcons.h> #include <message.h> NetMessageNameAdd(pszServername, name, fwd_action); /* 16 bit */ Net32MessageNameAdd(pszServername, name, fwd_action); /* 32 bit */Parameters
See Common Parameter Definitions for descriptions of parameters not defined here.
name
The following table lists the return codes most significant to this API.
(See API Return Codes for a complete
list of return codes.) ┌─────────────────────────────┬───────┬────────────────────────────────────────┐│SYMBOLICCONSTANT
│VALUE│MEANING │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ NERR_Success │ 0 │ No errors were encountered. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ ERROR_ACCESS_DENIED │ 5 │ Administrator privilege is required. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ ERROR_NOT_ENOUGH_MEMORY │ 8 │ Sufficient memory is not available.
│
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ ERROR_REM_NOT_LIST │ 51 │ This remote computer is not listening.
│
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ ERROR_INVALID_PARAMETER │ 87 │ At least one parameter value is not
│
│ │ │ valid. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ ERROR_INVALID_LEVEL │ 124 │ The sLevel parameter is not valid. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ NERR_NetNotStarted │ 2102 │ The redirector NETWKSTA.200 has not
│
│ │ │ been started. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ NERR_ShareMem │ 2104 │ An internal error occurred-the network
│
│ │ │ cannot access a shared memory segment. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ NERR_NoNetworkResource │ 2105 │ A network resource shortage occurred.
│
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ NERR_BufTooSmall │ 2123 │ The buffer is too small for fixed- │
│ │ │ length data. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ NERR_RemoteErr │ 2127 │ A remote API error has occurred. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ NERR_OS2IoctlError │ 2134 │ An internal error occurred when │
│ │ │ calling the workstation driver. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ NERR_NetworkError │ 2136 │ A general network error has occurred.
│
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ NERR_WkstaNotStarted │ 2138 │ The Requester service has not been
│
│ │ │ started. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ NERR_BrowserNotStarted │ 2139 │ The requested information is not
│
│ │ │ available. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ NERR_InternalError │ 2140 │ An internal error has occurred. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ NERR_BadTransactConfig │ 2141 │ The server is not configured for
│
│ │ │ transactions. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ NERR_NameNotFound │ 2273 │ The message alias cannot be found on
│
│ │ │ the local area network. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ NERR_AlreadyForwarded │ 2274 │ This message alias has already been
│
│ │ │ forwarded. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ NERR_AddForwarded │ 2275 │ This message alias has been added, but
│
│ │ │ is still forwarded. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ NERR_AlreadyExists │ 2276 │ This message alias already exists
│
│ │ │ locally. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ NERR_TooManyNames │ 2277 │ The maximum number of added message
│
│ │ │ aliases has been exceeded. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ NERR_MsgNotStarted │ 2284 │ The Messenger service has not been
│
│ │ │ started. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ NERR_DuplicateName │ 2297 │ A duplicate message alias exists on
│
│ │ │ the local area network. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ NERR_DeleteLater │ 2298 │ This message alias will be deleted │
│ │ │ later. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ NERR_InvalidComputer │ 2351 │ The specified
computer name is not │
│ │ │ valid. │
└─────────────────────────────┴───────┴────────────────────────────────────────┘
Other codes could be returned from the following functions:
For information about: