News:

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

Main Menu

Recent posts

#1
Work in progress / Re: A support library to simpl...
Last post by Michele - Today at 08:06:51 PM
Thanks TimoVJL.
I can't reproduce the bug.
There are some thing to correct, but I can't see where it could hang.
Could you compile the debug version to locate where happen the crash?

It could work in XP also I imagine if the common controls are version 5.80 or 6.00.
#2
Work in progress / Re: A support library to simpl...
Last post by TimoVJL - Today at 07:52:12 PM
Many dialogs open without errors in Windows 7 x64.
Actually a good idea to support SQLite3 database by dialogs for main application.
#3
Assembly discussions / Re: Easily write lines to a te...
Last post by TimoVJL - Today at 07:49:09 PM
Those support functions are also useful for x64, when parameter count is less that five.
#4
Work in progress / Re: A support library to simpl...
Last post by Michele - Today at 07:47:13 PM
Quote from: TimoVJL on Today at 07:33:02 PMMenu option Update Schema just crash  :(
Sorry, this option is broken after I redesigned the mechanism of update messages, and I forget to correct it.
It was there just for debug.
I'll fix it asap, please don't use it for now.
The other functions work?

And please could you tell me exactly what you made when it crashed? What did you opened and which action you were doing so I can reproduce.
Thanks
#5
Work in progress / Re: A support library to simpl...
Last post by TimoVJL - Today at 07:33:02 PM
Menu option Update Schema just crash  :(
#6
Work in progress / Re: A support library to simpl...
Last post by Michele - Today at 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.
#7
Assembly discussions / Easily write lines to a text f...
Last post by Vortex - Today at 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
#8
User contributions / Re: Hint_SA (Standalone)
Last post by TimoVJL - Today at 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.

Test with fGdiPlusFlat.h
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int __cdecl main(int argc, char **argv)
{
    char buf[4096];
    FILE *fd = fopen("fGdiPlusFlat.h", "r");
    if (fd) {
        while (fgets(buf, 4096, fd)) {
            if (*buf == 10 || *buf == ' ') continue;
            int len = strlen(buf);
            if (!strncmp(buf, "Status __stdcall ", 17)) printf(buf);
            if (!strncmp(buf+9, "WINGDIPAPI ", 11)) printf(buf);
            if (!strncmp(buf+9, "WINAPI ", 7)) printf(buf);
        }
        fclose(fd);
    }
    return 0;
}

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

int __cdecl main(int argc, char **argv)
{
    char buf[4096];
    FILE *fd = fopen("gdiplusflat.h", "r");
    if (fd) {
        while (fgets(buf, 4096, fd)) {
            if (*buf == 10 || *buf == ' ') continue;
            int len = strlen(buf);
            if (!strncmp(buf, "GpStatus ", 9)) {
                printf(buf);
                while (fgets(buf, 4096, fd)) {
                    printf(buf);
                    if (!strncmp(buf, ");", 2)) break;
                }
            }
        }
        fclose(fd);
    }
    return 0;
}
#9
User contributions / Re: Hint_SA (Standalone)
Last post by John Z - Today at 03:46:37 PM
Quote from: TimoVJL on Today at 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
#10
Tips & tricks / DebugView++
Last post by TimoVJL - Today at 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.