smokeOut

smoketime.cpp

Jun 8th, 2023
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.58 KB | None | 0 0
  1. // smoketime.cpp : Defines the exported functions for the DLL.
  2. // credits to BIS, kk and all others
  3.  
  4. #include "pch.h"
  5. #include "framework.h"
  6. #include "smoketime.h"
  7.  
  8. #include <chrono>
  9. #include <ctime>
  10.  
  11. #define _CRT_SECURE_NO_WARNINGS
  12. #define fn_smoketime extern "C" __declspec (dllexport)
  13.  
  14. fn_smoketime void __stdcall RVExtension(char *output, int outputSize, const char *function);
  15.  
  16. void __stdcall RVExtension(char *output, int outputSize, const char *function)
  17. {
  18.     std::time_t ct = std::time(0);
  19.     char* cc = ctime(&ct);
  20.  
  21.     strncpy_s(output, outputSize, cc, _TRUNCATE);
  22. }
  23.  
Advertisement
Add Comment
Please, Sign In to add comment