Jose's Read Only Forum 2023

General Category => General Discussion => Topic started by: Paul Yuen on November 13, 2016, 09:10:55 PM

Title: where to download GDIPlus_Simple.inc ?
Post by: Paul Yuen on November 13, 2016, 09:10:55 PM
Hi Jose

Where can I  download GDIPlus_Simple.inc  and other GDIPlus includes ?
Many Thanks
Title: Re: where to download GDIPlus_Simple.inc ?
Post by: Patrice Terrier on November 13, 2016, 10:05:13 PM
My own, from 2002, is still available on the PowerBASIC forum here
https://forum.powerbasic.com/forum/user-to-user-discussions/source-code/24211-gdiplus-inc-for-pb-win-part-1

Note: I do have also a procedural version to work in C++ 64-bit (and full UNICODE), that is calling directly the core Flat API, using LoadLibrary and GetProcAddress like this
HMODULE gdiplib() {
    static HMODULE hGdip;
    if (hGdip == 0) { hGdip = LoadLibrary(L"GDIPLUS"); }
    return hGdip;
}

long Load_GDIPLUS() {
    long nRet = 0;
    if (gdiplib()) { nRet = -1; }
    return nRet;
}

long GdiplusStart(OUT LONG_PTR &hGDIplus, GdiplusStartupInput &inputbuf, IN LONG_PTR outputbuf) {
    long nRet = -1; // Error
    HMODULE hModule = gdiplib();
    if (hModule) {
        long_proc(LONG_PTR*, GdiplusStartupInput*, LONG_PTR);
        zProc hPROC = (zProc)GetProcAddress(hModule, "GdiplusStartup");
        if (hPROC) {
            nRet = hPROC(&hGDIplus, &inputbuf, outputbuf);
        }
    }
    return nRet;
}

long GdiplusShutdown(IN LONG_PTR hGDIplus) {
    long nRet = -1; // Error
    HMODULE hModule = gdiplib();
    if (hModule) {
        long_proc(LONG_PTR);
        zProc hProc = (zProc)GetProcAddress(hModule, "GdiplusShutdown");
        if (hProc) { nRet = hProc(hGDIplus); }
    }
    return nRet;
}


...
Title: Re: where to download GDIPlus_Simple.inc ?
Post by: Patrice Terrier on November 14, 2016, 11:20:50 AM
The C++ FLAT API version is here:
http://www.objreader.com/index.php?topic=72.msg312#msg312

...
Title: Re: where to download GDIPlus_Simple.inc ?
Post by: Paul Yuen on December 10, 2016, 04:08:06 AM
Many Thanks Patrice