getimg1=: 3 : 0
GdiplusStartup (TOK=.,_1);GdiplusStartupInput;0
HDL=. GlobalAlloc 0;#y
y memw (GlobalLock {.HDL),0,#y
GlobalUnlock {.HDL
CreateStreamOnHGlobal HDL;1;STR=.,_2
GdipCreateBitmapFromStream ({.STR);BMP=.,_1
OleRelease {.STR
z=. bmpARGB {.BMP
GdiplusShutdown {.TOK
z
)
from m$ link
http://msdn2.microsoft.com/en-us/library/aa378980(VS.85).aspx
says that The handle must be allocated as movable and nondiscardable. so that
HDL=. GlobalAlloc 2;#y
and fDeleteOnRelease in CreateStreamOnHGlobal already set to true so that
OleRelease {.STR
is redundant and can cause memory fault.
similarly for putimg1
regards,
bill
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm