Jump to content

Search the Community

Showing results for tags 'delphi'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Delphi Questions and Answers
    • Algorithms, Data Structures and Class Design
    • VCL
    • FMX
    • RTL and Delphi Object Pascal
    • Databases
    • Network, Cloud and Web
    • Windows API
    • Cross-platform
    • Delphi IDE and APIs
    • General Help
    • Delphi Third-Party
  • C++Builder Questions and Answers
    • General Help
  • General Discussions
    • Embarcadero Lounge
    • Tips / Blogs / Tutorials / Videos
    • Job Opportunities / Coder for Hire
    • I made this
  • Software Development
    • Project Planning and -Management
    • Software Testing and Quality Assurance
  • Community
    • Community Management

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Delphi-Version

Found 236 results

  1. Specs: Delphi XE7, Windows 7 64bit laptop. There is a "rundll32.exe" that keeps running every day. Now, I know that this is used in various ways during regular Windows operations, like for instance, when you open the sound volumn applet (via taskbar icon) and select the speaker icon, the "rundll32" activates and runs services. The service is running a HDD file collection activity because my HDD light is on continuously. And after searching around the web for answers, I found many Delphi routines that end or kill a process by program name and process_id. I am using the PID to be more accurate. Then, I wrote an app to detect when this file or service runs and End or Kill its process via its PID, but the process does not end. I think I've tried all the methods that I found and still, this "rundll32.exe" file will not stop running. I am pretty sure that this is a backgroud (scheduled) task that can be turned off somewhere in "services.msc" but that method is not what I want to use in this case. This endeviour has stumped me and I want to figure it out in the route I am in now. Any advice or suggestions or code corrections on how to proceed would be greatly appreciated. function KillProcessTree(const PID: Cardinal): boolean; var hProc, hSnap, hChildProc : THandle; pe : TProcessEntry32; bCont : BOOL; begin Result := true; FillChar(pe, SizeOf(pe), #0); pe.dwSize := SizeOf(pe); hSnap := CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0); if (hSnap <> INVALID_HANDLE_VALUE) then begin if (Process32First(hSnap, pe)) then begin hProc := OpenProcess(PROCESS_TERMINATE{PROCESS_ALL_ACCESS}, false, PID); if (hProc <> 0) then begin Result := Result and TerminateProcess(hProc, 1); WaitForSingleObject(hProc, INFINITE); CloseHandle(hProc); end; bCont := true; while bCont do begin if (pe.th32ParentProcessID = PID) then begin KillProcessTree(pe.th32ProcessID); hChildProc := OpenProcess(PROCESS_TERMINATE{PROCESS_ALL_ACCESS}, FALSE, pe.th32ProcessID); if (hChildProc <> 0) then begin Result := Result and TerminateProcess(hChildProc, 1); WaitForSingleObject(hChildProc, INFINITE); CloseHandle(hChildProc); end; end; bCont := Process32Next(hSnap, pe); end; end; CloseHandle(hSnap); end; end; and. . . function Killtask2(exefilename: string): integer; Const process_terminate = $0001; Var Continueloop: Bool; Fsnapshothandle: THandle; fprocessentry32: TProcessentry32; Begin Result := 0; Fsnapshothandle := CreateToolhelp32Snapshot (Th32cs_snapprocess, 0); FProcessEntry32.dwsize := Sizeof(FPROCESSENTRY32); Continueloop := Process32First (Fsnapshothandle, FPROCESSENTRY32); while integer (continueloop) <> 0 do begin if (Uppercase(Extractfilename (FProcessEntry32. szexefile)) = Uppercase(Exefilename)) or (Uppercase(FProcessEntry32. Szexefile) = Uppercase(Exefilename)) then Result := Integer(TerminateProcess(OpenProcess(Process_terminate, BOOL (0), FProcessEntry32. Th32processid), 0)); Continueloop := Process32Next(Fsnapshothandle, FPROCESSENTRY32); end; CloseHandle(Fsnapshothandle); End; and this one. . . function KillTask(ExeFileName: string): Integer; const PROCESS_TERMINATE = $0001; var ContinueLoop: BOOL; FSnapshotHandle: THandle; FProcessEntry32: TProcessEntry32; begin Result := 0; FSnapshotHandle := CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0); FProcessEntry32.dwSize := SizeOf(FProcessEntry32); ContinueLoop := Process32First(FSnapshotHandle, FProcessEntry32); while Integer(ContinueLoop) <> 0 do begin if ((UpperCase(ExtractFileName(FProcessEntry32.szExeFile)) = UpperCase(ExeFileName)) or (UpperCase(FProcessEntry32.szExeFile) = UpperCase(ExeFileName))) then Result := Integer(TerminateProcess( OpenProcess(PROCESS_TERMINATE, BOOL(0), FProcessEntry32.th32ProcessID), 0)); ContinueLoop := Process32Next(FSnapshotHandle, FProcessEntry32); end; CloseHandle(FSnapshotHandle); end;
  2. kvik021

    SSL error

    After upgrade to Delphi 12, my multidevice app have trouble connecting to DSRestServer app Regarding server side ... I can execute TEST CONNECTION in DSRestConnection, I can CREATE CLIENT CLASSES UNIT in designer, but when I start app, it cannot connect Server app has not been changed. IOS version - everything works fine. Certificate checked - not expired. I use DigiCert one Old version of the app which is on GooglePLay works fine also. But when I run newly Android build-ed Version I get exception Project ccclient.apk raised exception class EJNIException with message 'javax.net.ssl.SSLHandshakeException: Read error: ssl=0xb400007b9e3f3cc8: Failure in SSL library, usually a protocol error error:100000f0:SSL routines:OPENSSL_internal:UNSUPPORTED_PROTOCOL (external/boringssl/src/ssl/handshake_client.cc:713 0x7c35c4f803:0x00000000)'. First chance exception at $BE81BED3. Exception class ENetHTTPCertificateException with message 'javax.net.ssl.SSLHandshakeException: Read error: ssl=0xeadc39c8: Failure in SSL library, usually a protocol error error:100000f0:SSL routines:OPENSSL_internal:UNSUPPORTED_PROTOCOL (external/boringssl/src/ssl/handshake_client.cc:713 0xd07d1357:0x00000000)'. Process ccclient.apk (30412) I use Samsung a71 as target with OneUI version 5.1 and android 13. All SSL protocols checkboxes in DSRestConnection are checked. I try to check one by one I got same error on all protocols. I saw some post with howto put OpenSSL libs in app but idk how (and I cant find him again). Any help will be appreciated...
  3. shineworld

    union with bitfields

    Hi all. I've to convert a Builder C++ code to Delphi which uses bitfiels in union and I don't know where to start and if it is possible: // define QCL data types typedef short QCL_WORD; typedef union { QCL_WORD data; struct { QCL_WORD alarm_state :1; // bus flags: alarm state QCL_WORD alignment_state :1; // bus flags: alignment state QCL_WORD inversion_wait :1; // bus flags: external synchronism - inversion wait QCL_WORD out_of_min_bound :1; // bus flags: column position is out of minimum boundaries QCL_WORD out_of_max_bound :1; // bus flags: column position is out of maximum boundaries QCL_WORD below_safety_height :1; // bus flags: column position is below safety height QCL_WORD in_working_pos :1; // bus flags: column position is in working position QCL_WORD locking_latch_state :1; // bus flags: column position in locking latch state QCL_WORD battery_warning :1; // bus flags: column in battery warning QCL_WORD battery_alarm :1; // bus flags: column in battery alarm QCL_WORD evr_state :1; // bus flags: column EVR state QCL_WORD load_weight_zone :2; // bus flags: column in load weight zone QCL_WORD column_is_consistent :1; // bus flags: column in load weight zone QCL_WORD lift_set_acquire_req :1; // bus flags: columns lift set acquire request QCL_WORD movement_mode_absolute :1; // bus flags: column has movement mode absolute } fields; } t_bus_flags_w4; Thanks in advance for any suggestion. Best regards
  4. tinyBigGAMES

    CPas - C for Delphi

    Overview What if you were able to load and use C99 sources directly from Delphi? There is a vast quantity of C libraries out there and being able to take advantage of them, without being a pain would be nice. You could even compile a bunch of sources and save them as a library file, then load them back in from disk, a resource or even from a stream. You can get the symbols, map to a C routine, and execute from the Delphi side all from a simple API. Downloads Releases - These are the official release versions. Features Free for commercial use. Allow C integration with Delphi at run-time. Support Windows 64-bit platform. Support for C99. Fast run-time compilation. Can run C sources directly or compile to (.LIB, .EXE, .DLL). Library files can be loaded and used at run-time from a file, a resource or stream. Import symbols directly from a dynamic linked library (.DLL) or module-definition (.DEF) file. You can reference the symbols from Delphi and directly access their value (mapping to a routine and data). Your application can dynamically or statically link to CPas. Direct access to the vast quantity of C99 libraries inside Delphi. Minimum System Requirements Delphi 10 (Win64 target only) FreePascal 3.3.3 (Win64 target only) Microsoft Windows 10, 64-bits 20MB of free hard drive space How to use in Delphi Unzip the archive to a desired location. Add installdir\sources, folder to Delphi's library path so the CPas source files can be found for any project or for a specific project add to its search path. Add installdir\bin, folder to Windows path so that CPas.dll file can be found for any project or place beside project executable. See examples in installdir\examples for more information about usage. You must include CPas.dll in your project distribution when dynamically linked to CPas. See CPAS_STATIC define in the CPas unit file. See installdir\docs for documentation. A Tour of CPas CPas API You access the easy to use API in Delphi from the CPas unit. {.$DEFINE CPAS_STATIC} //<-- define for static distribution type { TCPas } TCPas = type Pointer; { TCPasOutput } TCPasOutput = (cpMemory, cpLib); { TCPasExe } TCPasExe = (cpConsole, cpGUI); { TCPasErrorMessageEvent } TCPasErrorEvent = procedure(aSender: Pointer; const aMsg: WideString); { Misc } function cpVersion: WideString; { State management } function cpNew: TCPas; procedure cpFree(var aCPas: TCPas); procedure cpReset(aCPas: TCPas); { Error handling } procedure cpSetErrorHandler(aCPas: TCPas; aSender: Pointer; aHandler: TCPasErrorEvent); procedure cpGetErrorHandler(aCPas: TCPas; var aSender: Pointer; var aHandler: TCPasErrorEvent); { Preprocessing } procedure cpDefineSymbol(aCPas: TCPas; const aName: WideString; const aValue: WideString); procedure cpUndefineSymbol(aCPas: TCPas; const aName: WideString); function cpAddIncludePath(aCPas: TCPas; const aPath: WideString): Boolean; function cpAddLibraryPath(aCPas: TCPas; const aPath: WideString): Boolean; { Compiling } procedure cpSetOuput(aCPas: TCPas; aOutput: TCPasOutput); function cpGetOutput(aCPas: TCPas): TCPasOutput; procedure cpSetExe(aCPas: TCPas; aExe: TCPasExe); function cpGetExe(aCPas: TCPas): TCPasExe; function cpAddLibrary(aCPas: TCPas; const aName: WideString): Boolean; function cpAddFile(aCPas: TCPas; const aFilename: WideString): Boolean; function cpCompileString(aCPas: TCPas; const aBuffer: string): Boolean; procedure cpAddSymbol(aCPas: TCPas; const aName: WideString; aValue: Pointer); function cpLoadLibFromFile(aCPas: TCPas; const aFilename: WideString): Boolean; function cpLoadLibFromResource(aCPas: TCPas; const aResName: WideString): Boolean; function cpLoadLibFromStream(aCPas: TCPas; aStream: TStream): Boolean; function cpSaveOutputFile(aCPas: TCPas; const aFilename: WideString): Boolean; function cpRelocate(aCPas: TCPas): Boolean; function cpRun(aCPas: TCPas): Boolean; function cpGetSymbol(aCPas: TCPas; const aName: WideString): Pointer; { Stats } procedure cpStartStats(aCPas: TCPas); function cpEndStats(aCPas: TCPas; aShow: Boolean): WideString; If you want CPas to be statically bound to your application, enable the {$CPAS_STATIC} define in the CPas unit. How to use A minimal implementation example: uses System.SysUtils, CPas; var c: TCPas; // CPas error handler procedure ErrorHandler(aSender: Pointer; const aMsg: WideString); begin WriteLn(aMsg); end; begin // create a CPas instance c := cpNew; try // setup the error handler cpSetErrorHandler(c, nil, ErrorHandler); // add source file cpAddFile(cp, 'test1.c'); // link and call main cpRun(cp); finally // destroy CPas instance cpFree(c); end; end. Compatibility These are some libraries that I've tested. If you have tried more, let me know and I can add them to the list. miniaudio (https://github.com/mackron/miniaudio) raylib (https://github.com/raysan5/raylib) sfml (https://github.com/SFML/CSFML) stb_image (https://github.com/nothings/stb) stb_image_write (https://github.com/nothings/stb) stb_truetype (https://github.com/nothings/stb) stb_vorbis (https://github.com/nothings/stb) Media ❤ Made in Delphi
  5. PawelPepe

    Access to Dropbox/Google Drive/One Drive

    Hi, I would like to ask you about some help with accessing Cloud Services like Dropbox / Google Drive / Microsoft One Drive. As far as I know, every Cloud gives access by some API. I want to be able to send a file (text file or Image file) into one of this services. Is that possible? I mean: 1. User launches my application 2. Loads an Image (for example bitmap.bmp) 3. Chooses Cloud service provider 4. Uploads file into cloud and generates download link I assume that user has full access to cloud service (has an account, password and all needed authorization data). Have any of you dealt with such an issue? Where can I find some help? Maybe some example code? Where to start? -Pawel
  6. Ali Dehban

    ChatGPT plug-in for RAD Studio.

    Hello, everybuddy. Recently I made a plug-in for Delphi to use ChatGPT inside the IDE. The main service is ChatGPT but it's actually multi-AI support, you can get responses from three different sources, compare and decide. I hope this can be helpful and accelerate your work. Repository: https://github.com/AliDehbansiahkarbon/ChatGPTWizard Key features: - Free text question form. - Dockable question form. - Inline questions(in the editor). - Context menu options to help you to find bugs, write tests, optimize code, add comments, etc... - Class view. - Predefined Questions for class view. - History to save your tokens on OpenAI ! - Fuzzy string match searches in the history. - Animated letters(Like the website). - Proxy server options. - Supports Writesonic AI (https://writesonic.com) - Support YouChat (https://you.com) Short Video 1: Short Video 2 - Inline Questions: Full Video (ver. 2.0):
  7. Hey, I have got a serious problem with detecting Windows Clipboard changes. I am trying to write simple application that detects clipboard changes and offers to user some actions. To make it work I capture the WM_CLIPBOARDUPDATE message (Of course, I first add listening options -> AddClipboardFormatListener(Handle); which I release when exiting the program -> RemoveClipboardFormatListener(Handle);). And it works. I respond when the clipboard has an image (Clipboard.HasFormat(CF_PICTURE)) or text (Clipboard.HasFormat(CF_TEXT)). BUT - apparently this message is sent when I run system services (even though the clipboard contents DO NOT CHANGE), e.g. Computer Management (compmgmt.msc) Event Viewer (eventvwr.msc) Performance Monitor (perfmon.msc) and probably other programs I don't know about. Why!!!!? That is, it only happens when the clipboard has some content (if it is empty, nothing happens). If it has text or an image or anything else - my application receives a message about changing the contents of the clipboard (which is in fact the same - nothing changes). Why do these services send WM_CLIPBOARDUPDATE? Or in other words - what to do to ignore this specific situation (i.e. I receive the message, but I don't want to react - because nothing has changed in the clipboard). Somehow I don't see anything in the Clipboard implementation in Delphi that would help me... Thanks for any help, -Pawel
  8. Dllama, a simple and easy to use library for doing local LLM inference directly from Delphi (any language with bindings). It can load GGUF formatted LLMs into CPU or GPU memory. Uses Vulkan back end for acceleration. Simple Example uses System.SysUtils, Dllama, Dllama.Ext; var LResponse: string; LTokenInputSpeed: Single; LTokenOutputSpeed: Single; LInputTokens: Integer; LOutputTokens: Integer; LTotalTokens: Integer; begin // init config Dllama_InitConfig('C:\LLM\gguf', -1, False, VK_ESCAPE); // add model Dllama_AddModel('Meta-Llama-3-8B-Instruct-Q6_K', 'llama3', 1024*8, '<|start_header_id|>%s %s<|end_header_id|>', '\n assistant:\n', ['<|eot_id|>', 'assistant']); // add messages Dllama_AddMessage(ROLE_SYSTEM, 'you are Dllama, a helpful AI assistant.'); Dllama_AddMessage(ROLE_USER, 'who are you?'); // display the user prompt Dllama_Console_PrintLn(Dllama_GetLastUserMessage(), [], DARKGREEN); // do inference if Dllama_Inference('llama3', LResponse) then begin // display usage Dllama_Console_PrintLn(CRLF, [], WHITE); Dllama_GetInferenceUsage(@LTokenInputSpeed, @LTokenOutputSpeed, @LInputTokens, @LOutputTokens, @LTotalTokens); Dllama_Console_PrintLn('Tokens :: Input: %d, Output: %d, Total: %d, Speed: %3.1f t/s', [LInputTokens, LOutputTokens, LTotalTokens, LTokenOutputSpeed], BRIGHTYELLOW); end else begin Dllama_Console_PrintLn('Error: %s', [Dllama_GetError()], RED); end; Dllama_UnloadModel(); end.
  9. Hey, I am trying to write simple application that works with Windows Clipboard (capture Clipboard changes (WM_CLIPBOARDUPDATE) and do some actions. Application uses TTrayIcon component. So, I can hide main window in notification area. If user press Print Screen button or copy text into Clipboard my application do some actions. One of the features is to show user a message (with some description text, icon etc) when application is hidden in tray. I do not use TTrayIcon Balloon hint (it is not good for me). Instead, I created second form and display it when clipboard change its content. It works fine, when application main window is visible (on screen). I set some options in form OnShow event and do some animation (to slide from right screen corner) in OnActivate event. It is OK. When application main window is hidded there is a big problem! What I do: Form2.Show; -> OnShow And OnActivate events are fired. BUT, if I show form2 again (second, third time), only OnShow event is fired - OnActivate event is not working! WHY? I hide mainform to Tray: Application.ShowMainForm := False; MainFrm.Hide; ShowWindow(Application.Handle, SW_HIDE); And I show it using: MainFrm.Show; Application.ShowMainForm := True; ShowWindow(Application.Handle, SW_SHOW); Application.BringToFront(); -Pawel
  10. limelect

    Drag and DPR

    I thought it was me but it was NOT 2 computers on one Delphi 10..2.3 Windows 7 the other windows 10 and Delphi 11 on both the same problem 1. while changing component sources DPR changes to requires>>rrequires contains>>ocontains end>>d 2 drag does not work in IDE it works only under explorer since both problems are on different computers and IDE it is Delphi!!!!
  11. Hey Y'All, Official launch of the 1 Billion Row Challenge Happy coding and don't forget to have fun!! Cheers, Gus
  12. Dear visitors, We like to inform you that new version of NextSuite6 is released. Click here to read the release news. This update introduces a new grid view: StacksGridView, where columns from a each row are stacked into groups:  Click here for Online Store and Prices . NextSuite includes always growing set of VCL components. Most important components are: NextGrid6 (StringGrid/ListView replacement, written from scratch). NextDBGrid6 (Db variant of the grid) NextInspector6 - An object inspector component. Next Collection 6 - A set of smaller components that are both useful and easy to use. Next Canvas Application - a drawing application that wysiwyg convert your drawings into a valid Delphi TCanvas code.   and many more.  Few screenshots:      Download big demo project from: http://www.bergsoft.net/downloads/vcl/demos/nxsuite6_demo.zip Boki (BergSoft) boki@bergsoft.net | LinkedIn Profile -- BergSoft Home Page: www.bergsoft.net Members Section: users.bergsoft.net Articles and Tutorials: help.bergsoft.net (Developers Network) -- BergSoft Facebook page -- Send us applications made with our components and we will submit them in news article. Link to this page will be also set on home page too.
  13. Dear visitors, We like to inform you that new version of NextSuite6 is released. Click here to read the release news. Click here for Online Store and Prices . NextSuite includes always growing set of VCL components. Most important components are: NextGrid6 (StringGrid/ListView replacement, written from scratch). NextDBGrid6 (Db variant of the grid) NextInspector6 - An object inspector component. Next Collection 6 - A set of smaller components that are both useful and easy to use. Next Canvas Application - a drawing application that wysiwyg convert your drawings into a valid Delphi TCanvas code.   and many more.  Few screenshots:      Download big demo project from: http://www.bergsoft.net/downloads/vcl/demos/nxsuite6_demo.zip Boki (BergSoft) boki@bergsoft.net | LinkedIn Profile -- BergSoft Home Page: www.bergsoft.net Members Section: users.bergsoft.net Articles and Tutorials: help.bergsoft.net (Developers Network) -- BergSoft Facebook page -- Send us applications made with our components and we will submit them in news article. Link to this page will be also set on home page too.
  14. When compiling delphi fmx app using xcode 15.3 and 15.4 (beta) with IOS 17.4. The Delphi IDE returns the following error "Debbuging the application on device running IOS 17 or later is currently not supported." I urgently need to debug my app but I can't even use the IOS simulator. I'm using Delphi 12 but I've already tried it in Delphi 11.3
  15. Good day, I would like to have ability in my project to show certificate details of signed executables. (From other executables) Is that possible with Delphi? Would love to get hints 'how-to'! //edit For now I have ability to get raw data thats appended to executables (overlay data) by simply check PE header for filesize and compare with real physical filesize.
  16. I have this routine that lists all running processes in a listbox under Windows 7. However, it is not a complete list as I thought, because when I load up the Task Manager, it has more entries (when I select '[y] show processes from all users'). Here is a complete project listing showing two working methods to obtain the running processes into a listbox. The only limitations with these are that they show less entries than what the Task Manager shows. Question: How do I obtain that same listing in delphi that the Task Manager shows? TIA. unit Unit1; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ExtCtrls, Vcl.ComCtrls; type TForm1 = class(TForm) Panel1: TPanel; PageControl1: TPageControl; TabSheet1: TTabSheet; TabSheet2: TTabSheet; m1: TMemo; lb1: TListBox; btnGetProcesses1: TButton; Splitter1: TSplitter; btnPause: TButton; st1: TStaticText; btnGetProcesses2: TButton; procedure btnPauseClick(Sender: TObject); procedure btnGetProcesses2Click(Sender: TObject); procedure btnGetProcesses1Click(Sender: TObject); private { Private declarations } public { Public declarations } procedure GetProcesses_1; procedure GetProcesses_2; end; var Form1: TForm1; ts: tstrings; n: integer=0; // out counter for the listbox of items. implementation {$R *.dfm} uses tlHelp32; procedure tform1.GetProcesses_1; // #1 var handler: THandle; data: TProcessEntry32; PID: cardinal; function GetName: string; var i:byte; begin Result := ''; i := 0; while data.szExeFile[i] <> '' do begin Result := Result + data.szExeFile[i]; //PID := data.th32ProcessID; Inc(i); end; end; begin n:=0; ts:=tstringlist.Create; Data.dwSize := SizeOf(Data); form1.DoubleBuffered:=true; lb1.DoubleBuffered := true; lb1.Items.BeginUpdate; lb1.Items.Clear; lb1.Sorted:=true; handler := CreateToolhelp32Snapshot(TH32CS_SNAPALL, 0); if Process32First(handler, data) then begin ts.Add(GetName()); //lb1.Items.Add({inttostr(data.th32ProcessID) + ': '+}GetName()); while Process32Next(handler, data) do begin ts.Add(GetName()); inc(n); //lb1.Items.Add({inttostr(data.th32ProcessID) + ': '+}GetName()); end; end else ShowMessage('Error'); lb1.Items.EndUpdate; lb1.Items.Assign(ts); st1.Caption := inttostr(n); ts.Free; end; procedure TForm1.btnGetProcesses1Click(Sender: TObject); begin GetProcesses_1; end; procedure tform1.getprocesses_2; // method #2, from https://www.vbforums.com/showthread.php?350779-Delphi-Getting-Running-processes-into-a-List-Box-and-Kill-Selected var MyHandle: THandle; Struct: TProcessEntry32; begin n:=0; try MyHandle:=CreateToolHelp32SnapShot(TH32CS_SNAPPROCESS, 0); Struct.dwSize:=Sizeof(TProcessEntry32); if Process32First(MyHandle, Struct) then form1.lb1.Items.Add(Struct.szExeFile); while Process32Next(MyHandle, Struct) do begin form1.lb1.Items.Add(Struct.szExeFile); inc(n); end; except on exception do ShowMessage('Error showing process list'); end end; procedure TForm1.btnGetProcesses2Click(Sender: TObject); // method #2 begin n:=0; getprocesses_2; st1.Caption := inttostr(n); end; end.
  17. The app I'm working on has different "screens", which are each essentially large bitmaps. When closing a screen to go to the next one, the following code provides a fade-to-black transition effect: procedure TGameBaseScreen.FadeOut; var Steps: Cardinal; i: Integer; P: PColor32; StartTickCount: Cardinal; IterationDiff: Integer; RGBDiff: Integer; const TOTAL_STEPS = 32; STEP_DELAY = 12; begin Steps := 0; StartTickCount := GetTickCount; while Steps < TOTAL_STEPS do begin IterationDiff := ((GetTickCount - StartTickCount) div STEP_DELAY) - Steps; if IterationDiff = 0 then Continue; RGBDiff := IterationDiff * 8; with ScreenImg.Bitmap do begin P := PixelPtr[0, 0]; for i := 0 to Width * Height - 1 do begin with TColor32Entry(P^) do begin if R > RGBDiff then Dec(R, RGBDiff) else R := 0; if G > RGBDiff then Dec(G, RGBDiff) else G := 0; if B > RGBDiff then Dec(B, RGBDiff) else B := 0; end; Inc(P); end; end; Inc(Steps, IterationDiff); ScreenImg.Bitmap.Changed; Changed; Update; end; end; Is there any way this same code can be modified to create a new FadeIn; procedure which allows the screen images to fade-in-from-black? I'm guessing I need to first specify that RGB := 0, 0, 0 and then increase the RGB values until they reach the actual bitmap values. Do I first need to "get" those values somehow? Or, is there a better way to achieve the Fade In/Out procedures? (note that we're dealing with combined bitmaps here, rather than single images)
  18. Hey, i updated RAD Studio to version 12 last week. Now i wanted to update my app to work with the new android play store requirements. While testing my features i found out, that my app keeps on hanging on a black screen when i try to import a text file with a file explorer. When i manually close the app, and choose a text file and open it with my app it is working fine, but when i open the app, and then go back to my file explorer select the text file to open it again it hangs in a black screen. I tried it also with a completely new project and had the same result. I am using a Pixel 8 with Android 14. I added this intent filter to my AndroidManifest.template.xml in the activity section: <activity android:name="com.embarcadero.firemonkey.FMXNativeActivity" android:exported="true" android:label="%activityLabel%" android:configChanges="orientation|keyboard|keyboardHidden|screenSize|screenLayout|uiMode" android:launchMode="singleTask"> ... <intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <data android:mimeType="text/plain" /> </intent-filter> </activity> And handle it like that: var currentIntent := MainActivity.getIntent(); HandleIntentAction(currentIntent); The handling works like a charm. When starting the app in debugging nothing happens, also logcat is showing noting in regards of my app. I also added some ShowMessages to the FormCreate functions, but also nothing. I added two logcat logs as an attachment to this post. In my opinion there is nothing wrong in the not working log. In addition to the hanging, is there a possibility to open a view directly with an intent because when i try to do a form.show it wont show up, but i haven't followed up on this issue because i wanted to resolve the black screen first. Thank you in advance! Kind regards, Dominik not_working.log working.log
  19. Hello everyone, I'm seeking insights on database development practices in Delphi with Firebird. I have two specific questions: When it comes to database development in Delphi, what is the recommended approach: utilizing data-aware components like drag-and-drop fields and linking with TFDQuery for CRUD operations, or segregating CRUD operations into separate units for forms? I'm particularly interested in understanding the balance between ease of use, efficiency and code usability. Any insights or examples you can provide would be greatly appreciated. Often, we encounter situations where we need to fix a bug or implement changes in just one form out of many (over 100 forms) within our system. Currently, we update the complete executable, which includes all VCL forms in one project. What would be the best approach to handle such incremental updates efficiently without impacting all clients? I'm eager to learn about effective strategies in this scenario. Thank you for your valuable input. Warm regards, Noor
  20. Mandy.Rowlinson

    Delphi Certified Developer Exam

    Hi, Anyone went through the Delphi Certified Developer Exam recently ? What sort of questions you got asked ? Any tips to pass the exam ? Thank you.
  21. I have a pascal project and looking for a static scanning tool for security code review for the Pascal programming language. All the tools out there that i found so far were only for performance code review and not for security. Anyone knows a tools that can do the job? Some scanning tool and I expect it to help me find security flaws in my project, but couldn't find a good security tool.
  22. We have an application built in Delphi XE6. We are using the component named 'TppReport' from the report builder to generate the reports. Currently, we are facing an issue while exporting the report. The application can generate and export the report in the respective format for the first time. However, when we try to export it for the second consecutive time, the file is not generated. If we restart the application then the report is generated and exported only for the first time instance. When we tried to debug this behavior we came to know that we were getting an access violation error in the RequestPage procedure inside that generate method of ppEngine.pas file. This error comes up when we execute the line CustomReport.PrintReport. This happens when we have bands in the report. Below are more details - Delphi Version - XE6 Version 20.0.16277 Report Builder Version - 20.04 Build 302 Any help would be appreciated.
  23. I have installed PowerPDF in Delphi 12 via GitHub. The master package in Git seems to be made ready for Delphi12 (there is an 11AndAbove subdir). In previous Delphi versions I used to install PowerPDF via GetIt, but the package still is not available. After about 3 months I can no longer wait. Anyway, it looks like the installation was a success: all controls are in place, and I can drop a TPrReport component on a form. However, the next step, i.e. to drop a TPrPage, fails, showing the "Class Arial not found" message. Since a TPrPage is the container for all other PowerPDF controls, the package is unusable. I have no idea how to get it to work. Do you? I very much appreciate your help or hints.
  24. Hi in delphi 12 show this error [DCC Error] E2597 ld: file not found: /usr/lib/swift/libswiftUIKit.dylib Which framework do I need to add? Delphi 12 , XCODE 13.4 Thanks
×