|
Contents | Previous | Next | Subchapters |
int OMClientConnect(char *name)
'\0' terminated
character vector.
A connection will be attempted to any program that called
OMServerRegister
with the same value for name.
The default server name for O-Matrix is "O-Matrix".
If the return value of OMClientConnect
is greater than or equal zero,
it is an integer that identifies this connection.
If the return value is OMDDE_CONNECTION_FAILED,
the connection failed.
omclicon.c
in the directory omwin\omdde.
If you have the Microsoft Visual C++ compiler,
it can be compiled and linked by executing the command
nmake /f console.mak omclicon.exe
in that directory.
# include <stdio.h>
# include "define\omdde.h"
# include "define\noserver.h"
int main()
{
int id;
int ok;
ok = OMDdeInitialize();
if( ! ok )
{ printf("Cannot initialize OMDDE\n");
return 1;
}
id = OMClientConnect("O-Matrix");
if( id == OMDDE_CONNECTION_FAILED )
printf("O-Matrix is not currently running\n");
else printf("O-Matrix is currently running\n");
OMDdeUninitialize();
return 0;
}