I been trying for hours and still can get it to assemble. I've tried several things.


GUID STRUCT
Data1 dd ?
Data2 dw ?
Data3 dw ?
Data4 db 8 dup(?)
GUID ENDS

IID_IDirectDraw7 GUID <{015e65ec0h,03b9ch,011d2h,{0b9h,02fh,000h,060h,097h,097h,0eah,05bh}}>
nope...

IID_IDirectDraw7 GUID <{015e65ec0h,03b9ch,011d2h,{0b9h},{02fh},{000h},{060h},{097h},{097h},{0eah},{05bh}}>
nope...

IID_IDirectDraw7 GUID <{015e65ec0h,03b9ch,011d2h,0b92f00609797ea5bh}>
nope...

When I assemble, I get 2 errors.

error A2138: invalid data initializer
error A2036: too many initial values for structure

I count the correct number of initilizers, and I dont know why a number would be an invalid initilizer.

Anyone see what I'm doing wrong? Thanks.
Posted on 2002-11-08 02:36:05 by ThoughtCriminal


GUID STRUCT
Data1 dd ?
Data2 dw ?
Data3 dw ?
Data4 db 8 dup(?)
GUID ENDS

[color=red].const[/color] [color=silver];(or .data [b]not[/b] .data? )[/color]
IID_IDirectDraw7 GUID {015e65ec0h,03b9ch,011d2h, \
{0b9h,02fh,000h,060h,097h,097h,0eah,05bh}}

this work nice...
:alright:
Posted on 2002-11-08 02:53:10 by Eviloid
Sorry Eviloid, maybe I should have put .data before the definition in my post.

I am trying to create the GUID in a data segment. I tried putting in .const but that does not fix the error.

Thanks.
Posted on 2002-11-08 03:11:50 by ThoughtCriminal
he he

remove "<" ">"
Posted on 2002-11-08 03:43:31 by Eviloid
Thanks. I totally missed that. I've spent all day learning what GUIDs are. Now I'll get to use one.
:grin:
:stupid:
Posted on 2002-11-08 03:48:44 by ThoughtCriminal
I'm glad to help!

Good Luck!
:alright:
Posted on 2002-11-08 04:01:49 by Eviloid
ThoughtCriminal,

Let me know how that goes. I'm confused about creating an interface using clsid and iid. I tried calling CoCreateInstance with a pointer to clsid and iid but I always get an error (80040154) which I think means no such class. I left the guid in the same byte order as published and I assumed they wanted a pointer to the string for the iid. Or do I not understand that?
Posted on 2002-11-08 08:59:38 by drhowarddrfine
It does not go well.


I think I've been getting a similar error.

I think I will have to write it up in C. Then trace thru the code to see what values are passed.

I have yet to see one example using DirectDraw7 in asm.

I need to figure out how to get a ddraw interface for 7, and I'm not sure yet about CreateSurface7. I just need to figure out how to get valid interfaces, once I have those, it is easy.

I'll try to whip something up as soon as possible. I'll let you know the results.
Posted on 2002-11-08 10:37:50 by ThoughtCriminal
Here's a window I put together using dx8. I think it should work under dx7. It's just a little hack I put together to tinker with. I just noticed one of the files has an include of ole32.dll but just delete that because it's not used.
Posted on 2002-11-08 13:27:06 by drhowarddrfine
Thanks, I'll take a look at it later. I have a date at 3PM, with a woman :grin:

I'm curious if you are getting the correct interfaces.
Posted on 2002-11-08 22:33:48 by ThoughtCriminal
I'm getting NULL (D3D_OK) responses and the program runs. I don't recall if I actually put anything on the window. It's been a few weeks since I could get back to working on it. I do remember putting dots on the screen, but that might have been with C++. I just now remembered that the only indication I've got DX working is the responses from the calls and not drawing anything in the window.
Posted on 2002-11-09 08:40:26 by drhowarddrfine
Ahhh, but one problem is you are using D3D. I'm trying to get DirectDraw7 to work. :grin:


I have DirectDraw working, just not the correct interface.
Posted on 2002-11-09 09:43:18 by ThoughtCriminal
Why are you using directdraw? I don't recall cause I've been fiddling with the other. Is it faster, directly accessible?
Posted on 2002-11-09 11:01:50 by drhowarddrfine
I'm using DrirectDraw because I want to do 2D, not 3D. Unless there is something I dont know about DirectX8, I think DirectDraw is the only easy way.(I know very little about DirectX8)
Posted on 2002-11-09 11:16:42 by ThoughtCriminal