News:

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

Main Menu

Recent posts

#61
Tips & tricks / Re: Testing resource enum
Last post by Vortex - February 18, 2026, 06:10:40 PM
Hi Timo,

Thanks. Compiling your code, here is my output on Windows 7 :

load powercfg.cpl
#1
#2
#3
#4
#5
#6
#7
#8
#9
#10

Enumerating with Podump :

podump.exe /RESOURCES:HEADERS C:\Windows\System32\powercfg.cpl | findstr "type"
File type: DLL
    type: "MUI", name: 1, language: 1033
    type: "WEVT_TEMPLATE", name: 1, language: 1033
    type: ICON, name: 1, language: 1033
    type: ICON, name: 2, language: 1033
    type: ICON, name: 3, language: 1033
    type: ICON, name: 4, language: 1033
    type: ICON, name: 5, language: 1033
    type: ICON, name: 6, language: 1033
    type: ICON, name: 7, language: 1033
    type: ICON, name: 8, language: 1033
    type: ICON, name: 9, language: 1033
    type: ICON, name: 10, language: 1033
    type: GROUP ICON, name: 202, language: 1033
    type: VERSION, name: 1, language: 1033
    type: MANIFEST, name: 124, language: 10338
#62
Tips & tricks / Testing resource enum
Last post by TimoVJL - February 18, 2026, 04:01:18 PM
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <stdio.h>

#pragma comment(lib, "user32.lib")

int WINAPI EnumResNameProc(HMODULE hModule, LPCSTR lpType, LPSTR lpName,LONG_PTR lParam);

int main(void)
//void __cdecl mainCRTStartup(void)
{
    HMODULE hMod = LoadLibraryEx(TEXT("powercfg.cpl"), NULL, LOAD_LIBRARY_AS_DATAFILE);
    if (hMod) {
        puts("load powercfg.cpl");
        EnumResourceNames(hMod, MAKEINTRESOURCE(RT_ICON), (ENUMRESNAMEPROC)EnumResNameProc, 0);
        FreeLibrary(hMod);
    }
    return 0;
    // ExitProcess(0);
}

int WINAPI EnumResNameProc(HMODULE hModule, LPCSTR lpType, LPSTR lpName,LONG_PTR lParam)
{
    TCHAR szTmp[100];
    if (IS_INTRESOURCE (lpName)) {
        wsprintf(szTmp, TEXT("#%u"), lpName);
        puts(szTmp);
    } else
        puts(lpName);
    return 1;
}
#63
Bug reports / Re: O_BINARY
Last post by TimoVJL - February 18, 2026, 12:10:17 AM
#64
Bug reports / O_BINARY
Last post by Robert - February 17, 2026, 11:52:49 PM
Pelles C .chm documentation states

_setmode function
Declared in:
<io.h>
however, the definitions for the _setmode function "mode" parameter arguments

_O_BINARYetc.,

are not in
<io.h>but, instead, are located in
<fcntl.h>
The <io.h> header should
#include <fcntl.h>

#65
Feature requests / Re: Enhanced editor suggestion...
Last post by TimoVJL - February 16, 2026, 04:46:06 PM
https://forum.pellesc.de/index.php?msg=41529

Modify this for a your purposes.
Use pope.exe to examine obj-files for symbols.
#66
Add-ins / Re: PEObj2Def
Last post by TimoVJL - February 16, 2026, 04:21:25 PM
Standalone version for testing code.
#67
Feature requests / Re: Enhanced editor suggestion...
Last post by PhilG57 - February 16, 2026, 02:21:59 PM
I have no idea how to do that. Besides, I thought Pelle was looking for something to do.
#68
Feature requests / Re: Enhanced editor suggestion...
Last post by TimoVJL - February 15, 2026, 02:40:49 PM
Quote from: PhilG57 on February 15, 2026, 02:16:00 PMThis capability would make it easier locating variables in large multi-file projects and might even help to reduce the number of variables described or defined.  I do love your editor's 'find in files' feature though. 
Perhaps a new Add-In for collect some info from an object files ?
Just do it yourself ?

EDIT: also tag-files contains useful info ?
#69
Feature requests / Enhanced editor suggestion #2
Last post by PhilG57 - February 15, 2026, 02:16:00 PM
A user selectable (on or off) editor feature to display the status of variables.  Ideally the feature would show whether a variable is local, global, static, described in this file or another file, etc. 

This capability would make it easier locating variables in large multi-file projects and might even help to reduce the number of variables described or defined.  I do love your editor's 'find in files' feature though. 
#70
Feature requests / Enhanced editor suggestion
Last post by PhilG57 - February 14, 2026, 05:58:31 PM
I often mess around with existing code written years ago, often for systems other than Windows.  It would be helpful to me if the editor would show which #ifdef/#else/#endif paths were active.  This might be done by highlighting, or not, the appropriate code sections.  Sometime I run into multiple, nested #ifdef's and sorting it all out is a big pain.  Thanks.