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 1,854 other subscribers

Archive for 2018

Windows service states and service state transitions

Posted by jpluimers on 2018/09/12

States via [WayBackSERVICE_STATUS structure (Windows)

Value Hex Meaning
SERVICE_CONTINUE_PENDING 0x00000005 The service continue is pending.
SERVICE_PAUSE_PENDING 0x00000006 The service pause is pending.
SERVICE_PAUSED 0x00000007 The service is paused.
SERVICE_RUNNING 0x00000004 The service is running.
SERVICE_START_PENDING 0x00000002 The service is starting.
SERVICE_STOP_PENDING 0x00000003 The service is stopping.
SERVICE_STOPPED 0x00000001 The service is not running.

 

State transition overview

It’s complex as a table, so there are two.

  • The initial state is SERVICE_STOPPED.
  • Most logical targets are in italic.

Common transitions:

From state To state
SERVICE_STOPPED SERVICE_START_PENDING
SERVICE_START_PENDING SERVICE_RUNNING
SERVICE_START_PENDING SERVICE_STOPPED
SERVICE_START_PENDING SERVICE_STOP_PENDING
SERVICE_RUNNING SERVICE_STOPPED
SERVICE_RUNNING SERVICE_STOP_PENDING
SERVICE_STOP_PENDING SERVICE_STOPPED

Infrequent transitions:

From state To state
SERVICE_RUNNING SERVICE_PAUSE_PENDING
SERVICE_RUNNING SERVICE_PAUSED
SERVICE_PAUSE_PENDING SERVICE_PAUSED
SERVICE_PAUSE_PENDING SERVICE_STOP_PENDING
SERVICE_PAUSE_PENDING SERVICE_STOPPED
SERVICE_PAUSED SERVICE_RUNNING
SERVICE_PAUSED SERVICE_CONTINUE_PENDING
 SERVICE_PAUSED SERVICE_STOP_PENDING
 SERVICE_PAUSED SERVICE_STOPPED
SERVICE_CONTINUE_PENDING SERVICE_RUNNING
 SERVICE_CONTINUE_PENDING  SERVICE_STOP_PENDING
 SERVICE_CONTINUE_PENDING  SERVICE_STOPPED

Read the rest of this entry »

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

delphi – How to make a combo box with fulltext search autocomplete support? – Stack Overflow

Posted by jpluimers on 2018/09/12

Interesting solutions based on the TLama first answer at [WayBackdelphi – How to make a combo box with fulltext search autocomplete support? – Stack Overflow

Via: [WayBack] Nice solution by TLama – Thomas Mueller (dummzeuch) – Google+

–jeroen

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

Office 365 #fail: … every now and then – without any UI showing high CPU usage …

Posted by jpluimers on 2018/09/11

After each reboot on the admin console after every logon and after every RDP connection:

net stop ClickToRunSvc

Via [WayBack] Office 365 #fail: Not sure yet, but every now and then – without any UI showing – C:\Program Files\Common Files\Microsoft Shared\ClickToRun\OfficeClickT… – Jeroen Wiert Pluimers – Google+

Office 365 #fail: Not sure yet, but every now and then – without any UI showing – C:\Program Files\Common Files\Microsoft Shared\ClickToRun\OfficeClickToRun.exe is using truckloads of CPU while executing an invisible OneDriveSetup.exe both totaling 100% of the full CPU for tens of minutes.

Since it needs to run after each RDP connection, Windows: running a batch file during logon of a single or all users is not enough.

I will need to dig into [WayBack] remote desktop – Run application or script on Windows RDC connection – Super User and [WayBack] SessionChangeDescription Struct (System.ServiceProcess) | Microsoft Docs

–jeroen

Posted in Office, Office 2016, Power User | Leave a Comment »

Schema Central: XML vocabularies with all their XSD schema’s in a nice browsable overview including references, explanations and examples

Posted by jpluimers on 2018/09/11

Schema Central, by [WayBackDatypic, Inc. (Priscilla Walmsley) is to golden that I quote the whole index page below.

The index refers to XML vocabularies. Each vocabulary page links the corresponding XSD pages. Each XSD page lists documentation, elements, etc. Each element page then documents the element, shows where it is referenced from.

Welcome to Schema Central, an interactive tool to traverse and search XML schemas. Please choose your XML vocabulary of interest to get started. Don’t see the XML vocabulary you use? Ask us to add it.

Core XML Technologies

Presentation-Oriented Standards

Office/Narrative Document Standards

Web Services Technologies

Security-Related Technologies

Site developed and hosted by Datypic, Inc.

Please report errors or comments about this site to contrib@functx.com

[WayBack]

If I ever need a long term XML/XSD/XSLT/XQuery hire, this is the “about” information I need:

Datypic provides consulting services and training, specializing in XML, content management and SOA/Web Services architecture and development. We are experts in XML-related technologies such as XML Schema, XSLT and XQuery, and have extensive experience with software development and implementation.

We participate in consulting projects ranging from one day to many months, anywhere in the world. We can arrange to work remotely or at your site, whichever you prefer.

For more information, please read about our services or our company, or contact us as pwalmsley@datypic.com.

Recent news from Priscilla Walmsley

  • I recently updated my book XQuery to match the final XQuery 3.1 recommendation. You can read more about it or order it from O’Reilly or Amazon.
  • I recently taught a course at the XML Summer School on Refactoring XSLT. Slides are available as a PDF.
  • More information about my recent books and articles is available on this site.

–jeroen

Posted in Development, Software Development, XML, XML/XSD, XPath, XSD, XSLT | Leave a Comment »

Delphi 10 Seattle and up try “recover” unchanged files in the `$(BDS)` tree

Posted by jpluimers on 2018/09/11

Every now – after some period of inactivity – I get an error like this when not having changed the file at all:

---------------------------
Error
---------------------------
Cannot create file "C:\Program Files (x86)\Embarcadero\Studio\18.0\Source\DUnit\src\__recovery\GUITestRunner.pas". Het systeem kan het opgegeven pad niet vinden.
---------------------------
OK Details >> 
---------------------------

This has been present since ever since Delphi 10 Seattle introduced the “recovery” feature on unchanged files in a read-only directory tree like for instance $(BDS).

It assumes the __recovery subdirectory has been created (which it cannot, but never raised an error about), then barfs when it cannot find the directory.

This is a classic example of “nice idea, bad execution, not caught by thinking through all the test cases”.

I think one of the roles played, is that cursor movements are part of the undo/redo stack. My suspicion is that this raises a “changed” flag, where in fact the file is unmodified.

Het systeem kan het opgegeven pad niet vinden. is the Dutch version of ERROR_PATH_NOT_FOUND error code 0x03 English The system cannot find the path specified.

Related:

–jeroen

Read the rest of this entry »

Posted in Delphi, Development, Software Development | 2 Comments »

A refefernce to 6502 by “Remember that in a stack trace, the addresses are return addresses, not call addresses – The Old New Thing”

Posted by jpluimers on 2018/09/11

On x86/x64/ARM/…:

It’s where the function is going to return to, not where it came from.

And:

Bonus chatter: This reminds me of a quirk of the 6502 processor: When it pushed the return address onto the stack, it actually pushed the return address minus one. This is an artifact of the way the 6502 is implemented, but it results in the nice feature that the stack trace gives you the line number of the call instruction.

Of course, this is all hypothetical, because 6502 debuggers didn’t have fancy features like stack traces or line numbers.

Source: [WayBackRemember that in a stack trace, the addresses are return addresses, not call addresses – The Old New Thing

Which resulted in these comments at [WayBack] CC +mos6502 – Jeroen Wiert Pluimers – Google+:

  • mos6502: And don’t forget the crucial difference in PC on 6502 between RTS and RTI!
  • Jeroen Wiert Pluimers: +mos6502 I totally forgot about that one. Thanks for reminding me
    <<Note that unlike RTS, the return address on the stack is the actual address rather than the address-1.>>

References:

[WayBack6502.org: Tutorials and Aids – RTI

RTI retrieves the Processor Status Word (flags) and the Program Counter from the stack in that order (interrupts push the PC first and then the PSW).

Note that unlike RTS, the return address on the stack is the actual address rather than the address-1.

[WayBack6502.org: Tutorials and Aids – RTS

RTS pulls the top two bytes off the stack (low byte first) and transfers program control to that address+1. It is used, as expected, to exit a subroutine invoked via JSR which pushed the address-1.

RTS is frequently used to implement a jump table where addresses-1 are pushed onto the stack and accessed via RTS eg. to access the second of four routines.

–jeroen

Posted in 6502, 6502 Assembly, Assembly Language, Development, History, Software Development, The Old New Thing, Windows Development, x64, x86 | Leave a Comment »

Spelling with element symbols from the Periodic table

Posted by jpluimers on 2018/09/11

The [WayBackPeriodic table – Wikipedia contains many symbols.

Combing them allows you to spell word. Not all words, but many of them can be spelled.

So I was glad finding the below article that started with the same fascination I had in chemistry class.

[WayBackSpelling with Elemental Symbols

It has a great explanation of the algorithm, references to computer science literature and a nice Python implementation.

via: [WayBack] One of the best programming articles I’ve read in a while – This is why I Code – Google+

–jeroen

Read the rest of this entry »

Posted in Algorithms, Development, Fun, LifeHacker, Power User, Python, science, Scripting, Software Development | Leave a Comment »

DFRobot 7″ HDMI Display with Touchscreen Sells for $69 – for use with Raspberry Pi or Adruino

Posted by jpluimers on 2018/09/10

There are plenty of HDMI displays, but if you want a smaller size it become more complicated although some 7″ HDMI displays are available. However, if you

Source: [Archive.isDFRobot 7″ HDMI Display with Touchscreen Sells for $69

Via: [Archive.is] 7″ HDMI touchscreen display with mounting holes for +Raspberry Pi board. – Jean-Luc Aufranc – Google+

–jeroen

Posted in Development, Hardware Development, Power User, Raspberry Pi | Leave a Comment »

Notifications – Google+

Posted by jpluimers on 2018/09/10

For mu own memory: Notifications – Google+ are at https://plus.google.com/notifications/all

–jeroen

 

Posted in G+: GooglePlus, LifeHacker, Power User, SocialMedia | Leave a Comment »

Nooit toestemming gegeven, toch in het EPD? Check het zelf! | Platform Bescherming Burgerrechten

Posted by jpluimers on 2018/09/10

[WayBackNooit toestemming gegeven, toch in het EPD? Check het zelf! | Platform Bescherming Burgerrechten:

Burgers ontdekken dat hun medische gegevens in het systeem staan en door verschillende partijen zijn geraadpleegd, zonder dat ze daar ooit toestemming voor gaven. De enige manier om zeker te weten dat je dossier niet via het systeem beschikbaar wordt gesteld, is door dit zelf na te vragen.

–jeroen

Posted in LifeHacker, Power User, Privacy | Leave a Comment »