The lpOperationInfo parameter of the notification function is a pointer to a NOTIFYADD structure which contains the add connection specific information as follows:
typedef struct _NOTIFYADD {
DWORD cbStructure;
HWND hwndOwner;
NETRESOURCE NetResource;
DWORD dwAddFlags;
LPTSTR lpAccessName; /* System name for connection */
LPDWORD lpBufferSize; /* Size of AccessName buffer */
DWORD dwResult; /* Information about connection */
DWORD dwAddContext; /* Context of add connection */
} NOTIFYADD, *LPNOTIFYADD;
lpRemoteName | The name of the network resource. If this parameter is a pointer to an empty string, then access has been attempted to the entire network, such as when starting browsing to a network. |
lpLocalName | This specifies the name of a local device to be redirected, such as "F:" or "LPT1". The string is treated in a case-insensitive manner. lpLocalName may be a pointer to an empty string in which case, if lpRemoteName is pointer to a non-empty string, a connection to a network resource is being made without making a redirection. |
lpProvider | On pre-notification, specifies which NPs the connect operation was applied to. If a pointer to an empty string, then MPR has tried all valid providers. On post-notification, if the add operation was successful, specifies the name of the NP that performed the add operation. |
CONNECT_TEMPORARY | The connection is being established for browsing purposes and will probably be released quickly. |
CONNECT_INTERACTIVE | May have interaction with the user. |
CONNECT_PROMPT | Do no use any defaults without offering user the chance to supply an alternative. This flag is only valid if CONNECT_INTERACTIVE is set. |
CONNECT_UPDATE_PROFILE | If the connection is being made persistent. |
CONNECT_UPDATE_RECENT | If the connection is being put in the recent connection list. |
CONNECT_REDIRECT | If set, force the auto-picking of a local device for redirection when making the connection, otherwise only auto-pick a local device for redirection if the network requires it to make a connection. |
CONNECT_CTXT_RESTORE | The connection is being established to restore a persistent connection. |
CONNECT_CTXT_GLOBAL | All persistent connections are being restored. This flag is only valid if CONNECT_CTXT_ RESTORE is set. |
CONNECT_CTXT_PROVIDER | The persistent connections for a specific network alone are being restored. This flag is only valid if CONNECT_CTXT_ RESTORE is set. |
CONNECT_CTXT_SINGLE | An individual persistent connection is being restored. This flag is only valid if CONNECT_CTXT_ RESTORE is set. |