D - COM questions?
- Robert M. Münch (17/17) Jan 15 2003 Hi, well I didn't got an answer to my first try :-(, so I try again:
- Walter (4/15) Jan 16 2003 At the moment, you'll have to declare them yourself. Nobody has done the
- Robert M. Münch (4/6) Jan 20 2003 Hi, ok. I try to see if a tool can be done that takes a typelib and crea...
- Robert M. Münch (6/8) Jan 21 2003 Hi, one more question: Do I have to declare the complete interface or is...
- Mike Wynn (20/28) Jan 21 2003 it
- Robert M. Münch (13/26) Jan 27 2003 Hi, ok but I need to use the same order as MS did otherwise lookups in t...
- Sean L. Palmer (11/38) Jan 27 2003 I have a bunch of DirectX header stuff ported for D. (ok, so it was like...
- Robert M. Münch (8/11) Jan 28 2003 Hi, IMO this would really be cool! Using D for COM development could be ...
- Mike Wynn (24/68) Jan 28 2003 how complete are you DirectX headers, there realy should be a combined
- =?iso-8859-15?Q?=22Robert_M._M=FCnch=22?= (9/12) Jan 28 2003 Hi, yes that's a good idea. Further I'm not only interested in DirectX b...
Hi, well I didn't got an answer to my first try :-(, so I try again:
I want to use some COM objects with D. Where do I get the interface
definition from? IUnknown is defined in com.d
interface IUnknown
{
HRESULT QueryInterface(IID* riid, void** pvObject);
ULONG AddRef();
ULONG Release();
}
But for other COM objects? Do I have to build all those interfaces up
myself? Can I use typelibs?
--
Robert M. Münch
IT & Management Freelancer
Mobile: +49 (0)177 2452 802
Fax : +49 (0)721 8408 9112
Web : http://www.robertmuench.de
Jan 15 2003
At the moment, you'll have to declare them yourself. Nobody has done the
work to make the .d imports for them.
"Robert M. Münch" <robert.muench robertmuench.de> wrote in message
news:b04fdh$8pl$1 digitaldaemon.com...
Hi, well I didn't got an answer to my first try :-(, so I try again:
I want to use some COM objects with D. Where do I get the interface
definition from? IUnknown is defined in com.d
interface IUnknown
{
HRESULT QueryInterface(IID* riid, void** pvObject);
ULONG AddRef();
ULONG Release();
}
But for other COM objects? Do I have to build all those interfaces up
myself? Can I use typelibs?
Jan 16 2003
"Walter" <walter digitalmars.com> schrieb im Newsbeitrag news:b071n7$1pb5$1 digitaldaemon.com...At the moment, you'll have to declare them yourself. Nobody has done the work to make the .d imports for them.Hi, ok. I try to see if a tool can be done that takes a typelib and creates source-code. Robert
Jan 20 2003
"Walter" <walter digitalmars.com> schrieb im Newsbeitrag news:b071n7$1pb5$1 digitaldaemon.com...At the moment, you'll have to declare them yourself. Nobody has done the work to make the .d imports for them.Hi, one more question: Do I have to declare the complete interface or is it possible to only add a few functions to start with? Do I have to considere a specific order of entries in the interface declaration? IIRC these calls are translated into a VTBL lookup so IMO this might be the case. Robert
Jan 21 2003
"Robert M. Münch" <robert.muench robertmuench.de> wrote in message news:b0j3cn$2dh9$1 digitaldaemon.com..."Walter" <walter digitalmars.com> schrieb im Newsbeitrag news:b071n7$1pb5$1 digitaldaemon.com...itAt the moment, you'll have to declare them yourself. Nobody has done the work to make the .d imports for them.Hi, one more question: Do I have to declare the complete interface or ispossible to only add a few functions to start with? Do I have to considereaspecific order of entries in the interface declaration? IIRC these callsaretranslated into a VTBL lookup so IMO this might be the case. Robertno you must only define the new methods as in interface IDirectDrawPalette : IUnknown { /*** IUnknown methods ***/ // HRESULT QueryInterface( REFIID riid, LPVOID * ppvObj); // ULONG AddRef(); // ULONG Release(); /*** IDirectDrawPalette methods ***/ HRESULT GetCaps( LPDWORD ); HRESULT GetEntries( DWORD,DWORD,DWORD,LPPALETTEENTRY ); HRESULT Initialize( LPDIRECTDRAW, DWORD, LPPALETTEENTRY ); HRESULT SetEntries( DWORD,DWORD,DWORD,LPPALETTEENTRY ); } if not the vtbl ends up off by (in this case 3) Mike.
Jan 21 2003
"Mike Wynn" <mike.wynn l8night.co.uk> schrieb im Newsbeitrag
news:b0j4pl$2e73$1 digitaldaemon.com...
no you must only define the new methods as in
interface IDirectDrawPalette : IUnknown
{
/*** IUnknown methods ***/
// HRESULT QueryInterface( REFIID riid, LPVOID * ppvObj);
// ULONG AddRef();
// ULONG Release();
/*** IDirectDrawPalette methods ***/
HRESULT GetCaps( LPDWORD );
HRESULT GetEntries( DWORD,DWORD,DWORD,LPPALETTEENTRY );
HRESULT Initialize( LPDIRECTDRAW, DWORD, LPPALETTEENTRY );
HRESULT SetEntries( DWORD,DWORD,DWORD,LPPALETTEENTRY );
}
Hi, ok but I need to use the same order as MS did otherwise lookups in the
VTBL will be screwed up.
So I tried to get the above interface running but encountered further
problems:
1. I need the CLSID and the IID. I extracted these values from the MS header
files.
2. The LPDIRECTDRAW symbol isn't defined for D yet. The LPPALETTEENTRY is
defined in win32.d, which isn't compatible with windows.d ... :-((
Walter, would it be possible that we move to win32.d ? IMO there are much
more symbols in it. It's really annoying to have two "header" files that are
incompatible. Robert
Jan 27 2003
I have a bunch of DirectX header stuff ported for D. (ok, so it was like DMD version 0.39 or something) Drop me a direct email if you want them. I wonder if it's possible to have #import for DLL's or typelib's, for D? other M$ libraries too. Sean "Robert M. Münch" <robert.muench robertmuench.de> wrote in message news:b13ftp$22pu$1 digitaldaemon.com..."Mike Wynn" <mike.wynn l8night.co.uk> schrieb im Newsbeitrag news:b0j4pl$2e73$1 digitaldaemon.com...headerno you must only define the new methods as in interface IDirectDrawPalette : IUnknown { /*** IUnknown methods ***/ // HRESULT QueryInterface( REFIID riid, LPVOID * ppvObj); // ULONG AddRef(); // ULONG Release(); /*** IDirectDrawPalette methods ***/ HRESULT GetCaps( LPDWORD ); HRESULT GetEntries( DWORD,DWORD,DWORD,LPPALETTEENTRY ); HRESULT Initialize( LPDIRECTDRAW, DWORD, LPPALETTEENTRY ); HRESULT SetEntries( DWORD,DWORD,DWORD,LPPALETTEENTRY ); }Hi, ok but I need to use the same order as MS did otherwise lookups in the VTBL will be screwed up. So I tried to get the above interface running but encountered further problems: 1. I need the CLSID and the IID. I extracted these values from the MSfiles. 2. The LPDIRECTDRAW symbol isn't defined for D yet. The LPPALETTEENTRY is defined in win32.d, which isn't compatible with windows.d ... :-(( Walter, would it be possible that we move to win32.d ? IMO there are much more symbols in it. It's really annoying to have two "header" files thatareincompatible. Robert
Jan 27 2003
"Sean L. Palmer" <seanpalmer directvinternet.com> schrieb im Newsbeitrag news:b13sv6$2akp$1 digitaldaemon.com...I wonder if it's possible to have #import for DLL's or typelib's, for D? other M$ libraries too.Hi, IMO this would really be cool! Using D for COM development could be the killer application for D. The MS environment setup is just to big for a quick development. What I'm dreaming about is using D and some available COM files and that's it. My current goal is to use MS Word as a COM object in a D project. It looks like this is a real challange... Robert
Jan 28 2003
how complete are you DirectX headers, there realy should be a combined
effort somewhere, I have done the basic DirectX interface (explicit loading
of ddraw.dll, get the entry point etc)
I second the call for importing from dll;
one of the great delphi features (still IMHO does not outweight the horrid
syntax and dynamic array behaviour (which D has as well)) is the ability to
decare functions to import from dlls
in delphi the following
function getAHandle( a, b : LongInt ) : THandle; cdecl; extern mylib.dll;
will import a function from mylib.dll
which was compiled with the following C prototype
__declspec(dllexport) HANDLE getAHandle( long a, long b );
it would be nice to have
extern (C, mylib.dll) { HANDLE getAHamde( long a, long b ); }
and later when someone worked out how to connect a GC to a dll or app and
allow classes in dlls (like C++ can)
extern (D, mylib.dll) { MyObj getADHamde( long a, long b ); }
but more on that when I've worked out what is actually required.
"Sean L. Palmer" <seanpalmer directvinternet.com> wrote in message
news:b13sv6$2akp$1 digitaldaemon.com...
I have a bunch of DirectX header stuff ported for D. (ok, so it was like
DMD
version 0.39 or something)
Drop me a direct email if you want them.
I wonder if it's possible to have #import for DLL's or typelib's, for D?
other M$ libraries too.
Sean
"Robert M. Münch" <robert.muench robertmuench.de> wrote in message
news:b13ftp$22pu$1 digitaldaemon.com...
"Mike Wynn" <mike.wynn l8night.co.uk> schrieb im Newsbeitrag
news:b0j4pl$2e73$1 digitaldaemon.com...
no you must only define the new methods as in
interface IDirectDrawPalette : IUnknown
{
/*** IUnknown methods ***/
// HRESULT QueryInterface( REFIID riid, LPVOID * ppvObj);
// ULONG AddRef();
// ULONG Release();
/*** IDirectDrawPalette methods ***/
HRESULT GetCaps( LPDWORD );
HRESULT GetEntries( DWORD,DWORD,DWORD,LPPALETTEENTRY );
HRESULT Initialize( LPDIRECTDRAW, DWORD, LPPALETTEENTRY );
HRESULT SetEntries( DWORD,DWORD,DWORD,LPPALETTEENTRY );
}
Hi, ok but I need to use the same order as MS did otherwise lookups in
the
VTBL will be screwed up.
So I tried to get the above interface running but encountered further
problems:
1. I need the CLSID and the IID. I extracted these values from the MS
header
files.
2. The LPDIRECTDRAW symbol isn't defined for D yet. The LPPALETTEENTRY
is
defined in win32.d, which isn't compatible with windows.d ... :-((
Walter, would it be possible that we move to win32.d ? IMO there are
much
more symbols in it. It's really annoying to have two "header" files that
are
incompatible. Robert
Jan 28 2003
On Wed, 29 Jan 2003 01:43:31 -0000, Mike Wynn <mike.wynn l8night.co.uk> wrote:how complete are you DirectX headers, there realy should be a combined effort somewhere, I have done the basic DirectX interface (explicit loading of ddraw.dll, get the entry point etc)Hi, yes that's a good idea. Further I'm not only interested in DirectX but in other COM stuff too. For example using all the MS Office stuff via COM makes a lot of sense too. So a central D-COM ;-)) library would really be nice. What side is best suited to keep such an information? -- Robert M. Münch
Jan 28 2003









"Robert M. Münch" <robert.muench robertmuench.de> 