News:

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

Main Menu

Recent posts

#71
Work in progress / Re: A support library to simpl...
Last post by Michele - October 25, 2026, 06:41:21 PM
I publish the latest pre-release of my DynSQLite library.
Now all panels and function windows are modeless, you can open as many browsers, SQL workbenches and inspectors workbenches you like.
Changing the database all windows refresh and synchronize with it. Those functions that are tied to no more existent tables/view graciously shutdown.
In SQL workbench all messages and errors are showed in the browser window.
I will appreciate if you would test and report errors and features requests.
I have a lot of features I want add, I.e. flags to enable/disable some features of browser, so you can tailor it on your application.
Last point the scope of this work isn't the browser, that is only the demo app, but the library DynSQLite.
#72
Assembly discussions / Easily write lines to a text f...
Last post by Vortex - October 25, 2026, 06:38:33 PM
Hello,

Simple functions to write lines to a text file :

.386
.model flat,stdcall
option casemap:none

GENERIC_WRITE equ 40000000h
CREATE_ALWAYS equ 2

CreateFileA PROTO :DWORD,:DWORD,:DWORD,:DWORD,:DWORD,:DWORD,:DWORD
CreateFile equ <CreateFileA>

.code

OpenFileToWrite PROC fname:DWORD

    invoke  CreateFile,fname,GENERIC_WRITE,\
            0,0,CREATE_ALWAYS,0,0
    ret

OpenFileToWrite ENDP

END

.386
.model flat,stdcall
option casemap:none

lstrlenA PROTO :DWORD
lstrlen EQU <lstrlenA>

WriteFile PROTO :DWORD,:DWORD,:DWORD,:DWORD,:DWORD

.code

WriteLine PROC hFile:DWORD,LineAddr:DWORD

LOCAL BytesWritten:DWORD

    invoke  lstrlen,LineAddr
    lea     edx,BytesWritten
    invoke  WriteFile,hFile,LineAddr,eax,edx,0
    ret

WriteLine ENDP

END

A quick example :

.386
.model flat,stdcall
option casemap:none

CloseHandle PROTO :DWORD
ExitProcess PROTO :DWORD

OpenFileToWrite PROTO :DWORD
WriteLine PROTO :DWORD,:DWORD

.data

fname   db 'Test.txt',0
line1   db 'This is a test.',13,10,0
line2   db 'Another test.',0

.data?

hFile   dd ?

.code

start:

    invoke  OpenFileToWrite,ADDR fname
    mov     hFile,eax

    invoke  WriteLine,eax,ADDR line1
    invoke  WriteLine,hFile,ADDR line2

    invoke  CloseHandle,hFile

    invoke  ExitProcess,0

END start
#73
User contributions / Re: Hint_SA (Standalone)
Last post by TimoVJL - October 25, 2026, 05:15:22 PM
MS GdiPlusFlat.h haven't changed much from year 2001.
Frankie's version is easier to parse, as in MS header parameters aren't in same line, as those are spillet to several lines.
Using pocc.exe /P gdiplusflat.h remove some junk from header file.
#74
User contributions / Re: Hint_SA (Standalone)
Last post by John Z - October 25, 2026, 03:46:37 PM
Quote from: TimoVJL on October 25, 2026, 12:09:18 PMFrankie's fGdiPlusFlat.h would be a good addition.
https://github.com/Frankie-PellesC/fSDK/blob/master/Include/fGdiPlusFlat.h

Possibly - I started looking at this when you mentioned it before.  No updates for 8 years and only through Pelles 9.  However maybe no updates are needed, I do use a tiny portion of it in vCardz_i for displaying various picture formats, and that still worked well in Pelles V 14.5.

Downloaded the ZIP from GitHub but I really don't see where I can parse out the information that the database needs.  Perhaps I can get more from Microsoft.  Not giving up yet, so I'll look some more as time permits.

John Z
#75
Tips & tricks / DebugView++
Last post by TimoVJL - October 25, 2026, 12:28:33 PM
https://github.com/CobaltFusion/DebugViewPP/releases/tag/1.30.0.0
Helps to test code with OutputDebugString() and do some timings.
#76
User contributions / Re: Hint_SA (Standalone)
Last post by TimoVJL - October 25, 2026, 12:09:18 PM
#77
User contributions / Re: Hint_SA (Standalone)
Last post by John Z - October 25, 2026, 11:22:00 AM
Here is version 2, with a few more improvements.

It now also includes a help file.  Seems I now can't upload the full program with win32.chm, 12Meg, gives error saying contact admin...so the 'ProgramOnly_Hint_SA_V20..." does not include the win32.chm file.  It is available on SourceForge if you need to get it, and perhaps elsewhere.
The link to the SourceForge project page is
 https://sourceforge.net/projects/win32-help-chm/  
 and the direct win32.chm download link is
 https://sourceforge.net/projects/win32-help-chm/files/latest/download
 after downloading un-zip it into the Hint_SA directory

John Z
#78
Work in progress / Re: A support library to simpl...
Last post by Michele - October 21, 2026, 08:02:40 AM
Quote from: Robert on October 21, 2026, 05:53:25 AMHi Michele:

Great beginnings.

I would prefer that the windows of Database Inspector, Browse Tables and SQL Query Workbench would be modeless so that, at any one moment, more than one of the windows can be open.

When I construct a query, I have to be able to see the tables and fields.

Thank you.
Thanks Robert.
If you compile with the symbol 'MSQL_MODELESS_UI' defined in preprocessor, the windows become modeless. Maybe there will be problems syncyng upon database context modifications, probable crashes. I'm working on it.
When you construct a query pressing <CTRL>+<SPACE> will open the database object selector (see picture). Select teh object you want insert and press enter or double click it to insert.

P.S. The window background, with its rather grand, high-flown tone, was an idea conceived by the AI that generated it. Personally, I view my own work in much more modest terms, but I'm too lazy to change it.
#79
Work in progress / Re: A support library to simpl...
Last post by Robert - October 21, 2026, 05:53:25 AM
Hi Michele:

Great beginnings.

I would prefer that the windows of Database Inspector, Browse Tables and SQL Query Workbench would be modeless so that, at any one moment, more than one of the windows can be open.

When I construct a query, I have to be able to see the tables and fields.

Thank you.
#80
Work in progress / Re: A support library to simpl...
Last post by Michele - October 21, 2026, 12:15:45 AM
Here we are, I publish the alpha version of library 'DynSQLite' and sample application 'DynSQLite Studio'.
There is still a lot of debug and fixing of code (actually has repetitions and over-coding) as is normal for the first release.
In the project workspace I left the binary if you want test them immediately, if you prefer yuo can remove them and recompile the workspace.
I added the sqlite dll, header and library, they come from the binary release that you can download from the SQLite site if you want. This is important because DynSQLite, to analyze the DB, need some functions that aren't present in the PellesC reduced version. If you compile and try to run the app inside the IDE, without the DLL in the exe folder, it will automatically link with the native PellesC SQLite DLL causing the program to fail (A message box will tell you that some entries in DLL are missing).

EDIT: Amended the project directories.
To test the program you can download big databases from the net, like the northwind.db (One is here) whic contains images blobs, and employee.db (A copy here) very large DB useful to check efficiency of the browser control.
Other database useful for trigger evaluation is sakila_master.db (a copy here).

It would be grateful if you give me your feedback on usefulness of this library and report of bugs and feature requests.
Even more appreciated code enhancements.
Waiting to hear from you.