From e4d64b63344d4fda3efa482b1184e1379ae80e77 Mon Sep 17 00:00:00 2001 From: Quentin Santos Date: Wed, 6 Mar 2024 21:12:06 +0100 Subject: [PATCH] Show basic usage when no argument is given See https://github.com/qsantos/timeskew.exe/issues/5 --- withdll.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/withdll.cpp b/withdll.cpp index 4e28353..d948aae 100644 --- a/withdll.cpp +++ b/withdll.cpp @@ -23,6 +23,12 @@ static BOOL CALLBACK ExportCallback(_In_opt_ PVOID pContext, _In_ ULONG nOrdinal } int CDECL main(int argc, char **argv) { + if (argc <= 1) { + puts("Usage: timeskew.exe COMMAND..."); + puts("Allow changing the speed of time for a given command"); + return 1; + } + // Find timeskew.dll CHAR dllPath[MAX_PATH]; CHAR *end = dllPath + GetModuleFileNameA(NULL, dllPath, MAX_PATH);