Jump to content

Mark-

Members
  • Content Count

    313
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Mark-

  1. Mark-

    TWSocket,,,

    Thank you Angus.
  2. Mark-

    TWSocket,,,

    Thank you. Not being on the stack is the only difference I see at the moment. I will give it a go and post the result.
  3. Mark-

    TWSocket,,,

    No problem. I found this on SO. "... that illustrates that in fact SO_BSP_STATE requires a buffer more than sizeof(CSADDR_INFO), which is in direct contrast to the Microsoft published documentation: ... Still looking for a working example in any language.
  4. Mark-

    TWSocket,,,

    Thanks for the response. Same result.
  5. Mark-

    TWSocket,,,

    Well, the wall has been hit. Not sure what is going on. Using what I "think" should work ends with: Replacing add_info:CSADDR_INFO; with add_info:CSADDR_INFO2 and no error. type SOCKET_ADDRESS = record lpSockaddr:PSOCKADDR; iSockaddrLength:integer; end; type CSADDR_INFO = record LocalAddr:SOCKET_ADDRESS; RemoteAddr:SOCKET_ADDRESS; iSocketType:Integer; iProtocol:Integer; end; type CSADDR_INFO2 = record space:array [0..127] of byte; end; procedure TForm3.FormDestroy(Sender: TObject); begin WSocket1.Abort; end; function GetLastSocketErrorMessage: string; var ErrorCode:integer; Buffer:array[0..255] of Char; begin ErrorCode := WSAGetLastError; if ErrorCode <> 0 then begin FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM or FORMAT_MESSAGE_IGNORE_INSERTS, nil, ErrorCode, 0, Buffer, SizeOf(Buffer), nil ); Result := Format('Socket Error %d: %s', [ErrorCode, StrPas(Buffer)]); end else Result := 'No socket error.'; end; procedure TForm3.FormShow(Sender: TObject); var optLen:integer; add_info:CSADDR_INFO; begin WSocket1.Connect; OptLen:=SizeOf(add_info); FillChar(add_info,OptLen,#0); if WSocket_getsockopt(WSocket1.HSocket, SOL_SOCKET, SO_BSP_STATE, @add_info, OptLen) = SOCKET_ERROR then ShowMessage(GetLastSocketErrorMessage); Any ideas? Mark
  6. Mark-

    TWSocket,,,

    Thanks Angus.
  7. Mark-

    EnumFontFamiliesEx...

    Hello, Delphi 10.2.3. I have worked out how to collect the character sets (scripts) for each font name. Now I am trying to convert the byte values returned from EnumFontFamiliesEx to the name of the character set like is seen below under Script. Web searching, no joy. WIN32 Programmer's Reference, no joy. Any ideas? Thanks, Mark
  8. Mark-

    EnumFontFamiliesEx...

    I did, after my last post. Thanks for your time.
  9. Mark-

    EnumFontFamiliesEx...

    I guess you are not comparing them. Not sure what you are trying to do Remy. I wrote in the first post, I wanted to use the same script names that TFontDialog displayed. The matrix I produced has the descriptions, the post you refer to does not have any descriptions used by TFontDialog. I had to create a few descriptions because TFontDialog did not show the font. Remy, I know you provide a lot of help on this forum and on other sites. And I have, many times, read your post and thought it was great. I am not sure you are helping in this thread.
  10. Mark-

    EnumFontFamiliesEx...

    No, it is not the same.
  11. Mark-

    VCL Styles Utils...

    Hello, Anyone using it with success? (https://github.com/RRUZ/vcl-styles-utils) Or have another solution to style common dialogs? Mark
  12. Mark-

    VCL Styles Utils...

    It was an API call that had wrong parameters.
  13. Mark-

    EnumFontFamiliesEx...

    Right, that is what I was searching for, "...OS wants to display". Then regardless of language, I assume, it would be correct. But, no joy. So I went through all the fonts on my computer, which TFontDialog does not show them all, and created this matrix,
  14. Mark-

    EnumFontFamiliesEx...

    Thanks for the response. Yeah, I could not find anything. The issue is multiple languages. I wonder what TFontDialog displays on French/Spanish/etc. machines.
  15. Mark-

    EnumFontFamiliesEx...

    Thanks for the response. I have the table and is it is not the text that appears in TFontDialog. I am seeking the text "description".
  16. Mark-

    VCL Styles Utils...

    Thanks for the response. It is the code from the current release on github that fails. For now, I will keep looking about.
  17. Mark-

    VCL Styles Utils...

    Thanks for the response. I posted because the code has at least one compiling error and does not seem to be supported any longer. Do I want to invest time in it if there is another, possibly, better solution.
  18. Mark-

    Moving from W10 -> W11

    Hello, Using Delphi 10.2.3 Any advice? Anyone that made the switch then reverted to W10? Thanks, Mark
  19. Mark-

    Moving from W10 -> W11

    Why is W11 better than W10?
  20. Mark-

    Moving from W10 -> W11

    Thanks. I am putting it off for now. I have W11 running in a VM and have been looking at it. Trying to make it like W10. 😀
  21. Mark-

    Using TFDConnection for MS Acceess .accdb

    Yes it is possible, we and some of our customers connect to MS Access. Not the most used database, but used. From our user manual: Direct connect to the data base At least these three parameters must be present for direct connection to a database via ODBC. DriverID ODBCDriver Database A DSN can be used and then just a DataSource parameter is needed. I know it worked when I tested it but, I have never seen a user apply it. All I have seen is the first example and it is what I use. Mark
  22. It does not work on my Notepad++.
  23. Not the versions on my computer.
  24. Does not work in 10.2. I just checked three other text editor programs and MS word was the only one that supported it.
  25. Mark-

    TDBEdit...

    Hello, Delphi 10.2.3, FireDAC, OBDC. I am using Excel for testing. When the Excel cell contains text I can set the "align" property in a TDBEdit and all is fine. The right column values are numbers and the alignment only applies when the cell is in edit mode, the "align" property of TDBEdit is applied, In "browseMode" the alignment seems to be overridden from the TFieldDataLink of TDBEdit, which is not exposed. Anyone run across this before? Thanks, Mark
×