News:

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

Main Menu

Recent posts

#71
Projects developed with Pelles C / Re: Simple Calendar
Last post by Marco - July 15, 2026, 09:51:24 AM
Hi John,

QuoteI'll look into adding a button (no guarantees though).
Thank you for taking this into consideration. As I said, it's just a small suggestion. I like consistency in software. But this is just a personal preference.

Quoteas well as now testing the new 14.5  :)
Yep, me too  :)

Marco
#72
Projects developed with Pelles C / Re: Simple Calendar
Last post by John Z - July 14, 2026, 09:33:43 PM
Hi Marco,

Thanks for the feedback.  I'll look into adding a button (no guarantees though).
I'm in the middle of the next thing though, so it might be a bit for enhancement, as well as now testing the new 14.5  :)

John Z
#73
Announcements / Re: Release Candidate #1 for v...
Last post by Vortex - July 14, 2026, 09:30:48 PM
Assembling and linking the code below with Poasm Version 14.50.0 :

.386
.model flat,stdcall
option casemap:none

ExitProcess PROTO :DWORD
printf PROTO C :DWORD,:VARARG
OutputText PROTO C :DWORD,:VARARG

ALIAS "OutputText"="printf"

includelib  \PellesC\lib\Win\kernel32.lib
includelib  msvcrt.lib

.data

string      db 'Hello world!',0

.code

start:

    invoke  OutputText,ADDR string

    invoke  ExitProcess,0

END start

The executable is crashing.

An Ollydbg session is demonstrating the issue :

012D1000 > $ 68 00202D01    PUSH CalcLen.012D2000                    ;  ASCII "Hello world!"
012D1005   . E8 F6EFFFFF    CALL CalcLen.012D0000
012D100A   . 83C4 04        ADD ESP,4
012D100D   . 6A 00          PUSH 0                                   ; /ExitCode = 0
012D100F   . E8 00000000    CALL <JMP.&KERNEL32.ExitProcess>         ; \ExitProcess
012D1014   $-FF25 5C202D01  JMP DWORD PTR DS:[<&KERNEL32.ExitProcess>;  kernel32.ExitProcess
012D101A   .-FF25 64202D01  JMP DWORD PTR DS:[<&msvcrt.printf>]      ;  msvcrt.printf

CALL CalcLen.012D0000 is not correct.
#74
Announcements / Re: Release Candidate #1 for v...
Last post by John Z - July 14, 2026, 09:29:37 PM
Thanks Pelle!

Nice surprise  :)
👍👍👍

John Z
#75
Announcements / Re: Release Candidate #1 for v...
Last post by Vortex - July 14, 2026, 03:56:05 PM
Hi Pelle,

Thanks for the new release. Regarding the keyword ALIAS :

QuoteRevised POASM handling of ALIAS directive (IA32, AMD64, ARM64).

Could you give an example? I am trying to rebuild my example below :

https://forum.pellesc.de/index.php?topic=11168.0

This one does not seem to work with Poasm Version 14.50.0 :

printf PROTO C :DWORD,:VARARG
OutputText PROTO C :DWORD,:VARARG

ALIAS "OutputText"="printf"
#76
Announcements / Release Candidate #1 for versi...
Last post by Pelle - July 14, 2026, 11:26:55 AM
Setup for X64/X86:
https://www.pellesc.se/1450/setup.exe

Setup for ARM64:
https://www.pellesc.se/1450/setupa.exe

Changes:
https://www.pellesc.se/changes/changes_1410_1450.html

Most changes are of the kind "if not correct, none of the Pelles C tools would build or run", but to verify reported bugs are fixed let's do a Release Candidate...
#77
Projects developed with Pelles C / Re: Simple Calendar
Last post by Marco - July 13, 2026, 11:45:01 AM
Hi John,

I'm glad you found my feedback helpful. The issue has been fixed! During my testing, I found that I missed a 'Set current time' button. I think it would be helpful to have a way to reset the start time to the current time, which would be consistent with the "button" that sets the current date. Anyway, this is just a small suggestion.

Marco
#78
Assembly discussions / Saving a bitmap from handle
Last post by Vortex - July 11, 2026, 10:54:05 PM
SaveBmpFromHBitmap function creating and saving a bitmap represented by the handle. The example code below loads a bitmap and recreates it with SaveBmpFromHBitmap.

.386
.model flat,stdcall
option casemap:none

include     Example.inc

includelib  kernel32.lib
includelib  user32.lib
includelib  gdi32.lib

SaveBmpFromHBitmap PROTO :DWORD,:DWORD

.data

BmpFile     db 'Sample.bmp',0
filename    db 'TestBitmap.bmp',0

.data?

hBitmap     dd ?

.code

start:

    xor     eax,eax
    invoke  LoadImage,eax,ADDR BmpFile,\
            IMAGE_BITMAP,eax,eax,LR_LOADFROMFILE

    test    eax,eax
    jz      @f
    mov     hBitmap,eax

    invoke  SaveBmpFromHBitmap,eax,ADDR filename
@@:
    invoke  DeleteObject,hBitmap
    invoke  ExitProcess,0

END start
#79
Projects developed with Pelles C / Re: Simple Calendar
Last post by John Z - July 11, 2026, 10:53:33 PM
Thanks Marco!

I really appreciate you taking the time and providing testing feedback.👍👍👍

From your test I should deselect PowerShell 7 in Choice Dialog and default back to C, I think that will correct the 'selected but disabled situation'.  Great test.

I also added checks in a few other places too just in case you really go wild  ;D , and improved messaging text. 

Nice to think outside the box!  Thanks again.

Version 2.0.1 attached.

John Z

P.S. I was testing PowerShell 7 absence just by renaming pwsh.exe - much easier than uninstall.

Update 7/17 removed attachment to conserve space.  Newer sources 2.0.2 attached further down.
#80
Projects developed with Pelles C / Re: Simple Calendar
Last post by Marco - July 11, 2026, 10:23:35 AM
Hi John,

Thank you for this update!

I tested the program on a PC without PowerShell 7 installed. When I click the 'Settings' button, the 'Use PowerShell 7' option is correctly disabled. After closing the program, as a test, I manually opened the 'zcalendar.ini' file and set the 'Method' key to 4. When I reopen the program and then the 'Choose method' dialog box, the 'Use PowerShell 7' option is both disabled and selected. In fact, when I then try to create a task, at the confirmation stage, the program naturally displays the 'Failed CreateProcess' error window with the message
"C:\Program Files\PowerShell\7\pwsh.exe" -WindowStyle Hidden -FILE "R:\Temp\calendar_exe\SCR1.PS1"

This is a deliberately unusual test scenario, but I simulated having subsequently uninstalled PowerShell 7 after setting it as the default task creation method in the program.

Marco