Monday, August 6, 2018

One version of kbhit() using windows API


Here is one version of kbhit() using windows API (GetAsyncKeyState). It runs through 255 possible key scancodes in pulses. If a key is pressed, it returns 1 and the value of the key pressed by reference.
This can be used to make a rudimentary keylogger in Windows.
Proof of concept:  Keylogger Source code

#include <windows.h>
Prototype: int kbhit(char *ch); 
Call:
int keypressed=0;
char ch=0;

keypressed = kbhit(&ch);







Saturday, July 21, 2018

Listing files recursively in C in a menu with scroll.


One of the most complex programs I've ever written which makes use of my latest development with list boxes in C. You can navigate and change path while the different files and directories in the new path are added to the dynamic list for scroll.


>> SOURCE CODE <<

Saturday, July 14, 2018

Segmentation Fault - C Pointers


Segmentation Fault!!!

I have seen this phrase so many times I may end up having nightmares with it. But I got there in the end!! In my experience,  it seems the only way to learn how to use pointers properly is through trial and error. :D

This time I've used them to develop a ListBox in C with scroll capabilities.
As usual you can find it in my github repository. (Code available for Linux, Windows and DOS).

Cheers!

Demo:



Sunday, March 4, 2018

C-Edit (In progress)


I'm working on developing an editor in C for Linux in the fashion of the old MS-DOS edit.com.
Features (so far):

  • Double screen buffer in memory for greater display control.
  • ANSI functions for changing color output, hide cursor, box-like characters, etc.
  • No Ncurses. 
  • Kbhit() so that I can loop without stopping the program (eg: display current time).
  • Drop-down menus with a circular linked list.

You can find it on my Github Page. Screen caps: