Click here to Skip to main content
15,923,087 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralRe: Seeking introductory text on the STL Pin
Richard MacCutchan28-Mar-10 5:49
mveRichard MacCutchan28-Mar-10 5:49 
GeneralRe: Seeking introductory text on the STL Pin
sunlin728-Mar-10 20:29
sunlin728-Mar-10 20:29 
GeneralRe: Seeking introductory text on the STL Pin
Richard MacCutchan28-Mar-10 22:55
mveRichard MacCutchan28-Mar-10 22:55 
GeneralRe: Seeking introductory text on the STL Pin
sunlin729-Mar-10 4:47
sunlin729-Mar-10 4:47 
GeneralRe: Seeking introductory text on the STL Pin
Stuart Dootson28-Mar-10 8:03
professionalStuart Dootson28-Mar-10 8:03 
AnswerRe: Seeking introductory text on the STL Pin
LunaticFringe30-Mar-10 6:55
LunaticFringe30-Mar-10 6:55 
Questionuse of vector /map /list Pin
ramina sen24-Feb-10 22:59
ramina sen24-Feb-10 22:59 
AnswerRe: use of vector /map /list Pin
tasumisra25-Feb-10 0:41
tasumisra25-Feb-10 0:41 
QuestionPassing a string to a method that takes an IDispatch*? Pin
Rob Caldecott24-Feb-10 9:49
Rob Caldecott24-Feb-10 9:49 
AnswerRe: Passing a string to a method that takes an IDispatch*? Pin
Stuart Dootson24-Feb-10 21:01
professionalStuart Dootson24-Feb-10 21:01 
GeneralRe: Passing a string to a method that takes an IDispatch*? Pin
Rob Caldecott25-Feb-10 10:56
Rob Caldecott25-Feb-10 10:56 
GeneralRe: Passing a string to a method that takes an IDispatch*? Pin
Stuart Dootson25-Feb-10 11:36
professionalStuart Dootson25-Feb-10 11:36 
QuestionRun Only One Instance Of this AddOn In Multiple IE Win Pin
A_Fa24-Feb-10 3:06
A_Fa24-Feb-10 3:06 
AnswerRe: Run Only One Instance Of this AddOn In Multiple IE Win Pin
KingsGambit24-Feb-10 6:00
KingsGambit24-Feb-10 6:00 
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 

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.