On additional notes, I tried to have it the OutputWindow as a IntPtr in C++ but insisted it has to be a HWND.
It may just be simple and I've over looked something.
Here's the Managed DLL compiled as Old Syntax CLI.
HWND InitD3D(HWND h)
{
_h = h;
// create a struct to hold information about the swap chain
DXGI_SWAP_CHAIN_DESC scd;
// clear out the struct for use
ZeroMemory(&scd, sizeof(DXGI_SWAP_CHAIN_DESC));
// fill the swap chain description struct
scd.BufferCount = 1; // one back buffer
scd.BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM; // use 32-bit color
scd.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT; // how swap chain is to be used
scd.OutputWindow = _h; // the window to be used
scd.SampleDesc.Count = 1; // how many multisamples
scd.SampleDesc.Quality = 0; // multisample quality level
scd.Windowed = TRUE; // windowed/full-screen mode
inside the private function I have the HWND _h;
I was thinking, well okay maybe it needs to return the handle. So perhaps, it needs to set it which I thought it was doing it.
Inside the C# Form1_Load I have this snipplet.
SICGames.Engine SE = new SICGames.Engine(); IntPtr _DXView = panel1.Handle; SE.InitD3D(_DXView);
I know that the Overloaded Method Match is because the arguments don't match. If there is a work around or possible a small tiny mistake I'm doign that can pointed out that would be awesome. A IntPtr should be fine with HWND, right? Thanks everyone!






