Problem loading a .flv

DLL Edition of the F-IN-BOX
c0mas
Posts: 20
Joined: Sat Nov 27, 2010 5:01 pm

Problem loading a .flv

Postby c0mas » Sat Nov 27, 2010 5:05 pm

Greetings,

I'm trying to load a flv from a file and somehow it does not work. Here is the code I'm using:

Code: Select all

CString strFlashMoviePath = dlg.GetPathName();

      if (0 == dlg.GetFileExt().CompareNoCase(_T("swf")))
      {
         //
         TCHAR lpszFlashMoviePath[MAX_PATH + 1] = { 0 };
         lstrcpy(lpszFlashMoviePath, strFlashMoviePath);

         //
         SFPCPutMovie SFPCPutMovie;
         SFPCPutMovie.lpszBuffer = lpszFlashMoviePath;
         ::SendMessage(g_hwndFlashPlayerControl, FPCM_PUT_MOVIE, 0, (LPARAM)&SFPCPutMovie);
      }
      else
      {
         CString strFlashVars = _T("FLVPath=");
         strFlashVars += strFlashMoviePath;
         FPC_PutFlashVars(g_hwndFlashPlayerControl, strFlashVars);
         HMODULE h = GetModuleHandle(NULL);
         ret = FPCPutMovieFromResource(g_hwndFlashPlayerControl, h, _T("FLVPlayer"), _T("SWF"));
      }


I really don't have any clue of what's wrong, FPCPutMovieFromResource just returns FALSE. (the OCX seems to be registered correctly because it plays swf files),

Thanks,
/C.

Softanics
Site Admin
Posts: 1402
Joined: Sat Sep 18, 2004 3:03 am
Location: Russia, St. Petersburg
Contact:

Re: Problem loading a .flv

Postby Softanics » Mon Nov 29, 2010 8:59 am

Hello,

c0mas wrote:HMODULE h = GetModuleHandle(NULL);
ret = FPCPutMovieFromResource(g_hwndFlashPlayerControl, h, _T("FLVPlayer"), _T("SWF"));


Have you included this resource FLVPlayer / SWF into your executable?

Thank you.
Best regards, Artem A. Razin,
F-IN-BOX support
Ask your question here: http://www.f-in-box.com/support.html

c0mas
Posts: 20
Joined: Sat Nov 27, 2010 5:01 pm

Postby c0mas » Wed Dec 01, 2010 3:40 pm

I understand now, I need that FLVPlayer.swf in order to play any flv file from disk.

Thanks.

Softanics
Site Admin
Posts: 1402
Joined: Sat Sep 18, 2004 3:03 am
Location: Russia, St. Petersburg
Contact:

Postby Softanics » Wed Dec 01, 2010 3:48 pm

Hello,

Yes, that's right.

Thank you.
Best regards, Artem A. Razin,

F-IN-BOX support

Ask your question here: http://www.f-in-box.com/support.html


Return to “DLL Edition”

Who is online

Users browsing this forum: No registered users and 9 guests

cron