Download Pelles C here: http://www.pellesc.se
Quote from: Vortex on April 10, 2026, 09:52:04 AMSorry but is it allowed to discuss about API hooking in this forum?Like many other things, this can be used for both good and bad.
Quote from: unwake on April 10, 2026, 04:09:53 AMhttps://github.com/TsudaKageyu/minhook/releases/tag/v1.3.4I can't find any documentation about this format (I'm guessing this is a some semi-new Microsoft crap, and with their documentation department being years behind everyone else, maybe not surprising). I will keep looking, but with no proper documentation I'm not sure what I can do...
Minhook has dynamic and static lib, link with dynamic lib is ok, but link with static lib "libMinHook.x64.lib", say error:
POLINK: fatal error: Unsupported anonymous format in object 'x64\Release\libMinHook\hook.obj'.
can you fix it ?
warning #2808: Multiple unsequenced references to 'p_tmp'.
from:
p_tmp = wcsstr(++p_tmp,L":");// worked but ....
to:
p_tmp++;
p_tmp = wcsstr(p_tmp,L":");// no warning now....Input to AI
Translate only the quoted text into Chinese Simplified -
IDS_BADSCREENRESOLUTION, "The effective screen resolution must be at least %dx%d.\r\nIt is recommended that you either increase your screen resolution setting or reduce your DPI scaling setting. Continue\?"
IDS_BADCOMCTLVERSION, "The system file COMCTL32.DLL is missing or too old.\r\nPelles C IDE require version %ls or higher."
IDS_BADVERSION, "Bad version on \'%ls\'."
IDS_OUTOFMEMORY, "Out of memory."
IDS_MEMORYERROR, "Memory error! Try to save your files - but exit as soon as possible!"
IDS_COMMDLGERROR, "Error in Windows Common Dialog (this shouldn\'t have happened!). The error code is 0x%lx."
IDS_THREADERROR, "Unable to create new process or thread."
IDS_DEBUGGERERROR, "Internal debugger error!\r\n\r\nException code: %08X\r\nException address: %P"
IDS_EXECERROR, "Unable to execute \'%ls\'."
IDS_PIPEERROR, "Unable to create a new pipe."
IDS_BADNUMBER, "Invalid numeric value."
IDS_BACKUPERROR, "Error initializing backup copy for file \'%ls\'."
IDS_CHANGEDIRERROR, "Unable to change to folder \'%ls\'."
IDS_CREATEDIRERROR, "Unable to create folder \'%ls\'."
Output from AI
IDS_BADSCREENRESOLUTION, "有效屏幕分辨率必须至少为 %dx%d。\r\n建议您调高屏幕分辨率设置,或调低 DPI 缩放设置。是否继续?"
IDS_BADCOMCTLVERSION, "系统文件 COMCTL32.DLL 丢失或版本过旧。\r\nPelles C IDE 需要 %ls 或更高版本。"
IDS_BADVERSION, "\'%ls\' 版本错误。"
IDS_OUTOFMEMORY, "内存不足。"
IDS_MEMORYERROR, "内存错误!请尝试保存文件 — 但请尽快退出程序!"
IDS_COMMDLGERROR, "Windows 通用对话框出错(不应出现此错误!)。错误代码为 0x%lx。"
IDS_THREADERROR, "无法创建新进程或线程。"
IDS_DEBUGGERERROR, "调试器内部错误!\r\n\r\n异常代码:%08X\r\n异常地址:%P"
IDS_EXECERROR, "无法执行 \'%ls\'。"
IDS_PIPEERROR, "无法创建新管道。"
IDS_BADNUMBER, "无效的数值。"
IDS_BACKUPERROR, "初始化文件 \'%ls\' 的备份副本时出错。"
IDS_CHANGEDIRERROR, "无法切换至文件夹 \'%ls\'。"
IDS_CREATEDIRERROR, "无法创建文件夹 \'%ls\'。"
Quote from: PhilG57 on April 10, 2026, 05:47:28 PMOf course, now I'm wondering if there is any way to get this information at run time...Try this:
Thanks again.
#include <stdio.h>
#include <stdlib.h>
/*
* Get the C standard independently from MS compatible
* mode setting
*/
#ifdef __STDC_VERSION__
#define C_VERSION __STDC_VERSION__
#else
#define C_VERSION __POCC_STDC_VERSION__
#endif
const unsigned long C_version = C_VERSION;
int main(int argc, char *argv[])
{
switch(C_version)
{
case 199901:
printf ("diff.c: Compiler standard is C99 (%lu).\n", C_version);
break;
case 201112:
printf ("diff.c: Compiler standard is C11 (%lu).\n", C_version);
break;
case 201710:
printf ("diff.c: Compiler standard is C17 (%lu).\n", C_version);
break;
default:
printf ("diff.c: Compiler standard is unknown (%lu).\n", C_version);
break;
}
return 0;
}
// Code by Google Gemini
#include <stdio.h>
#include <stdint.h>
#include <string.h>
// const char b64_table[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
// Some tools (like rclone in certain modes) use Base64Url, which is a variant designed to be safe for filenames and URLs.
// In that variant, + is replaced with - and / is replaced with _.
// Rclone compatibility
const char b64_table[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
typedef struct {
uint8_t buffer[20];
uint64_t length;
int shift;
} QuickXorHashContext;
void qxh_init(QuickXorHashContext *ctx) {
memset(ctx, 0, sizeof(QuickXorHashContext));
}
void qxh_update(QuickXorHashContext *ctx, const uint8_t *payload, size_t len) {
for (size_t i = 0; i < len; i++) {
int byte_pos = ctx->shift / 8;
int bit_pos = ctx->shift % 8;
uint8_t v = payload[i];
// XOR with explicit cast to uint8_t to suppress Pelles C warnings
ctx->buffer[byte_pos] ^= (uint8_t)(v << bit_pos);
// Handle overflow into the next byte (circularly)
if (bit_pos > 0) {
int next_byte = (byte_pos + 1) % 20;
ctx->buffer[next_byte] ^= (uint8_t)(v >> (8 - bit_pos));
}
ctx->shift = (ctx->shift + 11) % 160;
}
ctx->length += len;
}
void qxh_finalize(QuickXorHashContext *ctx, uint8_t *out) {
memcpy(out, ctx->buffer, 20);
// XOR the 64-bit length into the last 8 bytes (Little Endian)
for (int i = 0; i < 8; i++) {
out[12 + i] ^= (uint8_t)((ctx->length >> (8 * i)) & 0xFF);
}
}
void base64_encode(const uint8_t *in, char *out) {
int i, j = 0;
for (i = 0; i < 18; i += 3) {
out[j++] = b64_table[in[i] >> 2];
out[j++] = b64_table[((in[i] & 0x03) << 4) | (in[i+1] >> 4)];
out[j++] = b64_table[((in[i+1] & 0x0f) << 2) | (in[i+2] >> 6)];
out[j++] = b64_table[in[i+2] & 0x3f];
}
out[j++] = b64_table[in[18] >> 2];
out[j++] = b64_table[((in[18] & 0x03) << 4) | (in[19] >> 4)];
out[j++] = b64_table[(in[19] & 0x0f) << 2];
out[j++] = '=';
out[j] = '\0';
}
int main(int argc, char *argv[]) {
if (argc < 2) {
printf("Usage: qxh <file>\n");
return 1;
}
FILE *f = fopen(argv[1], "rb");
if (!f) {
perror("Error opening file");
return 1;
}
QuickXorHashContext ctx;
qxh_init(&ctx);
uint8_t buf[16384];
size_t n;
while ((n = fread(buf, 1, sizeof(buf), f)) > 0) {
qxh_update(&ctx, buf, n);
}
fclose(f);
uint8_t hash[20];
char b64[29];
qxh_finalize(&ctx, hash);
base64_encode(hash, b64);
printf("%s\n", b64);
return 0;
}
Page created in 0.031 seconds with 15 queries.