• Welcome to Jose's Read Only Forum 2023.
 

where to download GDIPlus_Simple.inc ?

Started by Paul Yuen, November 13, 2016, 09:10:55 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Paul Yuen

Hi Jose

Where can I  download GDIPlus_Simple.inc  and other GDIPlus includes ?
Many Thanks

Patrice Terrier

#1
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;
}


...
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Patrice Terrier

Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com