[[ header START ]]

Welcome to OS2.GURU site! (eComStation.RU)

Select your language: Russian English Deutch Spanish Italian Portuguese Czech Polish French

Frequently asked questions and answers:
telegram

Форум обсуждение

telegram

Send message

telegram

[ +7-981-8529467 (Санкт-Петербург)

telegram

t.me/os2_guru

eComStation.RU


ru · en · de · es · it · pt · cz · pl · fr
OS/2 is a greatly different operating system for PC (ArcaOS, eComStation, IBM OS/2 Warp)
Applications, news, reviews, support of users, hardware, questions and answers.
 
[What is OS/2?  News  Install  Update  
 
 
Usage  Future  Community  Projects  

How to buy
russian OS/2 apps?

The concept of
OS/2 development

 
Update

 
Applications

 
Advantages:

 
For developer:

 
(Пайпы программ)

 
Companies:

 
History:

 
(Бонусы)

 
Advice:

 
(Барьеры и решения)

 
Technologies:

 
(Применение в науке, лаборатории, ..)

 

 
Solutions

 
New eComStation:

 
Future:

 
(Ссылки на другие сайты)

 
(Картинка дня)

 
OS/2 artefacts:

 
Gadgets:

Upgrade ArcaOS to NeoWPS level

  • Install original PNG icons drawed by designer, specialized at OS/2 adornation.
  • Install eSchemes 2018 to change colors and buttons on desktop.

Interaction of processes


TITLE: Interaction of processes

DATE: 2012-08-11 17:56:09

AUTHOR: Capricorn

Please use online translator
go to http://translate.google.com
and request the translation of http://ru.ecomstation./showarticle.php?id=273
to your language

........

..... ..........., ....... ..... .... ... ............. OS (. . .... ... ...... .......... .. ..........) .... ... ...... ............ . .............. .......... .............. ..... ........... ..........., ....... ...... ........ . ....... . OS/2 ... .... .... .......... ......... ..........: ........, ....., ..... (...........) ......, ........ .... . ....... ..... ... .....-..... ....... . ............ ....... .......... .., .. ....... . ..... ...... ......-.. ........ .......... .. ... ......, .......... ............. .... ...... ...... - ........ ........... ...... ......... . .... ............ .. .. .............. .. ......., .......... ...... ....

........

........ ...... ..... ....: ............. .......... . ........ ...... .... 2 .........: "....." . "........". .... ............. ....... . ..., ... ............... ....... ........ ........., ..... .. ......., . .... .., ............ ..... .......... 2 .... .........: ...... . ........

.) ....... .... "event" (".......") ..... ... ...., ..... ......... ...... ..... ........., .... ...... .... ........ ......... .......

......:

/*************/
/*           */
/* ....... 1 */
/*           */
/*************/

#define INCL_DOS
#include 

PSZ  szSemName  = "\\SEM32\\EVENT"; /* ... ......... ...... ..... ....... \SEM32\ */
HEV  hevEvent1  = 0;                /* .......... ........ */

if (DosCreateEventSem(szSemName,    /* ... ............ ........  */
                    &hevEvent1,     /* .... ..... ......... .......... ........ */
                    DC_SEM_SHARED,  /* ........... ....... */
                    FALSE))         /* ....... ....... . .......... (.......) ......... */
   return 1;  /* ....... ....... .. ....... */

/* ... ...-.. ...... 
   .. ..... ....... ...... .... ..... .....
   ............ (............) ........ */

DosPostEventSem(hevEvent); /* ......... ........ ......... (............) */
  
/* .......... ...... */

DosCloseEventSem(hevEvent1);      /* ........... .. ........ */

 

/*************/
/*           */
/* ....... 2 */
/*           */
/*************/


..... (pipes)

[..........]

........... ......

[..........]

.......

... .... ...... .............. ..... .......... - ....... (queues). ... ... .......... ....., ....... ......-.. ........ ......... . ...... .... (pipes). .. ... ......, .......... ............. ..... ..... ....... ........... ....... ........ .., ... ..-........

...., ....... ............ ..... ........ ...... ............ ... ...-.. .......... ....... ......... Presentation Manager'., .. .... ............ ........, ....... .. ..... .. ....... ....... ........ ....... . ..., ... .. ...... .. ........, ....... ..... ........ .. ...... . ...... .........., ........ (FIFO), .. . . ...... ..... (LIFO), . ....., .. ............

....... ...... ............

.... ....., .... ....... (....), ....... .. ....... ....... ........, ....... ....... . ....... ..., ...... (....... .. .........), ......... .. . ..... .... .......... .........., ... ............ ....... ....... ............ .....

......:

/**********************/
/*                    */
/* ....... 1 (......) */
/*                    */
/**********************/

#define INCL_DOS
#include 

#define QUEUE_FIFO 0	// .......
#define QUEUE_LIFO 1	// ....
#define QUEUE_PRIO 2	// .. ...........

#define MSG_QUIT   0x0001 /* ............. ......... ... .......... ..... */

#define QUEUE_NAME "\\QUEUES\\special.que"	/* ... ........
						 * ...... ..... ....... \QUEUES\
						 */

/* ......., ....... ..... ............ ......... */
BOOL processMessage(ULONG ulMessageId, ULONG ulDataSize, PVOID pvData);

int main(void)
.
	HQUEUE hQueue;	/* .... ..... ....... ..... ....... */
	APIRET rc;	/* ......... ...... ....... API */	

	/* ......... ....... */
	rc = DosCreateQueue(&hQueue, QUEUE_FIFO, QUE_NAME);
	if (rc)
		return rc;
		
	/* .... ......... ......... .. ....... */	
	while(TRUE)
	.
		REQUESTDATA requestData;        /* ......... ... ......... ...... ....... */
		ULONG       ulDataSize;         /* .... ..... ....... ..... .......... ...... */
		PVOID       pvData;             /* .... ..... ........ ...... .. .......... ...... */
		rc = DosReadQueue(hQueue,       /* ..... ....... */
                                 &requestData, /* ...... ....... */
                                 &ulDataSize,  /* ..... .......... ...... */
                                 &pvData,      /* .......... ...... */
                                 0,            /* ...... ...... ....... .. ....... */
                                 FALSE,        /* .... */
                                 0,            /* .........  .. ..... */
                                 NULLHANDLE);  /* ..... ........-.......  .. ..... */
		if (rc || requestData.ulData==MSG_QUIT)
			break;
		processMessage(ulMessageId, ulDataSize, pvData);
	.
	rc = DosCloseQueue(hQueue);             /* ....... ....... */
	return rc;
.

 

/**********************/
/*                    */
/* ....... 2 (......) */
/*                    */
/**********************/

#define MSG_QUIT   0x0001 /* ............. ......... ... .......... ..... */

#define QUEUE_NAME "\\QUEUES\\special.que"	/* ... ........
						 * ...... ..... ....... \QUEUES\
#define INCL_DOS
#include 

int main(void)
.
	HQUEUE hQueue;	/* .... ..... ....... ..... ....... */
	APIRET rc;	/* ......... ...... ....... API */	
	PID	pid;	/* ............. ........, .......... ....... */

	/* ......... ....... */
	rc = DosOpenQueue(&pid, &hQueue, QUE_NAME);
	if (rc)
		return rc;

	rc = DosWriteQueue(hQueue, MSG_QUIT, 0L, NULL, 0L); /* .......... . ....... .........*/
	rc = DosCloseQueue(hQueue);                         /* ......... ....... */
	return rc;
.

. ...... ....... .. ...... ....... ....... . ....... ........ ...... ....... ......... ....... . .......... .... ............ .... ......... . .......... ...... (MSG_QUIT). ...... ......., ....... ... ........., ......... .... .......

........ ........, ... ....... DosCloseQueue() .. ...., ....... ..... ........ ... ...... ... ...... ....... ..... ......., ........ . .... ........

... . ... .. ............ ........ ..... .......? .... . ..., ... ... ............. .... .. .......... ..... .... . ........... ....... ....... ... ......, ..... .......... ......... .......... ....... ...... ....... .. ..... ...... ..... ...... .... ...... ....., ..... .... ....... ....... ....... . ..... ........ ... ......... .....-.. ......., .. ....... ...... ....... ...... ............ . ...... ...... ....... ....... ......., .. .. ........., .......... . ....... ... ... . ........ ..... .........

 

Test the program:

How to listen mp3, flac, ogg, monkey audio files? PM123 - universal audio player.

Komentarze:

Komentarz artykuЁu.


Twoje ImiЙ i Nazwisko:

TwСj E-Mail:

CODE:
......

  

TwСj Komentarz:


It's easy to maintain eComStation: a) Fast installation (20 minutes and it's ready), b) Universal drivers, replace a device - the system boots and continues work, c) Use eCS to recover damaged Windows (no danger to be infected by virus)

ArtykuЁy

Systemy operacyjne
Software
Hardware
Dla developerСw
RС©ne
Od autorСw





Ostatnie gЁosowanie: What is the height of RPM barrier?

[Google]

IBM OS/2 Warp

 
For dummies

Database of OS/2 compatible hardware

 
Reviews


     
  Why eComStation?
Features
Advantages
Usage
Clips and screenshots
   eComStation for
for businessmen
for students and engineers
for reselles of computers
community of users
   Developer
Distribute the program
Description of API, libraries
Start new project
Competition
   Applications
On-line catalogue
Select from eCo Market
   Support service
Contact the web-master
Buy eComStation
Frequently asked questions
for Beginners
 
 
© 2001 - 2021 eCo Software, All rights reserved
Сибирский Медведь технологическая компания
eComStation Serenity Systems International • OS/2 Warp IBM Corporation • ArcaOS Arca Noae