gioma
Members-
Content Count
136 -
Joined
-
Last visited
-
Days Won
1
Everything posted by gioma
-
in reality that data can be a UTF8 string or a UNICODE string or a file. The first character of the data tells me what type of data I have to work with. For this reason I have to separate the header from the rest of the message.
-
ok, thanks, then I think this is exactly the problem.
-
I know, but it's a packet received via datachannel that only transmits byte arrays.
-
then if I have a unicode string like this: 'ABCDEFGHI' and I put it inside a byte array if I want to remove the first character from the byte array do I have to remove two bytes and not one?
-
FYI - Several Embarcadero services are currently unavailable
gioma replied to Keesver's topic in General Help
In fact, this is not my problem. Delphi 11 has permanently "broken" since I also installed Delphi 12. Moving to Delphi 12 is MANDATORY because Embarcadero has completely abandoned Delphi 11 with all its bugs. I REPEAT: The problem with Delphi 11 is that the more you use it, the more it corrupts, until it becomes almost unusable! For a development team having to move from Delphi 11 to Delphi 12 is risky as you don't know what other issues may emerge that can make your application unstable. Without forgetting the fact that it is also expensive, as all third-party components must be repurchased. -
FYI - Several Embarcadero services are currently unavailable
gioma replied to Keesver's topic in General Help
My case is not so simple, because all libraries are been renamed perfectly! I had to delete them, I DEFINITELY UNINSTALLED DELPHI 11 AND REBUYED THE COMPONENTS TO UPDATE THEM TO DELPHI 12.. Now I managed to uninstall this crap from Delphi 12 and everything works as before, except my pockets! among other things, now with Delphi 12 the SOAP calls that I made with Delphi 11 no longer work (Interface not supported) and I MUST find a solution as soon as possible.. Embarcadero does not understand the damage it is causing to its customers.. this is simply EMBARRASSING! Delphi11 left to itself (the more you use it, the more it messes up something in the management of the IDE until it becomes completely unusable...).. they come out with Delphi12 which, once installed, definitely kills Delphi11.. the time I'm wasting solving their problems it's really a lot.. TOO MUCH.. -
FYI - Several Embarcadero services are currently unavailable
gioma replied to Keesver's topic in General Help
It's incredible, they still haven't solved it. I can't uninstall Parnassuss which conflicted between versions 11 and 12!! It's a real DISASTER! -
the problem is that Delphi doesn't start up, how can I solve it?
-
Hi, I have a big problem. I have a service that monitors sessions on a PC/Server. If I develop the application in 32 bit and it works, but if I develop the application in 64 bit it goes into error (but not always!!): Error 87 : The Parameter is incorrect This is my code: Unit Wtsapi32: unit UN_Wtsapi32; interface uses Windows; const WINSTATIONNAME_LENGTH = 32; DOMAIN_LENGTH = 17; USERNAME_LENGTH = 20; CLIENTNAME_LENGTH = 20; CLIENTADDRESS_LENGTH = 30; type WTS_INFO_CLASS = ( WTSInitialProgram, WTSApplicationName, WTSWorkingDirectory, WTSOEMId, WTSSessionId, WTSUserName, WTSWinStationName, WTSDomainName, WTSConnectState, WTSClientBuildNumber, WTSClientName, WTSClientDirectory, WTSClientProductId, WTSClientHardwareId, WTSClientAddress, WTSClientDisplay, WTSClientProtocolType, WTSIdleTime, WTSLogonTime, WTSIncomingBytes, WTSOutgoingBytes, WTSIncomingFrames, WTSOutgoingFrames, WTSClientInfo, WTSSessionInfo, WTSSessionInfoEx, WTSConfigInfo, WTSValidationInfo, WTSSessionAddressV4, WTSIsRemoteSession ); WTS_CONNECTSTATE_CLASS = ( WTSActive, WTSConnected, WTSConnectQuery, WTSShadow, WTSDisconnected, WTSIdle, WTSListen, WTSReset, WTSDown, WTSInit ); {$IFDEF UNICODE} PWTS_INFO = ^WTS_INFO; WTS_INFO = record State:WTS_CONNECTSTATE_CLASS ; SessionId: DWORD; IncomingBytes :DWORD; OutgoingBytes :DWORD; IncomingFrames:DWORD; OutgoingFrames:DWORD; IncomingCompressedBytes:DWORD; OutgoingCompressedBytes:DWORD; WinStationName: array[0..WINSTATIONNAME_LENGTH - 1] of WCHAR; Domain: array[0..DOMAIN_LENGTH - 1] of WCHAR; UserName:array[0..USERNAME_LENGTH - 1] of WCHAR; ConnectTime:LARGE_INTEGER; DisconnectTime:LARGE_INTEGER; LastInputTime:LARGE_INTEGER; LogonTime:LARGE_INTEGER; CurrentTime:LARGE_INTEGER; end; {$ENDIF} function WTSEnumerateSessions( hServer: THandle; Reserved: DWORD; Version: DWORD; var ppSessionInfo:PWTS_SESSION_INFO; var pCount: DWORD ): BOOL; stdcall; external 'Wtsapi32.dll' name {$IFDEF UNICODE}'WTSEnumerateSessionsW'{$ELSE}'WTSEnumerateSessionsA'{$ENDIF}; function WTSQuerySessionInformation( hServer: NativeUInt; SessionId: DWORD; WTSInfoClass: WTS_INFO_CLASS; var ppBuffer: PLPWSTR; var pBytesReturned: PDWORD): BOOL; stdcall; external 'Wtsapi32.dll' name {$IFDEF UNICODE}'WTSQuerySessionInformationW'{$ELSE}'WTSQuerySessionInformationA'{$ENDIF}; unit test: //... function GetSessionInfo(id:DWORD):TSessionInfo; var wpSessionInfo:PWTS_INFO; pSessionInfo:PLPWSTR; pBytesReturned:PDWORD; iderr:integer; begin Result.ID:=-1; if id >0 then begin try if (WTSQuerySessionInformation ( WTS_CURRENT_SERVER_HANDLE, id, WTS_INFO_CLASS.WTSSessionInfo, pSessionInfo, pBytesReturned) ) then begin Result.ID := id; wpSessionInfo:=PWTS_INFO(pSessionInfo); //user name Result.user:= wpSessionInfo.UserName; //station name Result.StationName:= wpSessionInfo.WinStationName; //domain name Result.domain:=wpSessionInfo.Domain; //connection status Result.ConnectState:=wpSessionInfo.State; end else begin idErr:=GetLastError; GV_TxtFileLog.Log('[GetSessionInfo] id '+intTostr(id)+' ERR : '+ intToStr(idErr)+' '+SysErrorMessage(idErr),true); end; except on e:exception do GV_TxtFileLog.Log('[GetSessionInfo] id '+intTostr(id)+' EX : '+ e.Message,true); end; end; end; function SF_GetOpenedSessions(var codeErr:integer) :TSessionsInfo; var Sessions, Session: PWTS_SESSION_INFO; NumSessions:DWORD; I:DWORD; SessionInfo:TSessionInfo; pSessionInfo:PLPWSTR; pBytesReturned:PDWORD; wpSessionInfo:PWTS_INFO; id:DWORD; begin SetLength(result,0); codeErr:=0; if WTSEnumerateSessions(WTS_CURRENT_SERVER_HANDLE, 0, 1, Sessions, NumSessions) then begin try if NumSessions > 0 then begin Session := Sessions; for i := 0 to NumSessions do begin id:=Session.SessionId; if id > 0 then begin GV_TxtFileLog.Log('[SF_GetOpenedSessions] GetSessionInfo '+ intToStr(id) ); SessionInfo := GetSessionInfo(id); if SessionInfo.ID>0 then begin SetLength(result, length(Result)+1); Result[length(Result)-1]:= SessionInfo; end; end; Inc(Session); end; end; except codeErr:=GetLastError; GV_TxtFileLog.Log('[SF_GetOpenedSessions] WTSQuerySessionInformation err : '+IntToStr(codeErr)+' '+SysErrorMessage(codeErr), true); end; WTSFreeMemory(Sessions); end else begin codeErr:=GetLastError; GV_TxtFileLog.Log('[SF_GetOpenedSessions] WTSEnumerateSessions err : '+IntToStr(codeErr)+' '+SysErrorMessage(codeErr), true); end; end; When I call the "SF_GetOpenedSessions" function I get error 87 when this function then calls the "GetSessionInfo" function. While if I use "GetSessionInfo" passing it the SID of the program it works perfectly... does anyone have an idea why? (I'm going crazy about it!) Compiling in 32 Bit, however, I have no problem.
-
WTSQuerySessionInformation doesn't work in x64 application
gioma replied to gioma's topic in Windows API
Now I also understand why I couldn't find it, winapi.wtsapi32 isn't there on delphi 11! I started the project with Delphi 10, then I switched to Delphi 11 and now I've switched to Delphi 12! -
WTSQuerySessionInformation doesn't work in x64 application
gioma replied to gioma's topic in Windows API
you have solved my problem! I used the unit WinApi.Wtsapi32 and the error disappeared! Honestly, I couldn't find this unit so I thought it didn't exist! Thanks thanks thanks. -
WTSQuerySessionInformation doesn't work in x64 application
gioma replied to gioma's topic in Windows API
-
WTSQuerySessionInformation doesn't work in x64 application
gioma replied to gioma's topic in Windows API
Do you mean the "WTSQuerySessionInformation()" function? What is the unit in Delphi where it is already defined? I tried, unfortunately nothing changes. -
WTSQuerySessionInformation doesn't work in x64 application
gioma replied to gioma's topic in Windows API
Hi Remy, I tried but I always get error code 87. I also tried using this version: function WTSQuerySessionInformation( hServer: THandle; SessionId: DWORD; WTSInfoClass: WTS_INFO_CLASS; var ppBuffer: Pointer; var pBytesReturned: Pointer): BOOL; stdcall; external 'Wtsapi32.dll' name {$IFDEF UNICODE}'WTSQuerySessionInformationW'{$ELSE}'WTSQuerySessionInformationA'{$ENDIF}; obviously it doesn't work! 😭 The strangest thing is that sometimes it works (with the first version), but then suddenly it stops working and there is no way to make it work anymore. What I'm wondering is because compiling in 32 bit always works, while compiling in 64 bit doesn't! Is the structure not large enough for the result? But Microsoft's documentation indicates to use those data types. There is no documentation online on the use of this API for 64-bit applications! 😭😭 -
I have a big problem, for some time now when I try to edit the .dpr file of any project the IDE is very slow, it takes seconds to write a single character, making it impossible to work. How can I solve this?
-
I want to share my disappointment with you. I work with Delphi 11.3 (Patch 1) and every day I see amazing things. Starting with Code Insight, which works 1 out of 3 times. Then, when it stops working, there is no way to reactivate it. The new feature that allows you to highlight the selected words in the code works badly, often when I select a word with a double click the document is moved and becomes unreadable until I scroll through the document, this thing makes me waste a LOT of TIME. It is also dangerous because you risk to write in another part of the code! (it happened to me...) When I am working on the graphical interface of a form, it can happen that the IDE freezes completely and I have to force the PID to close! Sometimes the compiler goes "out of memory" and in the best case you can save and close Delphi, in the worst case Delphi crashes and you lose the work you've done if you haven't saved it. And those are just the biggest problems, I'll leave the rest out. Now I learn that Delphi 12 is being released, but how can Embarcadero offer me a new version of Delphi? And the Delphi 11 bugs, WHO CAN SOLVE THEM? The last update to Delphi 11 was in APRIL!!!! This means that I should update to Delphi 12, which will certainly have NEW BUGS and will not have fixed the bugs of version 11 (as happened to me every time I changed versions...). When do you think we will be able to go on like this? Visual Studio is updated EVERY WEEK. I have to work every day with an IDE that slows me down and most of all with an IDE that NO ONE MAINTAINS! I would like someone like Marco Cantù to explain to me why Embarcadero is destroying the trust of their customers in this way, why they are neglecting the essentials to continue blowing smoke in our faces. Sorry for the outburst, but it's really frustrating to work like this.
-
yes but it shouldn't be up to us to solve it.. perhaps it is precisely this approach that is wrong... I read that people are not surprised by this behavior, which means that over time these mistakes have been repeated over and over again! As I wrote in the post "Delphi 11.3 Forsaken", I don't like this policy of not releasing fixes for months and then coming out with a new version of Delphi that still carries the bugs of the previous one with new features that add new bugs.. they should concentrate their efforts on solving macroscopic bugs and then think about making a new version of Delphi, otherwise it's just a joke.. I find all this unprofessional... the world moves on, Delphi just pretends to, but still remains anchored to a way of doing things that should be extinct because it is not very functional!
-
thanks, it solved it. But what seems normal to you? I don't know..
-
Could you explain better what I should do? Thank you
-
DO NOT INSTALL DELPHI 12 ON YOUR PRODUCTION PCS!! this is the result: RAD STUDIO 11.3 KO
-
I installed Delphi 12 at home, not on the production PC where I also have Delphi 11.3. Result: DELPHI 11.3 goes into exception and I can no longer open any project with Alexandria INCREDIBLE!!!! DO NOT INSTALL DELPHI 12 ON YOUR PRODUCTION PCS!!
-
Visual Studio 2019 is still getting patches, it has been getting patches for at least 4 years. Delphi 13 is no longer receiving patches. That's not what I said or claim. The only patch for Delphi 11.3 was released in April and they haven't released anything since. After a little over a year, Delphi 11.3 was left to fend for itself. Embarcadero's policy so far has been to release new versions and not update older versions. This policy is unacceptable to me, because often subsequent versions not only have new bugs (due to new features), but also carry bugs from previous versions that were never fixed. Not to mention the fact that every time you install the new version of Delphi you MUST necessarily install all the components. I repeat: I do not pretend that Delphi is bug-free, but that known bugs are fixed, because this is a product we pay dearly for.
-
I expect Delphi 11.3 to get updates and bug fixes a year after its release. I'm not using Windows 7, I'm using Windows 11 and if you're referring to the joke I wrote above "I can't use Delphi 7 in 2023", it was to say that Delphi 7 is the last Delphi that is not affected by major bugs... but I'm using Delphi 11.3 which hasn't been updated since April 2023, which is UNACCEPTABLE!
-
I have a subscription.. I understand that Delphi has always done this, but if something is wrong, should we keep doing it until the end of time? The IDE is unstable even without packages, but haven't you noticed that the longer you keep it open, the slower it gets? I use it 8-10 hours a day. My software isn't perfect either, but I fix known bugs, I don't leave them there forever.. Software that doesn't fix giant bugs is dead software. I have only installed plug-ins developed by Embarcadero included in my subscription. VS2019 is obsolete, you can easily switch to VS2022 (I have converted all my projects without any major problems), but in any case I have never had any problems loading projects. NB: My PC has fairly recent and high-performance hardware: Intel i7 10700 16GB DDR4 RAM NVIdia Quadro P620 Samsung SSD 990 PRO
-
The fact that the IDE gives an "out of memory" error and freezes is not due to the operating system but to the Delphi engine which jams over time. In fact, the longer you keep Delphi open, the slower it will be to compile or debug. I have a 64-bit project and I had to give up debugging as it is extremely slow and inefficient (some functions can take minutes) despite taking up little RAM and CPU cycles.😭 I would like to point out that time is money for professional programmers, so I cannot and must not waste time patching software that should make my life easier and for which I pay a high price. As mentioned above, time is money and restarting the IDE 5/6 times a day is an unthinkable waste of time!😥 I hope someone who works for Embarcadero reads this post and realises what programming in Delphi means today. NB I love the Delphi language, but I can't program in Delphi 2007 (which doesn't cause major problems and therefore doesn't waste time writing code...) in 2023!