Моделювання однофазної системи, Детальна інформація
Моделювання однофазної системи
UINT uAmount1 = 0; //кількість
CLIENT Turn2[5000] = {0, 0, 0};
UINT uAmount2 = 0;
// code /////////////////////////////////////////////////////////////////////////////
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
//create semaphore
hSemaphore = CreateSemaphore(NULL, 1, 1, "JustASemaphore");
if(hSemaphore==NULL)
{
MessageBox(NULL, "Failed to create semaphore.", "Kursova", 0);
return 0;
}
DialogBoxParam(hInstance, (LPSTR)IDD_DIALOG1, NULL, (DLGPROC)WindowProc, 0);
return 0;
}
//*****
LRESULT CALLBACK WindowProc(HWND hWnd,UINT message,WPARAM wParam,LPARAM lParam)
{
switch(message)
{
case WM_COMMAND:
if(LOWORD(wParam) == IDC_QUIT)
SendMessage(hWnd, WM_CLOSE, 0, 0);
case WM_INITDIALOG:
//create clients generators
hClient1Thread = CreateThread(0, 0, (LPTHREAD_START_ROUTINE)Client1Thread,
hWnd, 0, &dwTread1ID);
hClient2Thread = CreateThread(0, 0, (LPTHREAD_START_ROUTINE)Client2Thread,
CLIENT Turn2[5000] = {0, 0, 0};
UINT uAmount2 = 0;
// code /////////////////////////////////////////////////////////////////////////////
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
//create semaphore
hSemaphore = CreateSemaphore(NULL, 1, 1, "JustASemaphore");
if(hSemaphore==NULL)
{
MessageBox(NULL, "Failed to create semaphore.", "Kursova", 0);
return 0;
}
DialogBoxParam(hInstance, (LPSTR)IDD_DIALOG1, NULL, (DLGPROC)WindowProc, 0);
return 0;
}
//*****
LRESULT CALLBACK WindowProc(HWND hWnd,UINT message,WPARAM wParam,LPARAM lParam)
{
switch(message)
{
case WM_COMMAND:
if(LOWORD(wParam) == IDC_QUIT)
SendMessage(hWnd, WM_CLOSE, 0, 0);
case WM_INITDIALOG:
//create clients generators
hClient1Thread = CreateThread(0, 0, (LPTHREAD_START_ROUTINE)Client1Thread,
hWnd, 0, &dwTread1ID);
hClient2Thread = CreateThread(0, 0, (LPTHREAD_START_ROUTINE)Client2Thread,
The online video editor trusted by teams to make professional video in
minutes
© Referats, Inc · All rights reserved 2021