Creating OSD from an C# Application
Posted: Sun Mar 02, 2008 4:32 am
Hello,
i´m trying to create an OSD surface using an C++ DLL. Here is the code:
int OSDTEST(HWND DDHWND, DWORD dwHeight, DWORD dwWidth, DWORD dwLeft, DWORD dwTop, BYTE Transparency)
{
TOSDSurface osd;
osd.dwSize = sizeof(osd);
osd.dwHeight = dwHeight;
osd.dwWidth = dwWidth;
osd.dwTop = dwTop;
osd.dwLeft = dwLeft;
osd.Transparency = Transparency;
int hOSD = SendMessage(hAPP, WM_MODULE_MSG, DDMODAPI_OSD_CREATE_SURFACE, (LPARAM)&osd);
return hOSD;
//SendMessage(hAPP, WM_MODULE_MSG, DDMODAPI_OSD_SHOW_SURFACE, hOSD);
}
I call this function from my C# application. The code:
[DllImport("DDOSDHelper.dll")]
static extern int OSDTEST(IntPtr DDHWND, UInt32 dwHeight, UInt32 dwWidth, UInt32 dwLeft, UInt32 dwTop, byte Transparency);
...
OSDTEST(xxx, 50, 50, 10, 10, 1);
...
Evertime i call this code an error occurs in DD (see attached file).
Can anyone help?
Thanks
Isch
i´m trying to create an OSD surface using an C++ DLL. Here is the code:
int OSDTEST(HWND DDHWND, DWORD dwHeight, DWORD dwWidth, DWORD dwLeft, DWORD dwTop, BYTE Transparency)
{
TOSDSurface osd;
osd.dwSize = sizeof(osd);
osd.dwHeight = dwHeight;
osd.dwWidth = dwWidth;
osd.dwTop = dwTop;
osd.dwLeft = dwLeft;
osd.Transparency = Transparency;
int hOSD = SendMessage(hAPP, WM_MODULE_MSG, DDMODAPI_OSD_CREATE_SURFACE, (LPARAM)&osd);
return hOSD;
//SendMessage(hAPP, WM_MODULE_MSG, DDMODAPI_OSD_SHOW_SURFACE, hOSD);
}
I call this function from my C# application. The code:
[DllImport("DDOSDHelper.dll")]
static extern int OSDTEST(IntPtr DDHWND, UInt32 dwHeight, UInt32 dwWidth, UInt32 dwLeft, UInt32 dwTop, byte Transparency);
...
OSDTEST(xxx, 50, 50, 10, 10, 1);
...
Evertime i call this code an error occurs in DD (see attached file).
Can anyone help?
Thanks
Isch