Author Topic: where to download GDIPlus_Simple.inc ?  (Read 2720 times)

0 Members and 1 Guest are viewing this topic.

Offline Paul Yuen

  • Newbie
  • *
  • Posts: 19
  • User-Rate: +0/-0
where to download GDIPlus_Simple.inc ?
« on: November 13, 2016, 09:10:55 PM »
Hi Jose

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

Offline Patrice Terrier

  • ROMs
  • Hero Member
  • *****
  • Posts: 934
  • User-Rate: +62/-1
    • www.zapsolution.com
Re: where to download GDIPlus_Simple.inc ?
« Reply #1 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
Code: [Select]
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;
}

...
« Last Edit: November 13, 2016, 10:27:44 PM by Patrice Terrier »
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Offline Patrice Terrier

  • ROMs
  • Hero Member
  • *****
  • Posts: 934
  • User-Rate: +62/-1
    • www.zapsolution.com
Re: where to download GDIPlus_Simple.inc ?
« Reply #2 on: November 14, 2016, 11:20:50 AM »
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Offline Paul Yuen

  • Newbie
  • *
  • Posts: 19
  • User-Rate: +0/-0
Re: where to download GDIPlus_Simple.inc ?
« Reply #3 on: December 10, 2016, 04:08:06 AM »
Many Thanks Patrice