Beispiel #1
0
char *RemoteLink( char *name, char server )
{
    int     i;
    int     rc;

    server = server;
    if( name == NULL || *name == '\0' ) name = DefLinkName;
    i = 0;
    for( ;; ) {
        if( i >= sizeof( LinkName ) ) break;
        if( *name == '\0' ) break;
        LinkName[i++] = *name++;
    }
    LinkName[i] = '\0';
#ifdef SERVER
    rc = RegisterName( LinkName );
    if( rc < 0 ) {
        UnregisterName( LinkName );
        rc = RegisterName( LinkName );
        if( rc < 0 ) {
            return( TRP_ERR_CANT_REGISTER_SERVER );
        }
    }
#else
    rc = AccessName( LinkName, &_id );
    if( rc < 0 ) return( TRP_ERR_CANT_FIND_SERVER );
#endif
    return( NULL );
}
Beispiel #2
0
void RemoteUnLink( void )
{
#ifdef SERVER
        UnregisterName( LinkName );
#else
        UnaccessName( LinkName );
#endif
}
Beispiel #3
0
/*
 * VxDUnLink - terminate link
 */
int __pascal VxDUnLink( void )
{
#ifdef SERVER
#ifdef __WINDOWS__
    messageLoop();
#endif
    return( UnregisterName( linkName ) );
#else
    return( UnaccessName( linkName ) );
#endif

} /* VxDUnLink */