Code: Select all
FPCPutMovieFromResource(hwndFlashPlayerControl, GetModuleHandle("YourDll.dll"), "...", "...");
Code: Select all
void CSample07_ExternalInterfaceDlg::OnCallActionScriptFunction()
{
BSTR bstrRequest = SysAllocString(L"<invoke name=\"CallMeFromApplication\" returntype=\"xml\"><arguments><string>Some text for FlashPlayerControl</string></arguments></invoke>");
BSTR bstrResponse;
if (S_OK ==
FPCCallFunctionBSTR(m_hwndFlashPlayerControl,
bstrRequest,
&bstrResponse))
{
USES_CONVERSION;
CString str = OLE2T(bstrResponse);
AfxMessageBox(CString(_T("The function returned: ")) + str);
SysFreeString(bstrResponse);
}
SysFreeString(bstrRequest);
}
tmillhouse@gmail.com wrote:Well I do see one problem...even after I initialize my hwndFlashPlayerControl, it is still null.
I check for null against it directly after I call FPC_CreateWindow. Is there a reason why the FPC_CreateWindow would return a null?
tmillhouse@gmail.com wrote:Do you know of a good way to output the contents of GetLastError (again, sorry I'm fairly new to C/C++). I'm using this approach:
sprintf(msgbuf, "Error [err=%ld]\n", GetLastError());
OutputDebugString(msgbuf);
It is outputting '???????' (a series of question marks) to the debug console.
Users browsing this forum: No registered users and 50 guests