This is how you initialize Gdi+ I will give you that much for now:
jscript code:
var GdipToken = Interop.Allocate(4);
var GdipStartupInput = Interop.Allocate(16)
GdipStartupInput.WriteDWORD(0, 1);
// will return True if successful false if it failed
function Gdip_Initialize () {
return Interop.Call('gdiplus.dll', 'GdiplusStartup', GdipToken, GdipStartupInput, 0) === 0;
}
function Gdip_Uninitialize() {
Interop.Call('gdiplus.dll', 'GdiplusShutdown', GdipToken.ReadDWORD(0));
}