-
Content Count
2848 -
Joined
-
Last visited
-
Days Won
155
Everything posted by Anders Melander
-
Code signing in a remotely working team?
Anders Melander replied to A.M. Hoornweg's topic in General Help
Oh, nice. I didn't know you could do that. It's a real PITA that we have to jump through all these hoops with the physical tokens and the fact that a solution like yours, which is basically a work around, is even possible proves that it was all in vain. But I guess somebody made a lot of money selling the tokens. -
Code signing in a remotely working team?
Anders Melander replied to A.M. Hoornweg's topic in General Help
Let me guess: The client transmits the file to be signed to the server, and the server (which has the physical token) then signs the file and transmits it back to the client. -
Code signing in a remotely working team?
Anders Melander replied to A.M. Hoornweg's topic in General Help
...once they have signed in with an USB token. I don't think you can get around the requirement for the signer to have some kind of physical identification device. -
Code signing in a remotely working team?
Anders Melander replied to A.M. Hoornweg's topic in General Help
Hmm. Okay. I obviously don't know how your build server setup was, or what build system you used, but it should have been possible to completely isolate the different projects. Independent projects, with different developers, tools, etc. on the same build server is nothing out of the ordinary. Anyway, if you are working on different projects, and don't want a centralized solution, then why not just use different certificates? -
Code signing in a remotely working team?
Anders Melander replied to A.M. Hoornweg's topic in General Help
There's your problem. You should use a single central build server instead of delegating the build task to individual developers. If you don't have a central server which can function as a build server, at least designate one of the developers as the "build master". -
Thanks. I just meant this: procedure TReptTextEditor.FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); begin case Key of VK_F1: if Shift=[] then Application.HelpCommand(HELP_CONTEXT,HelpContext); VK_F10: if (ssAlt in Shift) then PopupMenu1.Popup(Left+100,Top+100); end; end; ...and that looks okay.
-
loading a .jpeg to a via stream timagelist at runtime
Anders Melander replied to JIMSMITH's topic in RTL and Delphi Object Pascal
Use TJPEGImage.LoadFromStream to load from the stream Copy the TJPEGImage to a TBitmap using TBitmap.Assign Add the TBitmap to the TImageList using the usual methods -
Only 2 GB available despite IMAGE_FILE_LARGE_ADDRESS_AWARE
Anders Melander replied to dummzeuch's topic in Windows API
Full working set does not mean out of memory; We have virtual memory. Can you explain why increasing the working set solved your problem? https://aviationhumor.net/russians-we-paid-whole-runway-we-use-whole-runway/ -
Only 2 GB available despite IMAGE_FILE_LARGE_ADDRESS_AWARE
Anders Melander replied to dummzeuch's topic in Windows API
<Also known as throwing sh*t at a wall> -
Question about Delphi class (static) constructor
Anders Melander replied to wuwuxin's topic in Algorithms, Data Structures and Class Design
He was wrong. -
I think Cristian is on 11.3 If someone else, other than me (where it works), could check with 12.2 it would be great.
-
Strange. Works for me. Also with 150% What I am seeing though (with 11.3 only), is that if I drop the list by clicking on the left half of the dropdown arrow, and then close the list with another click, then the open dialog is invoked. Dropping the list with a click on the right half works as expected.
-
I just tried with 11.3 and it works exactly the same. Maybe I'm just not understanding what problem your are experiencing. I'm on Windows 10, BTW.
-
I'm curious; What's the purpose then?
-
Works for me with Delphi 12.1 at 175%
-
No comments on why it shrinks but I don't think your Sleep(100) does what you think they do. Your main thread isn't doing anything while the Sleep executes so if the purpose was to let it process the messages generated by mouse_event then you will have to do that some other way. Application.ProcessMessages *shudder* comes to mind.
-
The BEST template engine for generating webpages on the server side?
Anders Melander replied to Edwin Yip's topic in Tips / Blogs / Tutorials / Videos
Why apologize when you are doing it on purpose? -
Is your form modal? If not, do you have a TAction on the mainform with the shortcut [Del] ? KeyPreview is a property on the form. Unless you are intercepting keystrokes on the form there is no reason to have KeyPreview=True. If you need KeyPreview=True then the problem might be that your event handler eats the [Del] key. Show us your code.
-
Watch me coding in Delphi on YouTube
Anders Melander replied to silvercoder79's topic in Tips / Blogs / Tutorials / Videos
That depends on the brain; Some people prefer to read and some prefer to watch a video. I also think it depends on the subject. Highly technical topics, reference material, and so on, are better in writing because we need them to be precise and unambiguous. But video is fine for entry level stuff and conceptual material. I know that very few of our end-users ever read the documentation (they never notice when it falls behind) but the how-to videos get quite a lot of views and feedback. -
No, don't do that; It would accumulate the various errors there is in coordinate system conversion, mouse imprecision, etc. Also, the example just doesn't work. Instead remember the starting mouse position and adjust the scrollbar position with the difference between the starting mouse position and the current position: type TForm1 = class(TForm) [...] private FStartPos: TPoint; end; procedure TForm1.Image1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin FStartPos.X := X; FStartPos.Y := Y; end; procedure TForm1.Image1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); var DeltaMouse: TPoint; begin if (ssLeft in Shift) then begin // How much has the mouse moved since we started the drag? DeltaMouse := Point(FStartPos.X - X, FStartPos.Y - Y); // Reposition scrollbars (i.e. pan the image) ScrollBox1.HorzScrollBar.Position := ScrollBox1.HorzScrollBar.Position + DeltaMouse.X; ScrollBox1.VertScrollBar.Position := ScrollBox1.VertScrollBar.Position + DeltaMouse.Y; end; end;
-
Memory access problem when exchanging WideString in OLE object written in Delphi
Anders Melander replied to kihor's topic in Windows API
Not that it matter much but it isn't necessary to use a dispatch property to return the value. Apart from that I agree with your implementation. -
Memory access problem when exchanging WideString in OLE object written in Delphi
Anders Melander replied to kihor's topic in Windows API
Um... You asked "Shouldn't the calling convention for an automation object be safecall" which to me reads as "the calling convention for an automation object must be safecall". Or was there another reason you mentioned safecall...? -
When will we have a 64-bit IDE version ?
Anders Melander replied to luciano_f's topic in Delphi IDE and APIs
It isn't. I haven't installed it, but I can read. -
Memory access problem when exchanging WideString in OLE object written in Delphi
Anders Melander replied to kihor's topic in Windows API
I think your COM declarations are incorrect. For a method returning a WideString I would have expected something like this: HRESULT _stdcall GetStringValue([out, retval] BSTR* Result); Note that the result is a HResult so I can use safecall; Do yourself a big favor and use that instead of stdcall. So you need to specify that the string: Is being returned from the method Is the function return value (mostly for use by VB and such). And the Delphi implementation will then look like this: function TMyCOM.GetStringValue(out _Result: WideString): HRESULT; stdcall; begin _Result := 'Hello world'; Result := S_OK; end; or this: function TMyCOM.GetStringValue: WideString; safecall; begin Result := 'Hello world'; end; Delphi is actually excellent for writing COM servers and clients. You just need to learn the basics - and if you will be doing a lot of COM (or just a lot of Windows development), learn the low level stuff too. -
Memory access problem when exchanging WideString in OLE object written in Delphi
Anders Melander replied to kihor's topic in Windows API
safecall is a Delphi concept not a COM concept and safecall just "wraps" stdcall. On the server side safecall traps exceptions and convert them to HRESULT error codes and on the client side it convert HRESULT back to exceptions (for error code only, of course). In order for a method to be declared safecall the underlying COM method must return a HRESULT. Thus: procedure HelloWorld(Value: WORD); safecall; is the same as function HelloWorld(Value: WORD): HResult; stdcall; Here endeth the lesson.