Search the Community
Showing results for tags 'delphi'.
Found 255 results
-
I've been experimenting with an integrated playground IDE plugin for the Sempare Template Engine ( https://github.com/sempare/sempare-delphi-template-engine or via GetIt). The template engine is available under Apache 2.0 and has been around for years, and has backward capability back to XE4. The playground plugin is similar to the standalone playground demo app that exists in the project. Anyways, I decided it was time to have a richer IDE experience. My initial development currently it supports: - highlighting (script tags, comments, numbers, strings) - toggling whitespace visibility - IDE Options Dialog allows you to customise options (overriding defaults which are IDE theme aware) - Supports prototyping templates against mock data (in json files) - Supports script tags <% %> or {{ }} - Real-time validation of templates and evaluation/preview - Preview as raw text or in a browser As I changed the license of the template engine to be Apache from GPL, this will be available initially to supporters of the project. More to follow... Any other ideas/improvement suggestions welcome. Here are some screenshots:
-
Installing Delphi 12.2 Inline patch 1 - no android support .. [Resolved]
JohnLM posted a topic in Cross-platform
This is so frustrating, every time I reinstall Delphi, I have to do something in order to get the Android functions to work for deployment. I have those familiar 3 triangles, and I just can't remember what I did the last time to resolve it, and I can't find it here where I i know I posted it. Does anyone know what I need to do to clear those yellow triangles in SDK Manager? -
I have a problem with my DataSnap client application on Android 11 OS. Not every time but from time to time and on different places in my code. Sometimes I recive this message When i click Break debuger points on this line in code What can be a problem
-
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...
-
Integrate Google Sign-In with Android's Credential Manager in Delphi
Build3999 posted a topic in I made this
Greetings to All!. I've built (TSignInWithGoogle) a basic component to integrate Google Sign-in into your Android app using Credential Manager, adhering to Google's most recent guidelines. I'll leave it here for anyone who might find it useful!. Here the link: https://github.com/MEStackCodes/SignInWithGoogleDelphi-
- android
- googlesignin
-
(and 1 more)
Tagged with:
-
Hi, does anyone ever tried to install Android APK in Fusion Hybrid Tablets? https://www.touchdynamic.com/products/mobile-pos-tablets/fusion-tablet-solution/ This is their manual & specs: https://www.touchdynamic.com/wp-content/uploads/2024/09/TD_FusionHybrid_SpecSheet5.pdf I'm not sure if it's something with their processor architecture (Intel® Elkhart Lake Celeron® J6412 up to 2.6 Ghz System), as I'm unable to install any APK built and deployed in Delphi, neither MSBuild, anything.... I just get a message from the OS stating "App not installed as app isn't compatible with your tablet ". I've also tried to change dproj to support other architectures but without results. <PropertyGroup Condition="'$(Base)'=='Android'"> ... <AndroidSupportedAbis>x86;x86_64;armeabi-v7a;arm64-v8a</AndroidSupportedAbis> ... </PropertyGroup> Other thing I did is changing where lib is deployed but likewise, no results. Not a clue what's going on.
-
-
Execution time difference between 32b and 64b, using static arrays
lg17 posted a topic in General Help
Hi all. I observe a noticable difference of execution time for the same code, compiled in 32 bits and 64 bits. The following code is an extract of a more complex application. If you run it, it will always take much more time in 64 bits than in 32 bits. The code can be tested using arrays of 1, 2 or 3 floats (option 1,2 and 3). If I look at the assembly code in debug mode, it is different in 32b and 64b. Any idea how to make the 64 bits version run as fast as the 32 bits one? (Compilation options or code adjustments?) Thanks. Note: I'm using Delphi 12.1 Here is the code: Type {$IF Defined(WIN64)} t_reel = double; {$ELSE} t_reel = single; {$ENDIF} t_vect1 = Array[0..0] OF t_reel; t_vect2 = Array[0..1] OF t_reel; t_vect3 = Array[0..2] OF t_reel; const k_vect1_nul : t_vect1 = (0.0); k_vect2_nul : t_vect2 = (0.0, 0.0); k_vect3_nul : t_vect3 = (0.0, 0.0, 0.0); procedure test(); var iLoop:integer; l_SW1:TStopwatch; l_vec1: t_vect1; l_vec2: t_vect2; l_vec3: t_vect3; begin l_SW1:=TSTopWatch.StartNew; iLoop:=0; while (iLoop<900000000) do begin //l_vec1 := k_vect1_nul; //option 1 //l_vec2 := k_vect2_nul; //option 2 l_vec3 := k_vect3_nul; //option 3 inc(iLoop); end; l_SW1.Stop; Showmessage(intToStr(l_SW1.ElapsedTicks)+' ticks / '+intToStr(l_SW1.ElapsedMilliseconds)+' ms'); end; -
I am developing an android application on Delphi 12. My application connects to a DataSnap server. Some times, but not every time, my application throws this exception. Once when the application starts, the second time when a new form is opened and sometimes everything works without error I suppose everything crashes on line 312 in this module Those any one know the reason of this?
-
As a retired developer i'm a bit rusty (71 years) , and now i have run into a problem. I created a small windowsapplication using Delphi community edition 10.4 (i think) on Windows 10. The CCR.Exif worked perfectly. Since then i have upgraded to Windows 11 and to Delphi 11 build 3. Now when i try to compile my project i get a lot of errors on CCR.Exif files. Here it seems that the CCR.Exif is not recognised (Pic1). Then i tried to create a small application and added all CCR files to the project. This gave me the error in Pic2. I hope there might be a simple solution to this and someone can help? Please?
-
Hello, I am working with Rad Studio and I need to make an application in Delphi for the phone that connects via USB to an Esp32 and sends and receives data. I didn't find anything available for delphi, so I chose to download a java library that handles it(https://github.com/mik3y/usb-serial-for-android), downloaded the .jar and converted it to .pas with java2op, but now I can't find a way to use the methods correctly and have the devices detected. by usb. Could you see this system, tell me how I could call the classes and methods in the interface or do you have some direct form of Delphi that allows me to make the connections with the USBs or at least see the connected devices usb-serial-for-android-3.8.0.jar JavaInterfaces.pas
-
DataSnap Could not convert variant of type (Array Byte) into type (Integer)
dlucic posted a topic in Network, Cloud and Web
I have simple DataSnap server application with connection to MS SQL Server and also simple client application. On the server side I have TFDConnection object to connect to MS SQL Server. I also have TFDQuery with simple sql "insert into slika_test (slika) values (:slika)". Param slika is for image datatype in table test_slika. This is properties of Param slika of TFDQuery object Of course, there is DataSetProvider object On the client side I have TSQLConnection and DSProviderConnection object's. I connect to DataSnap server application with them. There is also TClientDataSet object This is code for click on Button I load image from Image1 object on the form into MemoryStream. Than I put that MemoryStream in Param of ClientDataSet object and execute. When I do that for the first time everything goes well. Data is stored in MS SQL table. But when I click it another time and same code executes I receive this error on the server application Any body knows what is the problem? -
I have a problem when my andoroid device lost wifi and connection broke. I can not reestablished that in ordinary maner. My andorid application have TSQLConnection object that connects to DataSnap server application. Everything works fine until I issue network problem. When wifi temporarly lost connection TSQLConnection also lost connection and I get Socket error #103 when I try to open TClientDataSet and that is OK. When I try it once again it works fine. I supose my application successfuly reconnect and open the query. But when I tryed it for the third time I have Socket error # 104. And again. Once OK another time Socket error #104. There is no problems when wifi connection is stable. What should I do?
-
I am having trouble figuring this one out. I have a form with a tscrollbox and an timage. In the image1MouseMove event of the timage I have the following code; procedure TForm2.im1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); begin scrollbox1.vertScrollBar.Position := x; scrollbox1.horzScrollBar.Position := y; end; But it is not what I'd expect. What I am trying to do: 1. Lets say I have screenshot of my desktop and inserted into the timage. 2. And I resize the app's form smaller 3. Using the mouse, I want to click on the image and drag (or pan) around inside the form's scrollbox area so that I can see other parts of the image. What am I doing wrong and how can I fix this? TIA
-
Installed 12.2 4 days ago and after install I used Getit to install a component and all worked Ok. Next day (and every day since) I have started Getit and keep getting 'No Results Found', even though it shows results in the 'New In Getit' and 'Promoted In Getit' sections of the welcome page. Is anybody else having this problem or is Getit simply not working at the moment? Bill Zwirs
-
I am converting all my internet support code to use native TNetHttpClient and TNetHttpRequest components. I am getting the exception "No mapping for the Unicode character exists in the target multi-byte code page" for some web pages I am downloading using the function shown below. Here is an instance where the exception occur: GetText('https://www.google.com/index.html'); I assume this is an encoding issue. What is the best way to handle this to get my string result? function TIndigoHttp.GetText (const p_Url: String): String; var v_Response: IHTTPResponse; begin f_Error := ''; // Used by OnRequestError try v_Response := f_NetHTTPRequest.Get(p_Url); f_StatusCode := v_Response.StatusCode; f_StatusText := v_Response.StatusText; Result := v_Response.ContentAsString; except on E: Exception do with v_Response do begin begin Result := ''; f_StatusCode := -1*v_Response.StatusCode; f_StatusText := E.Message+' ['+v_Response.StatusText+']'; end; end; end; end;
- 5 replies
-
- tnethttprequest
- delphi
-
(and 1 more)
Tagged with:
-
I created a Datasnap server application that connects to the MSSQL database via the TFDConnection object, and then executes a specific SQL query via the TFDQuery object, the results of which are further forwarded via the TDataSnapProvider object. This is screenshot of that application I created a simple client application that opens this query and displays the results in a ListBox. This is the code : When I run application on Windows I get a correct result with Serbian letters as you can see in the image below But when U start the same application on Android, I have a problem with display of Serbian letters. What is the problem? Thanks
-
I have a reconnection problem in an android application,using Indy TidTcpClient and TIdThreadComponent. I've tried both the Delphi bundled and the latest Indy version. At the beginning, the program goes through the IP addresses of the available devices. Read and write routines work without problems, but when you try to change the IP address, almost without exception the program freezes. Sometimes it takes a few seconds, sometimes a few minutes before the program responds and about every ten times the program stops responding completely. In Windows, changing the IP address works reasonably well, but sometimes it also freezes. Receiving works...: try StartChar := TCPSocket.IOHandler.ReadChar; if StartChar = '%' then begin Data := TCPSocket.IOHandler.ReadLn('&'); Payload := Data; TCPSocket.IOHandler.ReadBytes(ChecksumBytes, 4); ReceivedChecksum := BytesToString(ChecksumBytes); CalculatedChecksum := CRC16(Payload); if ReceivedChecksum = CalculatedChecksum then begin TThread.Queue(nil, procedure var i: Integer; begin HandleData; end); end else begin TThread.Queue(nil, procedure begin HandleChecksumError; end); end; end; except on E: Exception do begin TThread.Queue(nil, procedure begin HandleException; end); ReceiveThread.Terminate; end; ...but changing IP fails: procedure IpSelectF.IPBtnClick(Sender: TObject); Var Btn: TButton; NewIp: string; begin if Sender is TButton then begin Btn := TButton(Sender); if AvailableIP[Btn.Tag] then begin TTask.Run( procedure begin try if Assigned(MainF.ReceiveThread) and MainF.ReceiveThread.Active then begin MainF.ReceiveThread.Stop; MainF.ReceiveThread.WaitFor; end; if MainF.TCPSocket.Connected then MainF.TCPSocket.Disconnect; NewIp := '192.168.1.' + IntToStr(Btn.Tag); MainF.TCPSocket.Host := NewIp; try MainF.TCPSocket.ConnectTimeout := 3000; MainF.TCPSocket.Connect; if MainF.TCPSocket.Connected then begin TThread.Queue(nil, procedure begin MainF.ReceiveThread.Start; ShowAlertDialog('Connected to ' + NewIp); end ); end else begin TThread.Queue(nil, procedure begin ShowAlertDialog('Connection to ' + NewIp + ' failed.'); end ); end; except on E: Exception do begin TThread.Queue(nil, procedure begin ShowAlertDialog('Failed to connect to ' + NewIp + ': ' + E.Message); end ); end; end; except on E: Exception do begin TThread.Queue(nil, procedure begin ShowAlertDialog('Error during IP switch: ' + E.Message); end ); end; end; end ); end; end;
-
Can I connect to MSSQL Server with FireDAC on android application? When I try it there is a problem Is there any eay for direct connection from my android application to MSSQL Server
-
delphi delphi fmx tbuttonstyleobject effect not working in touch screen
Artur78 posted a topic in FMX
Could someone help me solve the problem with display and response to touch of the button? The test application contains a simple keyboard made of buttons (TButton), has configured TButtonStyleObject and everything works correctly but only when using a mouse. When the application is running on a device with a touch screen, then the visualization elements do not work. Could someone suggest how to easily solve this problem? -
I have created a DLL with one exported function using the latest version of Delphi (12.1). The function takes one parameter: a record type variable. library MyDLL; uses System, SysUtils; type TMyRecord = record MyString: AnsiString; MyInteger: Integer; end; function FillRecord(var Rec: TMyRecord): Boolean; stdcall; export; begin Rec.MyString := 'Hello from Delphi'; Rec.MyInteger := 42; Result := True; end; exports FillRecord; begin end. In my C++ Builder 6.0 application, I have declared the following: struct TMyRecord { char *MyString; int MyInteger; }; extern "C" __declspec(dllimport) bool __stdcall FillRecord(TMyRecord *Rec); When calling the 'FillRecord' function from my C++ Builder application, I do not get the expected results: TMyRecord iMyRec; Memo1->Lines->Clear(); Memo1->Lines->Add(Format("Address: %p", ARRAYOFCONST((&iMyRec)))); if (FillRecord(&iMyRec)) { String iData = iMyRec.MyString; Memo1->Lines->Add("iMyRec.MyString: " + iData); int iNumber = iMyRec.MyInteger; Memo1->Lines->Add("iMyRec.MyInteger: " + IntToStr(iNumber)); } else { Memo1->Lines->Add("Error calling FillRecord"); } I am expecting: iMyRec.MyString: Hello from Delphi iMyRec.MyInteger: 42 But I am getting: iMyRec.MyString: H iMyRec.MyInteger: 42 I am drawing a blank when trying to figure out what I am doing wrong. Any inputs/suggestions to solve my issue would be greatly appreciated. Thank you
- 3 replies
-
- delphi
- c++ builder
-
(and 3 more)
Tagged with:
-
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;
-
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
-
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
-
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