Jump to content

All Activity

This stream auto-updates     

  1. Today
  2. I'm aware of some excellent Delphi encryption libraries but for applications already using OpenSSL, these add a lot of extra code. ICS currently has two encryption components in OverbyteIcsSslX509Utils.pas with minimal samples in PemTools, one for RSA private key encryption or a string, the second for Blowfish string and stream encryption. The latter uses the EVP_CipherAPIs so should be extendable for other symmetric ciphers like AES, so we can password zip files for instance. I could try to improve these ICS functions with more ciphers, but my crypto knowledge is low and there are so many different options for each cipher... Has anyone improved the ICS crypto stuff already. Or has someone written a Delphi encryption component using OpenSSL that can be shared with ICS? Angus
  3. for newbies, how to scale windows server web apps https://github.com/RDP1974/IsapiScale kind regards R.
  4. For the original QuickJS, this makefile seems to work: CC = i686-w64-mingw32-gcc-posix CFLAGS = -O2 -fPIC -Wall -D_GNU_SOURCE -DCONFIG_VERSION=\"V16\" LDFLAGS = -static -shared -lpthread SRC = quickjs.c libunicode.c libregexp.c cutils.c dtoa.c quickjs-libc.c OBJ = $(SRC:.c=.o) all: quickjs32.dll quickjs32.dll: $(OBJ) $(CC) $(LDFLAGS) -o $@ $^ clean: rm *.o *.dll But this requires the POSIX version of gcc which can be insalled in Ubuntu using: sudo apt install gcc-mingw-w64-i686 This compiler supports the POSIX threading functions required by QuickJS.
  5. With a little help of ChatGpt: CC = i686-w64-mingw32-gcc CFLAGS = -O2 -fPIC -Wall -D_GNU_SOURCE -DCONFIG_VERSION=\"V16\" LDFLAGS = -static -shared SRC = quickjs.c libunicode.c libregexp.c cutils.c xsum.c quickjs-libc.c OBJ = $(SRC:.c=.o) all: quickjs32.dll quickjs32.dll: $(OBJ) $(CC) $(LDFLAGS) -o $@ $^ clean: rm *.o *.dll Just tested it, this makefile works when run from Linux under WSL (I'm not using Windows as using WSL works really well)
  6. GabrielMoraru

    What is the best AI at Delphi

    I know... I know... (On the other hand I sold all my Tesla stocks).
  7. @Keesver thanks, this looks promising. Another dev was able to get it compiling with CBuilder Win64x - however my immediate need is Win32 - any idea what changes need to be made to get quickjs-ng compiling for Win32? I'm also keen to take some changes from https://github.com/koush/quickjs to enable debugging at some point.
  8. David Heffernan

    What is the best AI at Delphi

    MechaHitler surely
  9. @Keesver how do you create a QuickJS_32.dll ?
  10. GabrielMoraru

    What is the best AI at Delphi

    I see that the question is in the VCL domain, where I like Grok. ______ But I can also tell you about FMX where the best AI is... drum roll please.................................................. none. They all suck terribly as FMX. Probably not their fault. Probably because of lack of code on GitHub.... 😞 And what the AI does when it does not know the answer to a question?????? It hallucinates things. So, all your queries MUST contain "check your answer for hallucinations" .
  11. Gustavo 'Gus' Carreno

    Object Pascal Card Framework

    Hey Y'All, With a possible code challenge in mind, I've created a framework to aid programmers with creating card games. You can find it here: objpas-card-framework Opinions, advice and PRs are very welcomed!! Especially because I'm aiming at getting a set of Delphi packages, and I need someone to create them. Cheers, Gus
  12. I develop a smartphone app with a tabcontrol with several tabs for some years already. In order to size controls I use TGridPanelLayouts but in order to also scale font-sizes, I am still using various layout packages. That is because I realized that the "standard" font-size is often too small on larger devices. Layout packages have two drawbacks: 1. There is a bunch of layouts to update for every change in the app 2. You can never catch all existing Android display sizes, as I realize when I look at my app at other person's smartphones. That is why I want to get rid of layout packages and find an algorithm that allows me to set font-sizes for labels, buttons and memos, depending on screen.width (or other device parameter). Is there a general approach for this? Does it also respect different device's dpi? Thanks for any advice Steffen
  13. boris.nihil

    SOAP problem 2

    I managed to extract certicicates with winapi.wincrypt functions...
  14. There were other discussion about WINMD, that seems to be buggy, look there: https://en.delphipraxis.net/topic/13720-bugs-on-winmd-who-can-clarify/?do=findComment&comment=105350 In one post, @pcoder suggest the see others metadata provider (like this https://www.winsoft.sk/win32api.htm ). If you look insede of those sources, you will look that more types were derivered form SYSTEM unit, like IUNKNOWN for example. Try this instead WINMD. There are in QP some open issues about WINMD.
  15. Hi, VMT is not a problem here, VMT for such interfaces are different beast from VMT for objects/classes, VMT tables with COM interfaces (interfaces with GUID which i like to call "named interfaces" or "IDed interfaces") are separated into their own tables identified by their GUID, even for one object/interface, so VMT will be alright no matter what inheritance is there, also VMT for each interface are agnostic for other GUID declaration. As for the interfaces you listed IInterface and IUnknown, this might be a problem as they declared with the same GUID (TGUID) hence they will compete to replace one another, they are identical in structure but different in parameters (declaration), so they will work unless the compiler will complain about stuff like Integer vs Cardinal or TGUID vs PGUID..., the problem here is how compiler see them and when. I might be wrong here, but the fix should be removing Windows.Foundation.IUnknown , in other words, the already known interfaces should not be redeclared/generated.
  16. Patrick PREMARTIN

    Deploying Delphi 12.3 iOS App to iOS Device

    Hi Good to see it working. Do you have an antivirus on Windows ? (I've already seen strange behaviors with McAfee which locked files or blocked some network calls)
  17. master roshi

    FireDAC encrypted SQLite DB with Delphi 12.3 x64

    I’ve run into something similar before 32-bit works fine, but 64-bit throws access violations when using encrypted SQLite. Double-check if the correct 64-bit SQLCipher DLL is in place and being loaded properly.
  18. One of the reasons behind QuickJS-ng was to make it compatible with CMake and Windows (see this page: Building | QuickJS-NG). It is actively maintained but is still close to the original source made by Fabrice.
  19. We are actively using and developing an QuickJS integration with Delphi. Works brilliantly (QuickJS that is). I can give you support with the compiling of the code. Currently we are using QuickJS-ng (GitHub - quickjs-ng/quickjs: QuickJS, the Next Generation: a mighty JavaScript engine) but this code is still close to the original version made by Fabrice Bellard. For the compilation, we use Linux (running under WSL) and the right compilers (ChatGpt is your friend here). Anyway this MakeFile works for us (save it to MakeFile_Win64): CC = x86_64-w64-mingw32-gcc CFLAGS = -O2 -fPIC -Wall -D_GNU_SOURCE -DCONFIG_VERSION=\"V16\" LDFLAGS = -static -shared SRC = quickjs.c libunicode.c libregexp.c cutils.c xsum.c quickjs-libc.c OBJ = $(SRC:.c=.o) all: quickjs64.dll quickjs64.dll: $(OBJ) $(CC) $(LDFLAGS) -o $@ $^ clean: del *.o *.dll Then run: make -f MakeFile_Win64 (this requires QuickJS-ng, for QuickJS you need to change the listed source files a little) If you need updated pascal files, you can checkout this repo: https://github.com/a-dato/quickJS-Rtti.git.
  20. You are right. The files to look at is web.pas has var dom, console, and window. The js.pas uses JSValue and parses JSON objects unsure if the eval can do multiline.
  21. Another abandonware of Microsoft! It first sounded real good.
  22. Yes, ActiveScripting has been abandoned by Microsoft - which would be fine if they just made sure it continued to work for a while, but they recently completely broke it - https://www.finalbuilder.com/resources/blogs/finalbuilder-and-automise-on-windows-11-24h2 We have a ton of existing javascript, as do our customers (each action has events customers can write scripts on), so it's not simply a a case of swapping out scripting languages. I did look at p4d a while ago but ran into issues - I don't remember the specifics (something around threading - finalbuilder is multi threaded). It's on my todo list to look at again when time permits. We currently have iron python support, but have been telling customers not to use it for some time due to memory issues. Swapping that out for for P4D might sound like a no brainer but Iron Python allows people to use .net framework classes. What ever happens, we're going to have some unhappy customers. Tech debt sucks!
  23. Hello, I need a second opinion on this. Either I am drunk or there is a huge error in the generated Windows units one can install through GetIT from Emarcadero called "Windows API from WinMD". If the following is an error, I'll create a ticket. If not, someone needs to explain this to me. I am trying to use IMMDeviceEnumerator from Windows.Media.Audio.pas. Calling GetDefaultAudioEndpoint, I was unable to get the defaultdevice. This is how the interface is declared: ///<summary>Documentation: https://docs.microsoft.com/windows/win32/api/mmdeviceapi/nn-mmdeviceapi-immdeviceenumerator</summary> ///<remarks> ///<para>Supported since: <i>windows6.0.6000</i></para> ///</remarks> IMMDeviceEnumerator = interface(IUnknown) ['{A95664D2-9614-4F35-A746-DE8DB63617E6}'] ///<summary>Documentation: https://docs.microsoft.com/windows/win32/api/mmdeviceapi/nf-mmdeviceapi-immdeviceenumerator-enumaudioendpoints</summary> function EnumAudioEndpoints(dataFlow: EDataFlow; dwStateMask: Cardinal; out ppDevices: IMMDeviceCollection): HRESULT; stdcall; ///<summary>Documentation: https://docs.microsoft.com/windows/win32/api/mmdeviceapi/nf-mmdeviceapi-immdeviceenumerator-getdefaultaudioendpoint</summary> function GetDefaultAudioEndpoint(dataFlow: EDataFlow; role: ERole; out ppEndpoint: IMMDevice): HRESULT; stdcall; ///<summary>Documentation: https://docs.microsoft.com/windows/win32/api/mmdeviceapi/nf-mmdeviceapi-immdeviceenumerator-getdevice</summary> function GetDevice(pwstrId: PWSTR; out ppDevice: IMMDevice): HRESULT; stdcall; ///<summary>Documentation: https://docs.microsoft.com/windows/win32/api/mmdeviceapi/nf-mmdeviceapi-immdeviceenumerator-registerendpointnotificationcallback</summary> function RegisterEndpointNotificationCallback(pClient: IMMNotificationClient): HRESULT; stdcall; ///<summary>Documentation: https://docs.microsoft.com/windows/win32/api/mmdeviceapi/nf-mmdeviceapi-immdeviceenumerator-unregisterendpointnotificationcallback</summary> function UnregisterEndpointNotificationCallback(pClient: IMMNotificationClient): HRESULT; stdcall; end; Suspecting something in the method declaration (i.e. out) was wrong. I copied it over to my code...and it started to work? Like, I didn't change a thing or did I? So after being confused for a moment, I looked at the interafce it inherits from. When the Interface is in my code, due to the units in my uses, it derives from System.IUnknown which is declared like this: IInterface = interface ['{00000000-0000-0000-C000-000000000046}'] function QueryInterface(const IID: TGUID; out Obj): HResult; stdcall; function _AddRef: Integer; stdcall; function _Release: Integer; stdcall; end; IUnknown = IInterface; However, in the generated code, it derives from Windows.Foundation.IUnknown which is declared like this: IUnknown = interface ['{00000000-0000-0000-C000-000000000046}'] ///<summary>Documentation: https://docs.microsoft.com/windows/win32/api/unknwn/nf-unknwn-iunknown-queryinterface(q)</summary> ///<remarks> ///<para>Can return errors as success</para> ///</remarks> function QueryInterface(riid: PGuid; out ppvObject: Pointer): HRESULT; stdcall; ///<summary>Documentation: https://docs.microsoft.com/windows/win32/api/unknwn/nf-unknwn-iunknown-addref</summary> function AddRef: Cardinal; stdcall; ///<summary>Documentation: https://docs.microsoft.com/windows/win32/api/unknwn/nf-unknwn-iunknown-release</summary> function Release: Cardinal; stdcall; end; So unless I am missing something crucial, this IUnknown-Interface is adding the same 3 methods it already has thorugh the IInterface-Baseinterface and offsets the entire VMT by 3 entries across the board. And by adding/removing Windows.Foundation from my uses I can make the copy of the interface work/break at will. So this seems like an oversight and that IUnknown should just inherit from IInterface or be an alias, or am I wrong?
  24. Wow. Once, I had very high hopes for this technology, but it became another abandonware of Microsoft. Have you considered using python (pyscripter/python4delphi: Free components that wrap up Python into Delphi and Lazarus (FPC))? I guess though you were using JScript and you want to stick to JavaScript. For JavaScript there is also Microsoft's ChacraCore, which used to be the JavaScript engine of the old Edge browser. There is a good Delphi wrapper. See also the blog.
  25. Yesterday
  26. ToddFrankson

    D5-D7 ISAPI vs D12.3 ISAPI

    So, I am revisiting an ISAPI dll I wrote some time back.... I have a bunch of actions. In particular I have an /index and a /header action. Header generates a header based on input from which action is called and which "options" the end user has selected prior to the call for the action. Simple stuff.... In D5-D7, this isapi dll could call the header via a get from the Index action (or any other) and everything worked fine (also a footer but we aren't going there yet). Upgrading it to D12.3 If I call the header directly {http://127.0.0.1/script/CC_Web.dll/getheader?cat=6&mob=n) in my browser, it returns the expected header fine Wen called from within an action: procedure TWebModule1.WebModule1indexAction(Sender: TObject; Request: TWebRequest; Response: TWebResponse; var Handled: Boolean); var myHeader:String; Begin ....... // nmHttp is a visual component TIDHttp; MyHeader:=nmHttp1.Get('http://127.0.0.1/script/CC_Web.dll/getheader?cat=6&mob='+Mobile); Response.Content:=MyHeader; Response.SendResponse; Handled:=true; End; My header is blank. Occasionally I get an Http 1.1 5 error. Is there something new that ISAPI can not call actions within the same ISAPAI from one action to another? If I type this in the browser: http://127.0.0.1/script/CC_Web.dll/getheader?cat=6&mob=n, the header renders perfectly.
  27. I'm looking to replace MS ActiveScripting in FinalBuilder.
  1. Load more activity
×