-
Content Count
1200 -
Joined
-
Last visited
-
Days Won
16
Everything posted by FPiette
-
According to Microsoft, most Win32/Win64 applications runs on the Surface Pro having an ARM processor. Of course there is an emulation layer to run Intel machine code on an ARM processor and there is probably a performance penalty. Tom's Guide reviewed two Surface Pro 9 : one with Intel i7-1255U and one with ARM SQ3. Intel configuration is largely superior to ARM configuration. There is only one area where ARM is better: battery life. This was expected given the lower performance of the ARM processor. If you plan to buy Surface Pro 9, pay attention to various configurations there are not at all equals!
-
Is it a basic setup using default options and folders? Anything added after setup, like libraries, components, experts, addons and similar?
-
To be clear, the question is not about Delphi installer. The elevated privileges are requested when running the IDE, after installation. Or is it me that did not understood the question ?
-
I have the same UAC setting as you but I don't have any issue with the IDE requesting elevated privileges. There is something suspect on your system. Don't relax UAC settings!
-
Using latest Delphi (12.1), you can open a new edit window (right click on the tab and select "New edit window". Then in the window which is opened, you see your source code and you can switch to design mode by clicking on "design" tab located bottom right of the edit window. Now, you see the form editor. It is still embedded in the designer window but it is bigger than in the main IDE window yet still not full screen. You can enter a feature request in Embarcadero Quality Portal. If you do, publish the reference here.
-
Never! Which database are you using? Which database access component are you using?
-
IMO it is not a good idea to unlock an locked file. Usually, a program lock a file because it is doing operation on the file which requires an exclusive access. Unlocking the file without shutting the program down will probably result in corrupted file or file in an inconsistent state when you access it (for example copy the file elsewhere).
-
ICS SLL3.2 much slower than Indy SSL1.0.2
FPiette replied to PizzaProgram's topic in ICS - Internet Component Suite
Well, I'm shocked. You were right! I've moved the creation of the components from the initialization part to the Execute procedure and It's the same fast now as Indy. Your ICS component event wre handled by the main thread which - you said that - is quite busy. Now that you created to component in thread's execute method, the events are handled by the thread. This is how Windows work with asynchronous operation (cooperative multitasking). We cannot change the component for you own need. You have the tools to do that in your own code. In the vast majority of programs using ICS component, no multithreading is ever needed. You have something wrong in your main thread for it to be so slow. Check your design and place multithreading where it is really helpful. I have an application using ICS that has more than 700 active users and yet doesn't make use of any thread. Both client and server are using ICS. -
ICS SLL3.2 much slower than Indy SSL1.0.2
FPiette replied to PizzaProgram's topic in ICS - Internet Component Suite
You are not clear enough. You MUST create ICS component in the thread's Execute() method. Creating it in the thread's constructor will result of all events running in the main thread context. The mistake is probably having the main thread with a less than 100mS response time. Are you polling devices from the main thread? If yes, that's there you have to move code to a thread. -
A few years ago, I used with great success Peak Systems CANUsb interface. They have a Delphi unit for it.
-
ICS SLL3.2 much slower than Indy SSL1.0.2
FPiette replied to PizzaProgram's topic in ICS - Internet Component Suite
Doing like this is likely makes your ICS component in the main thread context. You should create the ICS component inside the thread execute method. You cannot compare with different OpenSSL versions. Best performance with ICS is when using asynchronous operation and events. Synchronous operation will slow things down. You probably not even need a thread in the first place! -
Your TImageList seems to contain 16x16 pixels images. That's why it is pixelated. Use the same size - in pixels - as the source image.
-
I'm writing an application which read data from an external one. An XML file is used between. The external application has color defined by names while in my application, I have ARGB values. It is trivial to convert from color name to ARGB value: function ConvertGpxColor(const S : String) : UInt32; begin // AABBGGRR if SameText(S, 'Red') then Result := $FF0000FF else if SameText(S, 'Green') then Result := $FF00FF00 else if SameText(S, 'Yellow') then Result := $FF00F0F0 else if SameText(S, 'Blue') then Result := $FFFF4040 else if SameText(S, 'Magenta') then Result := $FFFE01FE else if SameText(S, 'Cyan') then Result := $FFFFFF00 else if SameText(S, 'White') then Result := $FFFFFFFF else if SameText(S, 'Black') then Result := $FF000000 else if SameText(S, 'DarkRed') then Result := $FF000060 else if SameText(S, 'DarkGreen') then Result := $FF006000 else if SameText(S, 'DarkYellow') then Result := $FF008080 else if SameText(S, 'DarkBlue') then Result := $FF600000 else if SameText(S, 'DarkMagenta') then Result := $FF600060 else if SameText(S, 'DarkCyan') then Result := $FF808000 else if SameText(S, 'LightGray') then Result := $FFC0C0C0 else if SameText(S, 'DarkGray') then Result := $FF606060 else if SameText(S, 'Transparent') then Result := $00000000 else Result := $FFC0C0C0; // Light Gray end; In my application, the user can select any ARGB colors using a color dialog. Now I must write the XML file for the external application and convert my ARGB colors to the name. For original values, there is no problem finding an exact match. But for other colors, undefined in the external application, I want to find the nearest color name. The alpha channel can be ignored. I tough about computing a distance between colors and pick the color name having the smallest distance. The distance could be computed considering the RGB channels as axis of a space volume where a distance in a 3-dimensional volume has a well known formula. But will this give a visually correct result ? Maybe a formula specific to color has already been designed?
-
Error 9009 means "File not found".
-
I told you to better describe your needs. Copy or CopyFile is Windows and it works whatever the physical network is between the two computers provided windows networking is running. TCP is a low level protocol that Windows Network use to implement his communication protocol (Which by the way is also implemented in Linux using SAMBA). FTP is a higher level protocol, making use of TCP to exchange files between two sites. IP address is the way to identify a computer inside a TCP/IP network. And there are many many more things that we cannot mention here (It would become a huge article). That's why you need to describe your needs.
-
You should better describe your needs because as is the answer is very simple: copy \\share\filepath localfilepath. Copy is the command line interpreter command. You can implement it in Delphi using Windows CopyFile API (https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-copyfile). Or using standard Defli file I/O (preferably using TFileStream).
-
Find computer with port 3306 open on LAN
FPiette replied to emileverh's topic in ICS - Internet Component Suite
Just try to connect to each IP in the range(s) using a TWSocket. If connection succeed, disconnect and store the corresponding IP somewhere, then try the next IP. To speed up the process, you may use an array of TWSocket, each one scanning a sub-range. TWSocket is asynchronous so you don't even need to use threads. -
Hard work Angus! Thanks a lot.
-
because a usb device can only be used by one machine at a time. Virtualhere presents the device on the remote machine as though it were local. I guess multiple remote PCs can connect, but only one at a given time. The connected PC must disconnect to allow another to connect. Just guessing.
-
Only the free version is discontinued! Here is what Jeff Woolsey, Principal PM Manager at Microsoft is saying: The only thing that was discontinued was the FREE Microsoft Hyper-V Server product because we simply don’t have the time and resources to keep producing the free version. That’s it. That’s the only thing that was deprecated. [explanation skipped] In short, Hyper-V is here for the very long run.
-
Select both label and panel to set MouseEnter and MouseLeave event handler or assign same event handler to both components.
-
Can a Send be done outside the thread a TWSocket is attached to?
FPiette replied to PeaShooter_OMO's topic in Network, Cloud and Web
This post can be deleted. -
Monitor Windows application and restart if needed
FPiette replied to bdw_nz20's topic in Windows API
In the program to be monitored, add code to make it answer to a message (for example a TCP socket or a pipe or a Windows message). Write a second program launch the first and periodically connect to the main program and check if he gets an answer. If no answer, it kills the program et start it again. When the second program starts the first (CreateProcess), it gets an handle that can be waited to catch when the program stops normally. -
Can a Send be done outside the thread a TWSocket is attached to?
FPiette replied to PeaShooter_OMO's topic in Network, Cloud and Web
A good architecture, scalable architecture, is to have ONE thread for the server component for a given protocol. That thread will handle all client communications (that's OK for up to one thousand clients) and unload any processing to worker threads. You can also consider splitting the application between different processes which will handle a single protocol and possibly use IPC to make those processes talk to each other if required. Having a single process doing everything is the best way to have an unstable system almost impossible to debug. -
Can a Send be done outside the thread a TWSocket is attached to?
FPiette replied to PeaShooter_OMO's topic in Network, Cloud and Web
This forum is not the place to discuss any issue with Indy, nor any comparison between ICS and any other socket component. If you want to discuss about other socket components go to their support channel. You are welcome to discuss about ICS here and nothing else.