Author Topic: Creating a PMGPI.DLL empty forwarder  (Read 15005 times)

Lars

  • Hero Member
  • *****
  • Posts: 1271
  • Karma: +65/-0
    • View Profile
Re: Creating a PMGPI.DLL empty forwarder
« Reply #15 on: April 22, 2017, 12:02:11 am »
In the "IMPORTS" section, replace all "XPMGPI" against "GPI".
Of course that is not gaining you any functionality at all.
But it will forward all "GPI" calls to your "XPMGPI" dll as the "EXPORTS" section now exports all the very same entry points.

Lars

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4713
  • Karma: +41/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Creating a PMGPI.DLL empty forwarder
« Reply #16 on: April 22, 2017, 01:42:40 am »
Hi Lars

Can you please give me just in example of the first function and I will take it from there?
like... DEVOPENDC=XMGPI.1 should be replace by ....????

Thanks for your help.

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Lars

  • Hero Member
  • *****
  • Posts: 1271
  • Karma: +65/-0
    • View Profile
Re: Creating a PMGPI.DLL empty forwarder
« Reply #17 on: April 22, 2017, 10:26:20 pm »
DEVOPENDC=GPI.1

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4713
  • Karma: +41/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Creating a PMGPI.DLL empty forwarder
« Reply #18 on: May 04, 2017, 05:02:28 pm »
Hi Lars.

It didn't worked that way, it did not compile. (Check attachment).

When I compile it with "gcc -Zomf -Zdll -o pmgpi.dll pmgpi.def" I get this error:

Code: [Select]
weakld: error: Unresolved symbol (UNDEF) 'MTGETFIRSTGRAPHICSDATA'.
weakld: info: The symbol is referenced by:
    C:/Desktop/WarpGPI/PMGPI.DEF
weakld: error: Unresolved symbol (UNDEF) 'GPIQUERYDRAWCONTROL'.
weakld: info: The symbol is referenced by:
    C:/Desktop/WarpGPI/PMGPI.DEF
weakld: error: Unresolved symbol (UNDEF) 'GPIQUERYREGIONBOX'.
weakld: info: The symbol is referenced by:
    C:/Desktop/WarpGPI/PMGPI.DEF
weakld: error: Unresolved symbol (UNDEF) 'GPISETPS'.
weakld: info: The symbol is referenced by:
    C:/Desktop/WarpGPI/PMGPI.DEF
weakld: error: Unresolved symbol (UNDEF) 'GPIQUERYBITMAPPARAMETERS'.
weakld: info: The symbol is referenced by:
    C:/Desktop/WarpGPI/PMGPI.DEF
Ignoring unresolved externals reported from weak prelinker.
weakld: error: Parse error 4 on line 11. (errorcode=81 stmt=12)
emxomfld: Invalid statement (line 4 of C:/Desktop/WarpGPI/PMGPI.DEF)

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Lars

  • Hero Member
  • *****
  • Posts: 1271
  • Karma: +65/-0
    • View Profile
Re: Creating a PMGPI.DLL empty forwarder
« Reply #19 on: May 05, 2017, 07:33:51 am »
You forgot the "IMPORTS" keyword ...
Look at your original DEF file.

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4713
  • Karma: +41/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Creating a PMGPI.DLL empty forwarder
« Reply #20 on: May 05, 2017, 04:19:32 pm »
Thanks, huge mistake from this side.

It compiles, but I don't know if it is the same that I had been doing. My goal was to rename IBM's PMGPI.DLL to XMGPI.DLL and have a fake PMGPI.DLL that forward the functions to XMGPI.DLL.

It compiles but it refers now to GPI.DLL, even if I rename IBM's PMGPI.DLL to GPI.DLL, it will give me the same boot errors when I load eCS 2.2 with the "fake PMGPI.DLL" I created.

Regards

Martin Iturbide
OS2World NewsMaster
... just share the dream.

Lars

  • Hero Member
  • *****
  • Posts: 1271
  • Karma: +65/-0
    • View Profile
Re: Creating a PMGPI.DLL empty forwarder
« Reply #21 on: May 05, 2017, 08:30:54 pm »
IMPORTS
   DEVOPENDC=XMGPI.1
   etc.
EXPORTS
   can and will have to stay the same as before


then, use a DLL rename tool (VAC comes with one but I think there is another one on Hobbes) to rename the original PMGPI.DLL to XMGPI.DLL.
It is NOT sufficient to just rename the file from PMGPI.DLL to XMGPI.DLL. The DLL has an internal module name that must also change from PMGPI to XMGPI.
By the way: the renamed DLL has to have the very same name length as the original file (which it does if you rename from PMGPI to XMGPI).

Lars

xynixme

  • Guest
Re: Creating a PMGPI.DLL empty forwarder
« Reply #22 on: May 10, 2017, 05:22:50 pm »