Click here to Skip to main content
15,745,973 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
greetings kind regards . i wish to record calls to my C++ library via its API then at a later time playback all in same sequence . this to duplicate errors which may be reported and reproduced by users so as to permit investigation and correction . i assumed such software previously exists but could find none via web search . i humbly request kind readers of this paltry postulant provide generous recommendation . thank you kindly - Cheerios

if pre-existing code does not exist i am happy to write my own as it seems then to be a useful i.e. profitable product . but that is a contradiction as if that were so than many others more knowledgeable and skillful than myself would have done so long ago . so if i am mistaken in my ignorant belief re/ usefulness to other programmers kindly advise . thank you most generously

What I have tried:

seeked advice in Lounge . advice kindly provided by The Lounge[^] but flew over head . searched web found only references to something called REST and RESTful . have no idea their meaning but does not seem helpful as saw no discussion re/ playback . also discussion of same seems overly complicated and sophisticated as my needs are simple for a simple desktop library which interacts only w/ permanent storage and no internet or web services .
Updated 20-Mar-23 2:11am
Richard MacCutchan 20-Mar-23 7:09am    
Looking at Google's search results I suspect you will need to write your own.
Shao Voon Wong 20-Mar-23 8:46am    
Take a look at my C++ article:
Shao Voon Wong 20-Mar-23 8:58am    
Take a look at my New C++ Streams library:

For example, to add a user, you write in the log

"ADD_USER Name:{0}, Age:{1}"

To read from the log for replay, you use the same above format string to parse for the Name and Age.

If I remember correctly, it ignores the timestamp before "ADD_USER", so you need not extract the timestamp out.

I've never heard of such a thing, though there is Microsoft Detours[^] which may allow you to write your own app to do it.
Share this answer
Logging is usually not necessary to record all C++ calls - it usually works at a higher level, for example, for login events you would usually record "user A logged in, time, device, credentials, result" rather than a bunch of calls to C++ libraries, because when you analyze you are usually looking at business events rather than library calls, and libraries are only good to look at if they belong to a business level event, and recording every library call is usually not a good way to debug.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900