try
ZeroMemory(&ddsdx, sizeof(DDSURFACEDESC2));
instead of
ZeroMemory(&ddsdx,sizeof(ddsdx));
shouldn't make a difference since MSVC is bug free
Edited by - Magmai Kai Holmlor on June 23, 2000 11:40:50 PM
Crash - CreateSurface
Look at the post above mine. There were computers in 1899? Wow. Talk about Y2K problems
If all this fails, you might want to try reformatting you harddisk and reinstalling DirectX. I had a problem with the DX library that came with Andre''s TOTWGPG. The problem is when I call flip, it works, but only once. Say I have a primary surface and a back buffer, after the first flip, the back buffer will be displayed. But on subsequent Flips, the image still remains (i.e., a flip didn''t occur). After I reformatted my harddisk and installed DX 7 (downloaded from microsoft) and recompiled that same program, flip worked fine.
My point is, you might have a buggy installation of DirectX. Has anyone else had a problem like this?
========================================================
If something sounds stupid but works, it's not stupid
If all this fails, you might want to try reformatting you harddisk and reinstalling DirectX. I had a problem with the DX library that came with Andre''s TOTWGPG. The problem is when I call flip, it works, but only once. Say I have a primary surface and a back buffer, after the first flip, the back buffer will be displayed. But on subsequent Flips, the image still remains (i.e., a flip didn''t occur). After I reformatted my harddisk and installed DX 7 (downloaded from microsoft) and recompiled that same program, flip worked fine.
My point is, you might have a buggy installation of DirectX. Has anyone else had a problem like this?
========================================================
If something sounds stupid but works, it's not stupid
I''ve tried all those variations with ZeroMemory, but nothing''s worked. I''m doing this in WinMain btw. Well, it''s in a function, but being called at the start of WinMain. I''m only starting DirectX with C++, so I''m just trying to get the basics working first. Sadly, my computer seems to have other ideas!
Oh, and I''ve stopped short of reformating hard-disks or anything like that, since other programs seem to use DirectX ok. E.g. that Alpha Blending program (from the articles here on GDNet). I have noted that, that particular program doesn''t use DirectX7. All my games work alright aswell... not sure if any use DX7 though, think latest needed is DX6.
Not sure if that''s made the problem any clearer. Bah! Even errors with pointers usually give errors!
Oh, and I''ve stopped short of reformating hard-disks or anything like that, since other programs seem to use DirectX ok. E.g. that Alpha Blending program (from the articles here on GDNet). I have noted that, that particular program doesn''t use DirectX7. All my games work alright aswell... not sure if any use DX7 though, think latest needed is DX6.
Not sure if that''s made the problem any clearer. Bah! Even errors with pointers usually give errors!
Surely somebody has had this problem before? Bah! I would be first!
Still can''t get this thing to work! My DirectX ''research'' isn''t going to get far at this rate... not even being able to setup an offscreen surface! Gah!
Still can''t get this thing to work! My DirectX ''research'' isn''t going to get far at this rate... not even being able to setup an offscreen surface! Gah!
Gah! STILL isn''t working.
Um, maybe I could e-mail the code to somebody else, and see if it runs ok on their machine? If somebody would be so kind...
Um, maybe I could e-mail the code to somebody else, and see if it runs ok on their machine? If somebody would be so kind...
Are you sure you have a valid pointer to a Direct Draw Device? Did you check the return value from lpDD. If that is still null you will get it to fail and crash.
If you are doing it in WinMain, has the window been created yet? Does hwnd already exist and is that valid at that point in your code. Just a hunch. I don''t program using the win32, I use MFC.
If you are doing it in WinMain, has the window been created yet? Does hwnd already exist and is that valid at that point in your code. Just a hunch. I don''t program using the win32, I use MFC.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement