Hi I wrote these lines in vb and don't work..I want to load movie from memory..(I do not want to use resource files. I read bytes from a file and use that byte array.. functions are below.)
Const WM_USER As Long = &H400
Const FPCM_FIRST As Long = WM_USER + &H1000
Const FPCM_PUTMOVIEFROMMEMORY As Long = FPCM_FIRST + 2
Private Type sFPCPutMovieFromMemory
lpData As Long
dwSize As Long
End Type
Private Sub cmdCommand1_Click()
Dim MyFPCPutMovieFromMemory As sFPCPutMovieFromMemory
RegisterFlashWindowClass
Dim rc As Rect
GetClientRect hWnd, rc
hwndFlashPlayerControl = CreateWindowExA(0, WC_FLASH, "", WS_CHILD Or WS_VISIBLE, 20, 20, rc.Right - 50, rc.Bottom - 170, Me.hWnd, 0, 0, 0)
FPCSetEventListener hwndFlashPlayerControl, AddressOf FlashEventsListener, 0
Dim bytes() As Byte
bytes = ReadBytesFromFile("C:\Send_Get_Test.swf")
MyFPCPutMovieFromMemory.lpData = bytes
MyFPCPutMovieFromMemory.dwSize = UBound(bytes)
Call SendMessage(hwndFlashPlayerControl, FPCM_PUTMOVIEFROMMEMORY, 0, VarPtr(MyFPCPutMovieFromMemory))
End Sub