Skip to content
Advertisement

Tag: c++

How to cross-compile DLL with exported functions

I’m working through a DLL hijacking exercise, and have a DLL written which works as expected when compiled in Visual Studio. Essentially, when the DLL is loaded, it executes a shell command and passes off legitimate functionality (in this example, the CheckEvenOdd and PrintAMessage functions) to the originally intended DLL (in this example, GetEvenOdd.dll). The working code is as follows;

.net core date format on Linux

I’m migrating my code from .net framework to .net core and testing it on a Linux machine, one of the issues I had a problem with is the date format when calling DateTime ToString() function, in Windows the default date format is guided by the OS and can be customized in the settings I’ve tried to do something similar in

Restarting an endless while loop upon a mouse event?

I am aiming a simple code which looks like this: My goal here is to restart the print sequence from “hey 1” immediately when left mouse is clicked. However, I am not able to achieve this without using “if” conditions before every sleep. a “goto” is not working for me across different functions too. Can anyone suggest an optimal solution

Preserve quotes when using wordexp

I’m trying to use the wordexp function to shell-like expansion on some strings. wordexp removes single and double quotes, I would like to preserve those however. My initial though was to just surround all quotation mark pairs in the input string with another pair of, this time escaped, quotation marks which wordexp should leave untouched (or the other way around).

Does clang++ treat system headers in a more relaxed way?

The following struct is defined in the Linux system header file /usr/include/sys/inotify.h: Please note the last field name, which is a zero-length array. C++17 does not support zero-length array, so, if using struct inotify_event in a C++17 project and compiling it with -pedantic, a compiler warning should be raised. However, the following code doesn’t raise any warning for struct inotify_event.

GdkPixbuf change opacity

Is it somehow possible to set the opacity of a of a GdkPixbuf to about 50%? The thing is i am writing in Gtk2 (cannot switch to Gtk3!) a filebrowser widget (for a remote file transfer) and I want the icons of the files to be 50% transparent if the file is hidden. I get the icon using GFileInfo and

Jlibfprint cross compilation

I’m trying to cross-compile the JNI Bridge Jlibfprint using buildroot. This is the source code. Here is the .mk file: Extract, Patch, Update, Configure, Autoreconfiguring, Patching libtool run without problem. Then it failed at Building stage with this: Then I added, these includes to the /JlibFprint_jni/src/Makefile.am And now it fails with: Answer I downloaded JDK for ARM 32 bits and

Advertisement