Skip to content

Instantly share code, notes, and snippets.

@ssfang
ssfang / trick.md
Last active April 6, 2016 10:58
EclipseExternalTools

JAVA_HOME=D:\ProgramFiles\Java\jdk1.8.0_40

External Tools – External Tools Configurations

  • Location: ${env_var:JAVA_HOME}/bin/javah.exe

  • Working Directoy: ${container_loc}

  • Arguments: ${string_prompt}

  • container_loc Returns the absolute file system path of a resource's container. The target resource is the selected resource when no argument is specified, or the resource identified by a workspace relative path.

  • string_prompt Returns the text value entered into a prompt dialog. When one argument is provided, it is used as a prompt hint on the input dialog. When a second argument is provided, it is used as an initial value in the input dialog. The first and second arguments must be separated with a ':'.

@ssfang
ssfang / NtQueryInformationProcess.cpp
Last active January 23, 2020 11:51
Get N level parent process id
//#include <stdio.h>
#include <io.h>
#include <fcntl.h>
//#include <windows.h>
//typedef LONG (__stdcall *FPTR_NtQueryInformationProcess) (HANDLE, INT, PVOID, ULONG, PULONG);
//FPTR_NtQueryInformationProcess NtQueryInformationProcess;
// Retrieve function address from DLL
//NtQueryInformationProcess = (FPTR_NtQueryInformationProcess) GetProcAddress(GetModuleHandle("ntdll"), "NtQueryInformationProcess");
//if (NtQueryInformationProcess == NULL) {
@ssfang
ssfang / ndk-path.sh
Last active August 26, 2022 00:44
Get NDKPath
#!/bin/bash --posix
# Avoid an error about function xx() statement on some os, e.g. on ubuntu, Syntax error: "(" unexpected
# http://ubuntuforums.org/archive/index.php/t-499045.html
#filename: ndk-path.sh
###############################################
# . ./ndk-path.sh -tla 4.9 9 mips > result.txt
###############################################