home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
sftick.zip
/
adv
/
mem
/
SHAREE.C
< prev
next >
Wrap
Text File
|
1994-04-21
|
598b
|
30 lines
#define INCL_DOSMEMMGR
#include <os2.h>
#include <stdio.h>
int main( void )
{
PVOID pSharedMem ;
APIRET rc ;
/* get the shared memory */
rc = DosGetNamedSharedMem( &pSharedMem,
"\\SHAREMEM\\MEMNAME",
PAG_READ | PAG_WRITE ) ;
printf ("\nrc from DosGetNamedSharedMem = %d", rc ) ;
if ( !rc )
printf("\nString is %s", pSharedMem ) ;
printf("\nPress any key" ) ;
fflush( stdout ) ;
/* wait for a keypress */
getchar() ;
/* exit */
return 0;
}