Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 12/04/24 in Posts

  1. Prior to Delphi 12, the Enum type for TShiftState is anonymous, so you can't declare a variable of that type, at least not directly. With the introduction of Inline Variables and Type Inference in Delphi 10.3, you can do so, but only if you initialize the variable at the same time you declare it, eg: var state := ssShift; This is exactly the kind of situation why several such Sets in the RTL have been re-written in recent versions to separate their Enum types from their Set types. TShiftState was re-written in Delphi 12, it now looks like this: TShiftStateItem = (ssShift, ssAlt, ssCtrl, ssLeft, ssRight, ssMiddle, ssDouble, ssTouch, ssPen, ssCommand, ssHorizontal); TShiftState = set of TShiftStateItem; So, you can now declare a variable of type TShiftStateItem.
  2. tgbs

    ALTER DOMAIN INTERBASE ON PRIMARY KEY

    Drop Primary key, alter domain, recreate primary key. If You have Foreign keys - first drop them
  3. https://www.finalbuilder.com/resources/blogs/introducing-signotaur-remote-code-signing-server
  4. Delphi YouTube Downloader This project is a YouTube downloader developed in Delphi capable of downloading videos in various formats and qualities. Supported Formats Video Quality: From 8K to 360p in MP4 format. Audio Formats: MP3, FLAC, and M4A. Requirements yt-dlp and ffmpeg are used as open-source libraries for downloading and processing media files. Installation Instructions Ensure that the following files are present in the Tools folder: ffmpeg.exe yt-dlp.exe Download location: Videos will be saved in the Downloads folder located in the same directory as the application. Feel free to contribute and improve the project! Your contributions are welcome. 👍 🚀 https://github.com/mesutde/Delphi-Youtube-Downloader
  5. Do you have the same problem if you use the WinInet API instead of the WinHTTP API? In any case, at this point does it really matter if the status text is being returned or not? It is arbitrary text determined by the server, so you shouldn't rely on it for any kind of processing logic, only for logging at best. What is important is whether the status code works or not, and it sounds like it does.
  6. What is your Windows version ?
  7. Could be that it's only a problem in service. Try to create a simple test project. If you can consistently let it fail, we can test it too. And if it's only in service that's also an indicator for which you can search.
  8. Have you tried a smaller (or simpler) POST to that page? Have you tried other URLs? Do you only have this (no OK) with that URL? Do you also have this only with POST or also with GET to that URL?
  9. Yes, unless you have access to the server's private key. Which is why I also mentioned Fiddler, which acts as a proxy and can capture HTTPS.
  10. Without knowing what it actually returns, this is hard to diagnose. You said the LSize was 274. So what's in Buf when the second call to WinHttpQueryHeaders returns?
  11. It does. When it is called the 1st time with a nil buffer and 0 size, it returns the actual buffer size that is needed, which would include room for the null terminator. On the 2nd call, when the buffer is actually filled in, it returns the number of bytes actually written into the buffer, not counting the null terminator, but the actual null terminator is written. A lot of Win32 APIs work this way. Then either the "OK" text is not actually on the response, or the API is broken. That would imply a bug in the API that would need to be reported to Microsoft. The API doesn't provide the complete raw response, only pieces of it. You would have to use a packet sniffer like Wireshark or Fiddler to capture the complete raw response.
  12. Uwe Raabe

    Switching off automatic Bookmarks?

    Well, MMX was born in 2001 and I assume the help is just as old.
  13. Can you share the URL and request ?
  14. More like (O#0K#0#0#0) if you are looking at raw bytes. But yes, it should be 6 bytes (2 wide chars + 1 wide null terminator) since the Unicode version of WinHTTPQueryHeaders() is being called. Correct. And since the Result is a String, the SetLength() will actually allocate memory for a null terminator even though it is not being requested in the size. So, the code should be calling SetLength(2) for 'OK' but it will allocate memory for 3 Chars, enough for WinHTTPQueryHeaders() to fill in.
  15. Because the resulting string only needs (LSize div 2) - 1 characters. LSize is the size in bytes. Result is an array of widechars/unicodechars which contain 2 bytes. So if LSize is 6 bytes (OK#0#0 in unicode) you only need 2 character string. 6 div 2 = 3 - 1 is 2 for OK. https://learn.microsoft.com/en-us/windows/win32/api/winhttp/nf-winhttp-winhttpqueryheaders
  16. But what is the result of that call? Is it ERROR_WINHTTP_HEADER_NOT_FOUND or something else?
×