archive-com.com » COM » E » EFG2.COM

Total: 878

Choose link from "Titles, links and description words view":

Or switch to "Titles and links view".

  • Another Netscape Collabra Server User X MSMail Priority Normal Newsgroups borland public delphi winapi function RegisterService dwProcessID DWORD bShow Boolean Boolean const RSP SIMPLE SERVICE 1 Registers the process as a service process RSP UNREGISTER SERVICE 2 Unregisters the process as a service process type TRegisterServiceProcess function dwProcessID DWORD dwType DWORD BOOL stdcall var hModKernel HMODULE RegisterServiceProcess TRegisterServiceProcess begin if Win32Platform 0 then begin RegisterServiceProcess GetProcAddress hModKernel RegisterServiceProcess if RegisterServiceProcess

    Original URL path: http://www.efg2.com/Lab/Library/UseNet/2000/0427b.txt (2016-02-14)
    Open archived version from archive



  • 1 0 Newsgroups borland public delphi winapi On Fri 23 Apr 1999 11 02 27 0200 Louis wrote Hi I need a short and sweet way to know wheter my app is running under NT or not I know this will be some sort of API call but following logical searches in a MS SDK help file never works Thanx Louis Answer is DWORD GetVersion VOID with returned value Syntax

    Original URL path: http://www.efg2.com/Lab/Library/UseNet/1999/0423d.txt (2016-02-14)
    Open archived version from archive


  • bit Windows ShutDownFlag is either EWX REBOOT EWX SHUTDOWN or EWX LOGOFF function ChangeNTSecurityForShutdown Boolean This func changes security rights on a WinNT 4 0 machine to give app shutdown privileges Use proc ExitWindows32 to reboot or shutdown the machine var hToken THandle tkp Newt TTokenPrivileges retlength DWORD begin Result False if OpenProcessToken GetCurrentProcess TOKEN ADJUST PRIVILEGES TOKEN QUERY hToken False then begin Get the LUID for shutdown privilege if

    Original URL path: http://www.efg2.com/Lab/Library/UseNet/2000/0718b.txt (2016-02-14)
    Open archived version from archive


  • Another Netscape Collabra Server User Mime Version 1 0 Newsgroups borland public delphi winapi Shouldn t that be function IsWin98 Boolean begin Result Win32Platform VER PLATFORM WIN32 WINDOWS and Win32MajorVersion 4 and Win32MinorVersion 0 end Jeff Overcash Yorai Aminov TeamB wrote On Sat 24 Apr 1999 01 46 34 0900 Heedong Lim wrote is there a simple method deteting win98 function IsWin98 Boolean begin Result Win32Platform VER PLATFORM WIN32 WINDOWS

    Original URL path: http://www.efg2.com/Lab/Library/UseNet/1999/0423f.txt (2016-02-14)
    Open archived version from archive


  • set up variables etc GetEnvironmentVariable ComSpec PChar strCmdProcessor 255 strCmdProcessor strCmdProcessor C yourfile bat WinExec strCmdProcessor SW SHOWNORMAL continue on you can also pass extra parameters to be processed by your batch file if you format the string with them before passing it to WinExec NOTE WinExec will launch an asynchronous completely separate application which will run to conclusion with or without your program s presence If you want more

    Original URL path: http://www.efg2.com/Lab/Library/UseNet/2000/0223a.txt (2016-02-14)
    Open archived version from archive


  • comp lang pascal delphi misc jan adriaenssens wrote in message I want to start a dos app arp exe from within my app and redirect the outcome to a textfile I want to give the commandline arp exe a mac txt from within my delphi app when i do this shellexecute getdesktopwindow Open arp exe a mac txt nil SW SHOWNORMAL I then get an error in the dosbox about

    Original URL path: http://www.efg2.com/Lab/Library/UseNet/2000/0313a.txt (2016-02-14)
    Open archived version from archive


  • 128864 John Bouris wrote in message news 3acb37a2 1 2 dnews I know I ve seen this tip somewhere but I can t find it I want to stop the user from starting a second copy of my exe Place the following in the project DPR file VAR MutexHandle THandle begin Use Mutex to only allow one copy of XXXXX to be in memory at a time MutexHandle 0 TRY MutexHandle CreateMutex NIL TRUE TFormXXXXX IF GetLastError ERROR ALREADY EXISTS THEN BEGIN SetForegroundWindow FindWindow TFormXXXXX NIL CloseHandle MutexHandle END ELSE BEGIN Application Title XXXXX Application CreateForm TFormXXXXX FormXXXXX Application Run END FINALLY ReleaseMutex MutexHandle END end In several Delphi PC Magazine utilities Neil Rubenking uses a different approach Here s how Neil prevented two instances of his recent KeyClick utility from running TYPE THandles Record AppHandle HWnd WinHandle HWnd end VAR hMap THandle PH THandles begin hMap OpenFileMapping FILE MAP ALL ACCESS False MainMapName IF hMap 0 THEN first instance begin hMap CreateFileMapping FFFFFFFF NIL PAGE READWRITE 0 SizeOf THandles MainMapName PH MapViewOfFile hMap FILE MAP ALL ACCESS 0 0 0 Application Initialize Application Title KeyTick Application CreateForm TMainForm MainForm Application MainForm HandleNeeded PH AppHandle Application Handle PH WinHandle Application

    Original URL path: http://www.efg2.com/Lab/Library/UseNet/2001/0404a.txt (2016-02-14)
    Open archived version from archive


  • only call Synchronize once only one message and waiting for that to be handled In the main thread you then repeatably calls your drawing routine without letting the main thread handling any pending messages thats why your application seems locked Actually this approach is not multithreaded you just lets a thread activate a handler in the main thread You may want to use the second approach depending on other factors and call Application ProcessMessages in occationaly procedure TMarkoDraw UpdateCanvas begin while not Terminated do begin Canvas Pixels Random 300 Random 300 Random 16777215 Application ProcessMessages end end but that will call the ProcessMessages too often IMHO procedure TMarkoDraw UpdateCanvas const TimeBetweenCheck 100 Check every 100 millisecond var NextCheck DWORD begin NextCheck 0 Immediate check while not Terminated do begin Canvas Pixels Random 300 Random 300 Random 16777215 if NextCheck wrote Hello I have a question with regards to a simple example I am experimenting with involving a thread and graphics The question is right at the end Here s my thread TMarkoDraw class TThread private Private declarations Canvas TCanvas procedure UpdateCanvas protected procedure Execute override public constructor Create ACanvas TCanvas end And here s part of its implementation procedure TMarkoDraw Execute begin if Assigned Canvas then while not Terminated do Synchronize UpdateCanvas end procedure TMarkoDraw UpdateCanvas begin Canvas Pixels Random 300 Random 300 Random 16777215 end On my example form I have two buttons one creates the thread which runs it immediately and the other terminates the thread and frees it Now take a look at the Execute and UpdateCanvas procedures Just random colored pixels in a random area on the specified canvas In the above case the loop goes check if terminated if not paint pixel But what if I changed the above two procedures to procedure TMarkoDraw Execute

    Original URL path: http://www.efg2.com/Lab/Library/UseNet/1999/0305b.txt (2016-02-14)
    Open archived version from archive



  •