Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Semaphor := CreateSemaphore(nil, 0, 1, '_EEG32_');
- if ((Semaphor <> 0) and (GetLastError = ERROR_ALREADY_EXISTS)) then
- begin
- Wnd := FindWindow(PChar('Deymed_EEGACq'), nil);
- if Wnd = 0 then
- begin
- Wnd := FindWindow(PChar('TServerForm'), nil);
- if Wnd <> 0 then
- TBoxes.Error('Cannot start TruScan Acquisition while TruScan UDP Server is running.');
- end;
- if (Wnd <> 0) then
- begin
- Popup := GetWindowLong(Wnd, GWL_HWNDPARENT);
- if IsIconic(Popup) then
- ShowWindow(Popup, SW_RESTORE);
- SetForegroundwindow(Popup);
- end;
- CloseHandle(Semaphor);
- Halt;
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement