

mvanrijnen
Members-
Content Count
495 -
Joined
-
Last visited
-
Days Won
1
Everything posted by mvanrijnen
-
Strange behaviour Windows VCL app on specific laptop
mvanrijnen replied to mvanrijnen's topic in VCL
Sorry, no problem still exists after that. -
Strange behaviour Windows VCL app on specific laptop
mvanrijnen replied to mvanrijnen's topic in VCL
Drivers updates (as well the Intel as the nVidia drivers) Forced the app to work with the Intel GPU (does this work if the app is launched from a "launch app" instead of the explorer?) -
Console application - CRT Unit - Console Library
mvanrijnen replied to Wolfgang03's topic in I made this
See: Keyboard identifiers and input method editors for Windows | Microsoft Learn United States-International 00020409 In Ply.Types.pas change TKeyboardLayout from Word to Longword, now is the wrong type. TKeyboardLayout = LongWord; // Word; -
Console application - CRT Unit - Console Library
mvanrijnen replied to Wolfgang03's topic in I made this
When i start the move_window demo, i get this effect: (same with other demo's as wel) -
Console application - CRT Unit - Console Library
mvanrijnen replied to Wolfgang03's topic in I made this
yes, my library back then, poked right into the videomemory. clocking the windowing functions with a analog stopwatch from my father, checking if i could find somewhere to speed the things up. (my father thought i was somekind of idiot, clocking the timing of putting thousands of random rectangles on the screen 🙂, but then he also was scared when i took his 8000$ company laptop apart 🙂 ) -
Console application - CRT Unit - Console Library
mvanrijnen replied to Wolfgang03's topic in I made this
nice, for some apps/usecases console beats windows apps. somewhere i have some progressbar code for console also. back at the time i also had a "Painter" application, with which you can design "Screens", export them to ASCI/ANSI, TurboPascal CRT, etc. i get a range check error, on the minimalconsole app demo? Function tConsole.GetKeyboardLayout : TKeyboardLayout; Var pwszKLID : Array [0..KL_NameLength] of Char; begin FillChar(pwszKLID,sizeof(pwszKLID),#0); if (GetKeyboardLayoutNameW(pwszKLID)) then begin FKeyboardLayout := StrToInt('$'+StrPas(pwszKLID)); end else begin FKeyboardLayout := _KeyboardLayout_de_DE; end; Result := FKeyboardLayout; end; On the strtoint('$'+ .... line (pwszKLID = ('0', '0', '0', '2', '0', '4', '0', '9', #0 #0) -
Delphi11.3 - TRestClient - MSGraphAPI - Error 12029
mvanrijnen posted a topic in Network, Cloud and Web
Hello, I just had to work on a project for the first time in D11.3, it uses TRestclient against the MSGRaph API. Now i'm getting error 12029, probably some TLS problem, anyone got a quick solution? Tried, .SecurityProtocols := [TLS12, TLS13] etc. not working Running on Windows 11 (21H2), updating to 22H2 right now. -
Delphi11.3 - TRestClient - MSGraphAPI - Error 12029
mvanrijnen replied to mvanrijnen's topic in Network, Cloud and Web
pff found it, there was a proxy server forced in debug mode. -
Delphi11.3 - TRestClient - MSGraphAPI - Error 12029
mvanrijnen replied to mvanrijnen's topic in Network, Cloud and Web
During the Execute of the post to get the token. 'https://login.microsoftonline.com/[clientname].onmicrosoft.com/oauth2/v2.0/token' -
I always use DateOf when assigning a TDate to a date field in a sql query. It's sometimes hard to know if somehow a time part was added to a date value. So just to be sure i do a lot of: (especially when the TDate field/param is in a SQL select statement) procedure DoMyUpdate(const AMyDateParameter : TDate); begin qry.ParamByName('MyDateParameter').AsDate := DateOf(AMyDateParameter); ... end; or if needed (eg in a loop) extract the Date value outside the loop: procedure DoMyUpdate(const AMyDateParameter : TDate); var myRealDateVar : TDate; begin myRealDateVar := DateOf(AMyDateParameter); while i<cnt do begin .... .... qry.ParamByName('MyDateParameter').AsDate := myRealDateVar; inc(i); ..... end;
-
Is there a Sunday between 2 dates ?
mvanrijnen replied to Henry Olive's topic in RTL and Delphi Object Pascal
working on it:) (wait for a batchjob to finish 🙂 so, can play around) UWE's method seems okay though -
Is there a Sunday between 2 dates ?
mvanrijnen replied to Henry Olive's topic in RTL and Delphi Object Pascal
needs a check for friday-monday -
Is there a Sunday between 2 dates ?
mvanrijnen replied to Henry Olive's topic in RTL and Delphi Object Pascal
Yes, just experiented in Excel 🙂 pseudo: (DaysBetween(D2, D1) div 7) + ifthen(DayOfTheWeek(D1)=daySunday,1,0) ) + ifthen(DayOfTheWeek(D2)=daySunday,1,0) hmz, one off in some cases. pseudo (2): sundaycount := (DaysBetween(D2, D1) div 7); if (DayOfTheWeek(D1)=daySunday) or (DayOfTheWeek(D2)=daySunday) then sundaycount = sundaycount + 1; back to the drawing board 🙂 -
Delphi REST frameworks that run on Linux?
mvanrijnen replied to David Schwartz's topic in Network, Cloud and Web
MARS is also (according to: MARS-Curiosity REST Library - Delphi-PRAXiS [en] (delphipraxis.net)) compatible with linux, it seems to work on all Delphi targets so. -
Delphi REST frameworks that run on Linux?
mvanrijnen replied to David Schwartz's topic in Network, Cloud and Web
Things like: * RadServer * MARS -
Where does Delphi store the list of command line parameters?
mvanrijnen replied to PiedSoftware's topic in Delphi IDE and APIs
Yes would be nice if they changed this to store it at project level. Would like to see this for the debug watches also. -
Requested for IDE to support more RAM (vote/discuss if you care)
mvanrijnen replied to Tommi Prami's topic in Delphi IDE and APIs
Yes on the last dutch Delphi event from EMB (via Bransten) this was said to. Also they said that EMB is busy with an update so existing MDI apps will still run & function correctly. (i think they gonna implement the parts which MS dropped). see also": -
besides the threadsafety and the question if this is the best solution, probably your memo is getting "full", try to limit the total lines in the memo to for example max. 1000lines, and do the update between beginupdtae and endupdate. With which intensivity the clients send data )(e,.g. 100 times per second)? function TFServer.cliInfoMessage(info: TMemo; send, msg: string): Boolean; begin TThread.Queue(nil, procedure begin info.lines.BeginUpdate(); try info.Lines.Append('/' + send + '/' + msg); while info.lines.count>1000 do info.lines.delete(0); finally info.lines.EndUpdate(); end; end); result := true; end;
-
I'm reasonably sure that you can accomplish this with Indy. You have multiple clients sending data to a single indy server i assume? Maybe you have some memory problems, not correct handling incoming connections and or data?
-
RAD Server package running under dev but not in IIS
mvanrijnen replied to nufus42's topic in Network, Cloud and Web
Would be a possibility for the parts that don't touch/need our BL indeed. -
RAD Server package running under dev but not in IIS
mvanrijnen replied to nufus42's topic in Network, Cloud and Web
Still running production with the DEV Console, we are (for sure 90%) moving away from RadServer, It gives us no pro's/extra's only problems and con's. We're looking at something like MARS to develop our (micro)services. -
@programmerdelphi2k I believe the findclose needs to be executed when the findfirst succeeds, otherwise not.
-
and if you stay with the findfirst/findnext solution, do not forget the findclose 🙂
-
TStringDynArray, i believe its defined in the unit "System.Types". you call this function for example with: FindFilesWithPatttern('C:\MyFolder', '*.sys'); // get all the .sys files FindFilesWithPatttern('C:\MyFolder', 'myfile.txt'); // get the myfile.txt file(s) (maybe for your example u should use an overload of the TDIrectory.GetFiles method which also recurs over the (sub)folders. the line: files := TDirectory.GetFiles(directoryPath, filePattern); you change in: files := TDirectory.GetFiles(directoryPath, filePattern, TSearchOption.soAllDirectories); for that. As said before by someone else, a filemask can also be a full filename.
-
The "ChatGPT" solution: Question: uses System.SysUtils, System.IOUtils; procedure FindFilesWithPattern(const directoryPath, filePattern: string); var files: TStringDynArray; fileName: string; begin try files := TDirectory.GetFiles(directoryPath, filePattern); for fileName in files do Writeln(fileName); except on E: Exception do Writeln('An error occurred: ' + E.Message); end; end; Explanation from ChatGPT: