The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 2,953 other followers

Archive for June 1st, 2018

Thread by @shanselman: “Sure. Not too complex. Thread -> .NET is a family. * Core runs on containers, many Linuxes, Windows and Mac. OSS, moves fast. * Framework [‚Ķ]”

Posted by jpluimers on 2018/06/01

Interesting [Archive.is]¬†Thread by @shanselman: “Sure. Not too complex. Thread -> .NET is a family. * Core runs on containers, many Linuxes, Windows and Mac. OSS, moves fast. * Framework [‚Ķ]”

It answers¬†[Archive.is] Thread by @domenic: “Having been out of the scene for over 5 years now, I‚Äôm extraordinarily confused by what‚Äôs going on over in .NET land. Not only the ‚Äúwhat‚ÄĚ, b [‚Ķ]”

Dominic was confused by .NET Core going to support Windows desktop UI apps as platform specific packages to a a cross platform foundation as announced in [WayBack] .NET Core 3 and Support for Windows Desktop Applications | .NET Blog

Via:¬†[WayBack] Miguel de Icaza on Twitter: “Good thread on the evolution of modern .NET by @shanselman‚Ķ “

–jeroen

Posted in .NET, Development, Software Development | Leave a Comment »

Horace Dediu on Twitter: “Personal computing, the first 40 years.‚Ķ “

Posted by jpluimers on 2018/06/01

[WayBack]¬†Horace Dediu on Twitter: “Personal computing, the first 40 years.‚Ķ “

–jeroen

Read the rest of this entry »

Posted in History, Power User | Leave a Comment »

“Unknown function at TMethodImplementationIntercept”

Posted by jpluimers on 2018/06/01

Reminder to self: when you get Unknown function at TMethodImplementationIntercept in a Delphi stack trace from the Exception.StackTrace property or FastMM memory report:

  1. Ensure you generate a .MAP or .TDS file with full debug information
  2. Copy the .MAP or .TDS files to directory of your EXE.

Via:

The Exception.StackTrace was introduced in Delphi 2009 that extended these [WayBack] Exception Members:

Some notes:

  • Fields where you can put hooks in; if there is no hook in place, they won’t be used:
    • [WayBack]¬†Exception.GetExceptionStackInfoProc Field¬†GetExceptionStackInfoProc: function (P: PExceptionRecord): Pointer;
      • This function is called to return an opaque data structure that contains stack information¬†for the given exception information record. This function will be called when the¬†exception is about to be raised or if this is an external exception such as an¬†Access Violation, called soon after the object is created.
    • [WayBack]¬†Exception.CleanUpStackInfoProc Field¬†CleanUpStackInfoProc: procedure (Info: Pointer);
      • This function is called when the destructor is called to clean up any data associated¬†with the given opaque data structure.
    • [WayBack]¬†Exception.GetStackInfoStringProc Field¬†GetStackInfoStringProc: function (Info: Pointer): string;
      • This function is called to return a string representation of the opaque¬†data structure returned by¬†GetExceptionStackInfoProc

TMethodImplementationIntercept was introduced in the System.Rtti unit of Delphi XE6 [WayBack]:

–jeroen

Example code:


unit ExceptionHelperUnit;
interface
uses
System.SysUtils;
type
ExceptionHelper = class helper for Exception
public
function Describe: string;
class procedure RaiseNotImplementedException(const aClass: TClass; const aMethodName: string);
class function GetStackTrace: string;
end;
implementation
uses
System.RTLConsts,
System.SysConst;
type
EStackTraceException = class(Exception); // EProgrammerNotFound to make it really clear this is only to be used in very limited places ??
{ ExceptionHelper }
function ExceptionHelper.Describe: string;
var
lStackTrace: string;
begin
Result := inherited ToString();
if Self is EInOutError then
if Result = System.RTLConsts.SInvalidFileName then
Result := System.SysConst.SInvalidFileName;
if Assigned(StackInfo) then
lStackTrace := StackTrace
else
lStackTrace := 'empty';
Result := Format('Exception'#13#10'%s at $%p: %s'#13#10'with StackTrace'#13#10'%s', [ClassName, ExceptAddr, Result, lStackTrace]);
end;
class function ExceptionHelper.GetStackTrace: string;
begin
try
Result := 'Get StackTrace via Exception.';
raise EStackTraceException.Create(Result) at ReturnAddress;
except
on E: EStackTraceException do
Result := E.StackTrace;
end;
end;
class procedure ExceptionHelper.RaiseNotImplementedException(const aClass: TClass; const aMethodName: string);
begin
raise ENotImplemented.CreateFmt('Method %s.%s is not implemented.', [aClass.ClassName, aMethodName]);
end;
end.

Posted in Delphi, Development, FastMM, Software Development | Leave a Comment »

Regex – Does not contain certain Characters – Stack Overflow

Posted by jpluimers on 2018/06/01

I had to find strings containing ” of object”, but not starting with a “)”, so the regex became this:

[^)] of object

Source: [WayBack] Regex РDoes not contain certain Characters РStack Overflow

–jeroen

Posted in Development, RegEx, Software Development | Leave a Comment »

 
%d bloggers like this: