Re: Recipe and best practice for accessing COM

2012-09-09 Thread newToCOM
Still struggling.. test.d: --- ( ... ) /* Other imports */ import win32.directx.d2d1; alias win32.directx.d2d1.IID IID; IID IID_ID2D1Factory = { 0x06152247, 0x6F50, 0x465A, [0x92, 0x45, 0x11, 0x8B, 0xFD, 0x3B, 0x60, 0x07] }; extern (Windows) int WinMain( ...

Re: Recipe and best practice for accessing COM

2012-09-09 Thread Sean Cavanaugh
On 9/9/2012 7:30 AM, newToCOM wrote: Still struggling.. test.d: --- ( ... ) /* Other imports */ import win32.directx.d2d1; alias win32.directx.d2d1.IID IID; IID IID_ID2D1Factory = { 0x06152247, 0x6F50, 0x465A, [0x92, 0x45, 0x11, 0x8B, 0xFD, 0x3B, 0x60, 0x07] };

Re: Recipe and best practice for accessing COM

2012-09-09 Thread Sean Cavanaugh
On 9/9/2012 7:57 AM, Sean Cavanaugh wrote: On 9/9/2012 7:30 AM, newToCOM wrote: I've been super busy at work so haven't had much time to respond to this thread. I also have a D version of something resembling ATL's CComPtr which I am finally happy enough with to share, that I could post

Re: Recipe and best practice for accessing COM

2012-09-09 Thread newToCOM
In this example the pID2D1Factory is a void*, so it will need a cast to the proper type with a cast(ID2D1Factory) soemtime after the create call; Since this particular API takes an out void* (since it is capable of creating multiple unrelated types), it would need to look something like

Re: Recipe and best practice for accessing COM

2012-09-09 Thread newToCOM
I also have a D version of something resembling ATL's CComPtr which I am finally happy enough with to share, that I could post when i get home later tonight. The class is a good argument for keeping the rather esoteric opDot operator, since alias this is extremely dangerous for smart pointer

Re: Recipe and best practice for accessing COM

2012-09-04 Thread newToCOM
On Monday, 3 September 2012 at 09:10:49 UTC, Kagamin wrote: The diagnostic message can definitely be better. Any idea what's causing the error messages? Why aren't the types matching?

Re: Recipe and best practice for accessing COM

2012-09-03 Thread Kagamin
The diagnostic message can definitely be better.

Re: Recipe and best practice for accessing COM

2012-09-02 Thread newToCOM
Thanks for your replies! I'm trying to accomplish this: http://msdn.microsoft.com/en-us/library/windows/apps/dd535473.aspx Using win32 and directx.d2d1, I got this far: --- ... int WinMain( ... ) { ... } int myWinMain( ... ) { ... } LRESULT WndProc ( ... ) { ... case WM_CREATE:

Re: Recipe and best practice for accessing COM

2012-07-25 Thread Sean Cavanaugh
On 7/24/2012 2:01 PM, newToCOM wrote: I am trying to use COM to access Windows functionality and APIs. I have read the interface documentation and some documentation at MSDN. I have seen the included sample snippet for IHello and the slides Modern COM programming in D, but it is still not clear

Re: Recipe and best practice for accessing COM

2012-07-25 Thread Jesse Phillips
On Tuesday, 24 July 2012 at 19:01:15 UTC, newToCOM wrote: I am trying to use COM to access Windows functionality and APIs. I have read the interface documentation and some documentation at MSDN. I have seen the included sample snippet for IHello and the slides Modern COM programming in D, but

Recipe and best practice for accessing COM

2012-07-24 Thread newToCOM
I am trying to use COM to access Windows functionality and APIs. I have read the interface documentation and some documentation at MSDN. I have seen the included sample snippet for IHello and the slides Modern COM programming in D, but it is still not clear exactly what to do and what the best

Re: Recipe and best practice for accessing COM

2012-07-24 Thread newToCOM
http://forum.dlang.org/thread/fj617q$15qk$1...@digitalmars.com Found this, which may help.