Click here to Skip to main content
15,896,606 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
QuestionCreating checkboxes dynamically from array Pin
Steven Foxton23-Feb-10 13:26
Steven Foxton23-Feb-10 13:26 
AnswerRe: Creating checkboxes dynamically from array Pin
«_Superman_»23-Feb-10 16:51
professional«_Superman_»23-Feb-10 16:51 
AnswerRe: Creating checkboxes dynamically from array Pin
Richard MacCutchan23-Feb-10 21:41
mveRichard MacCutchan23-Feb-10 21:41 
Questionvs 2008 and Icopy Pin
aurelcly23-Feb-10 7:41
aurelcly23-Feb-10 7:41 
AnswerRe: vs 2008 and Icopy Pin
Stuart Dootson23-Feb-10 14:01
professionalStuart Dootson23-Feb-10 14:01 
QuestionATL Server Exe Shutdown Hangs Pin
marko201022-Feb-10 14:31
marko201022-Feb-10 14:31 
AnswerRe: ATL Server Exe Shutdown Hangs [modified] Pin
KingsGambit22-Feb-10 17:42
KingsGambit22-Feb-10 17:42 
QuestionDirect3D Types as interface parameters Pin
Aschratt20-Feb-10 22:47
Aschratt20-Feb-10 22:47 
Hey Smile | :)

Guess this is a very common question. In my case it obtains to DirectX (9... d3d9, whatever ^^). I've read that DirectX 9 comes around with COM interfaces and can be used from ATL. Now I am writing a library which should use Direct3D types (Such as D3DVECTOR, D3DCOLOR,...) after raping google for days now without some usefull code I decidet to post my question here hoping to get an awnser.

Well, my problem is that I want to pass DirectX types to interface methods. Something like this:
interface ITest : IUnknown
{
	[propget, helpstring("BackroundColor")] HRESULT BackroundColor([out, retval] D3DCOLOR* pVal);
	[propput, helpstring("BackroundColor")] HRESULT BackroundColor([in] D3DCOLOR newVal);
};

So far so good, but somehow the MIDL compiler must know the D3DCOLOR type. I've read about redefining it in this way:
cpp_quote("#if 0")
typedef DWORD D3DCOLOR;
cpp_quote("#else")
cpp_quote("#include <d3d9.h>")
cpp_quote("#endif")

But this does not work for structures (like D3DVECTOR). Now I've tried tons of alternative solutions, but none worked. Unfortunately there is no d3d9.idl file shipping with the DirectX SDK Frown | :( and just refering to the d3d9.dll library using importlib wont work since the statement must only be used in the library block, but I need the types in the interface definitions!

Is there any solution to do this? Would be really cool if you have any ideas Smile | :)

Thanks,
- Aschratt.
http://www.aschratt.com

AnswerRe: Direct3D Types as interface parameters Pin
Jonathan Davies21-Feb-10 2:03
Jonathan Davies21-Feb-10 2:03 
GeneralRe: Direct3D Types as interface parameters Pin
Aschratt21-Feb-10 2:07
Aschratt21-Feb-10 2:07 
GeneralRe: Direct3D Types as interface parameters Pin
Jonathan Davies21-Feb-10 2:24
Jonathan Davies21-Feb-10 2:24 
GeneralRe: Direct3D Types as interface parameters Pin
Aschratt21-Feb-10 2:32
Aschratt21-Feb-10 2:32 
GeneralRe: Direct3D Types as interface parameters Pin
Jonathan Davies21-Feb-10 3:26
Jonathan Davies21-Feb-10 3:26 
GeneralRe: Direct3D Types as interface parameters [modified] Pin
Aschratt21-Feb-10 4:42
Aschratt21-Feb-10 4:42 
GeneralRe: Direct3D Types as interface parameters Pin
Jonathan Davies21-Feb-10 6:23
Jonathan Davies21-Feb-10 6:23 
GeneralRe: Direct3D Types as interface parameters Pin
Aschratt21-Feb-10 6:24
Aschratt21-Feb-10 6:24 
QuestionHow to create EXE setup file using VS2005,VS2008 Pin
am 20096-Feb-10 6:14
am 20096-Feb-10 6:14 
AnswerRe: How to create EXE setup file using VS2005,VS2008 Pin
KingsGambit6-Feb-10 6:38
KingsGambit6-Feb-10 6:38 
AnswerRe: How to create EXE setup file using VS2005,VS2008 Pin
LunaticFringe6-Feb-10 7:58
LunaticFringe6-Feb-10 7:58 
Questionvector of strings, find all matches Pin
ekimpl3-Feb-10 23:54
ekimpl3-Feb-10 23:54 
AnswerRe: vector of strings, find all matches Pin
Nuri Ismail4-Feb-10 0:14
Nuri Ismail4-Feb-10 0:14 
GeneralRe: vector of strings, find all matches Pin
ekimpl4-Feb-10 0:38
ekimpl4-Feb-10 0:38 
GeneralRe: vector of strings, find all matches Pin
Nuri Ismail4-Feb-10 3:51
Nuri Ismail4-Feb-10 3:51 
GeneralRe: vector of strings, find all matches Pin
ekimpl4-Feb-10 4:03
ekimpl4-Feb-10 4:03 
GeneralRe: vector of strings, find all matches Pin
Nuri Ismail4-Feb-10 4:07
Nuri Ismail4-Feb-10 4:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.