Playing a Flash movie from memory (no temporary files)
Aside from the lack of flexability in use, the fact that it does not allow direct access to the stream contents, and its not thread safe yeah, SHCreateMemStream is eaisier. On the other hand CreateStreamOnHGlobal doesn't have these limitations.bingo wrote:in vista easier with SHCreateMemStream ...![]()
http://msdn2.microsoft.com/en-us/librar ... S.85).aspx
Are you still having the problem with the "FreeMemory" line? If so, delete it. The memory seems to free just fine after closing the window.SFSxOI wrote:I've yet to get it to work the first time. I give up on it. Nice idea tho. Thanks

www.posemotion.com
PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef
Even the vine knows it surroundings but the man with eyes does not.
PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef
Even the vine knows it surroundings but the man with eyes does not.
This also works the same. Just make sure the html file has a white background or change the rgb in the code. Like I said, not perfect.
(I used a 320x240 flash file or you'll get scroll bars on the webgadget.)

Code: Select all
If OpenWindow(0, 0, 0, 320, 240, "", #PB_Window_ScreenCentered|#PB_Window_BorderLess|#PB_Window_Invisible)
SetWindowLong_(WindowID(0),#GWL_EXSTYLE,GetWindowLong_(WindowID(0),#GWL_EXSTYLE)|#WS_EX_LAYERED)
SetLayeredWindowAttributes_(WindowID(0),RGB(255,255,255),0,#LWA_COLORKEY)
CreateGadgetList(WindowID(0))
If WebGadget(0, 0, 0, 340, 260, "file://C:\flash.html") = 0
MessageRequester("Error", "ATL.dll not found", 0)
End
EndIf
HideWindow(0,0)
Repeat
Event = WaitWindowEvent()
If Event = #WM_LBUTTONDOWN
SendMessage_(WindowID(0) ,#WM_NCLBUTTONDOWN, #HTCAPTION, 0)
EndIf
Until GetAsyncKeyState_(#VK_ESCAPE)
EndIf
www.posemotion.com
PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef
Even the vine knows it surroundings but the man with eyes does not.
PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef
Even the vine knows it surroundings but the man with eyes does not.