Problem in host/displ​ay adobe flash player npapi plugin(nps​wf32.dll) on our window instead of Mozilla brow ser

Ashish Mittal <[email protected]>
Newsgroups gmane.comp.mozilla.devel.plugins
Organization http://groups.google.com
Message-ID <[email protected]>
Hi,
I am very new to NPAPI framework to develop/consume plugins.
Below mention is the objective of my development
1.) I wrote one dll that follows the same architecture as NPAPI
follows.
2.) I kept this dll into the Mozilla plugins directory , so that this
dll will get loaded if I open any URL that has flash content.
3.) I have written ClientNPP and ClientNPN functions so that Mozilla
will call my NPP functions and from there I will forward this call to
Flash player NPP functions, in the same fashion when flash plugin will
call NPN functions it will come to my dll then I will forward it to
the Mozilla NPN functions.
4.) This way I am sitting in between the mozilla and flash player
communication.
5.) now when Mozilla call NPP_SetWindow to my dll I am creating my own
window and relacing mozilla client window handle with my own window
handle and again forwarding this call to NPP_SetWindow to flash
player.
This way when I pass HDC of my window in windowless flash I am able to
see the flash being drawn on my window not on mozilla browser , but
windowed flash is not working.



I am able to achieve Windowless plugins to be hosted/draw on my own
window, but not able to draw windowed plugin on my window(e.g. if I
open any youtube video it should render on my own window instead of
browser window). Please help me how to get it draw on my own window.

Below mention is the code that I am using to host plugin on my
window.

WHen browser is calling the below mention function with NPWindow, then
I am putting HDC of my window in windowless and HWND for windowed


NPError Client_NPP_SetWindow(NPP instance, NPWindow* window)
{
    if ( window->type == NPWindowTypeDrawable )
    {
         npWindow.window = GetDC(hWindow); //I am passing HDC of my
own window instead of mozilla browser window HDC
    }
    else if(window->type == NPWindowTypeWindow)
    {
        npWindow.window = (hWindow); //HWND of my own window
    }
}

//Note :- for windowless plugin, in WM_PAINT message of my window
wndproc I am sending NPEVENT to adobe plugin.
//Note :- When I debugged Windowed plugin I found that in my dll when
mozilla calls NPP_Write function , I am forwarding it to the abode
flash player plugin and execution pointer is not coming out from here.
It is hanging somewhere in the flash player.

Please advise what else I need to do to draw it on my window.


Regards
Ashish
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.