News:

Download Pelles C here: http://www.pellesc.se

Main Menu

Recent posts

#11
Add-ins / Re: Hint Add-IN
Last post by John Z - October 16, 2026, 12:32:10 PM
Well no downloads of the last version :( , anyway -

Here is a new version of the Hint Add-in. This Hint version 2, is updated to include the features in the recent Hint_SA version.  Using Pelles Menu Tools - Options - Add-ins - 'PellesC win32 API Function Hint' then select the Options button, one can choose their preferred web search provider and if they want the output to just go to the Pellec Output tab rather than the output Dialog window.

It also includes a few minor tweaks here and there.

The database has not changed but is included here just in case needed.  Hint Add-in and Hint_SA both use the same database and the same Win32.chm.

Sources are included as well as a ready to use Hint.dll.

John Z

Are there other search providers that would be helpful to add? Send me a message through Pelles.
#12
Bug reports / Re: Merging 4 byte loads into ...
Last post by TimoVJL - October 14, 2026, 02:08:40 PM
Bug have been since version 11  :(
#13
Bug reports / Merging 4 byte loads into 32 b...
Last post by omolin - October 14, 2026, 12:59:48 PM
Hi I ran into this problem when optimization was enabled. Without it the code runs fine.
As I'm not x86 assembly fluent that report part is AI generated, but I hope it should be clear what the issue is:

Pelles C 14.50.0 (pocc 14.50.0, polink 14.50.1), Windows 11 x64. Also seen on 13.00.9.
Target /Tx64-coff. Fails at /Ot, /Ox, /Os, /O1 and /O2; correct without /O.

Repro (repro.c):

#include <stdio.h>
#include <stdint.h>
#include <string.h>

static uint32_t get_le32(const uint8_t *f, size_t n)
{
    return (uint32_t)f[n - 4] | ((uint32_t)f[n - 3] << 8) |
           ((uint32_t)f[n - 2] << 16) | ((uint32_t)f[n - 1] << 24);
}

int main(void)
{
    uint8_t buf[64];
    size_t n;
    int bad = 0;
    for (n = 0; n < sizeof buf; n++)
        buf[n] = (uint8_t)(n * 7u + 1u);
    for (n = 4; n <= sizeof buf; n++) {
        uint32_t got = get_le32(buf, n), want;
        memcpy(&want, buf + n - 4, 4);
        if (got != want) { printf("n=%u: got %08X want %08X\n", (unsigned)n, got, want); bad++; }
    }
    printf("%s\n", bad ? "FAIL" : "OK");
    return bad != 0;
}

Build:
  pocc /Tx64-coff /std:C11 /Ze /MT /Ot repro.c
  polink /SUBSYSTEM:CONSOLE /MACHINE:X64 repro.obj

Result:
  without /O : prints OK
  /Ot /Ox /Os /O1 /O2 : "CRT: unhandled exception (main) -- terminating"

Generated code for get_le32 at /Ot (pocc /Tx64-asm):
  add rcx,rdx
  mov rax,4294967292        ; 0x00000000FFFFFFFC
  mov eax,dword [rcx+rax]   ; reads f + n + 4 GB - 4 -> access violation
  ret

Merging the four byte loads into one dword load is fine. The bug is the displacement:
-4 is materialized as the 32-bit value 0xFFFFFFFC zero-extended to 64 bits, instead of
sign-extended (mov rax,-4, or simply dword [rcx+rdx-4]). It looks like the
"n - 4" offset is computed in 32-bit unsigned arithmetic and then widened when the
index is size_t.
#14
Add-ins / Re: SrcFileCC2 Add-In for v9, ...
Last post by TimoVJL - October 14, 2026, 11:55:00 AM
Copy include folder to different place and for clang add this end of 13889 line to winnt.h file
&& !defined(__clang__)and then testing code with Win32API is easier with clang-cl.exe.
A bare clang-cl.exe is enough for testings.
A standard headers are always problem between C compilers.
#15
Work in progress / Re: A support library to simpl...
Last post by Michele - October 13, 2026, 09:31:20 AM
Quote from: Robert on October 13, 2026, 04:36:20 AMHi Michele:

This may not be relevant to your current project but it is something to keep in mind going forward.

Quoted from SQLite Release 3.54.0 On 2026-10-09
at
https://sqlite.org/releaselog/3_54_0.html

Quote10: Drop support for WindowsXP and earlier Windows versions, including WindowsCE. SQLite for Windows now requires Windows Vista (circa 2007) or later.
Thanks Robert, the short answer: my software isn't compatible with windows older than win10.
To allow for such old systems I should have used more complex approaches to obtain the results I got, I don't mean that isn't possible to make it back compatible, but I concluded that it wasn't worth the extra effort and, main reason, would have slowed down everything.
Anyway, because I'll publish the whole source, anybody, in case of need, can refactor it to the appropriate OS, also Linux maybe.
#16
Work in progress / Re: A support library to simpl...
Last post by Robert - October 13, 2026, 04:36:20 AM
Hi Michele:

This may not be relevant to your current project but it is something to keep in mind going forward.

Quoted from SQLite Release 3.54.0 On 2026-10-09
at
https://sqlite.org/releaselog/3_54_0.html

Quote10: Drop support for WindowsXP and earlier Windows versions, including WindowsCE. SQLite for Windows now requires Windows Vista (circa 2007) or later.
#17
Add-ins / Re: Chm help helper
Last post by TimoVJL - October 12, 2026, 09:19:36 PM
No need to hilight, just cursor over keyword and hit F1 key.

If Win32.chm is already in poide help settings, it take it first before ChmHelpAW Add-In.
A that F1 help system is chained.
A that Win32.chm from John Z package is in my tests and works.

Tested Win32.chm is Laurence Jackson's version and it is very old, so it don't support any 64-bit definitions.
#18
Add-ins / Re: Chm help helper
Last post by Vortex - October 12, 2026, 08:20:23 PM
Hi Timo,

Highlighting the API CreateWindowEx on Pelles IDE, I hit F1. The IDE guided me to the chapter About Common Controls.
#19
Add-ins / Re: Chm help helper
Last post by TimoVJL - October 12, 2026, 08:12:42 PM
Just use F1 key on keyword
#20
Add-ins / Re: Chm help helper
Last post by Vortex - October 12, 2026, 08:05:16 PM
Hi Timo,

Thanks for your add-in. I managed to install it. Right clicking an API function, the internal browser of Pelle's IDE takes me to the first page of win32.chm, Microsoft Win32 Programmer's Reference.