Need Help with OLE 
Author Message
 Need Help with OLE

I've got myself a little confused on how to approach a OLE Automation
problem.

The OLE/COM class/object that I need to access is embedded inside of a .exe,
not a .dll. I've got access to the .odl and the .tlb files that contain the
description of the library and dispinterfaces. Can I use either of these two
files to create a client-side application (hopefully automatically)? If not,
I'm not getting (yet) how do define the interface file in Dylan, given the
.odl file.

Hopefully a Dylan/OLE guru can give me a jump-start on this.

Here's a snippet of the ODL file:
----------------------------------------------------------------------------
--------------------------------------------------
// OBDASvr.odl : type library source for OBDASvr.exe

[ uuid(77A2D181-3491-11D0-8AC8-8516D4C68E75), version(1.0) ]
library OBDASvr
{
 importlib("stdole32.tlb");

 //  Primary dispatch interface for COBDASvrDoc

 [ uuid(77A2D182-3491-11D0-8AC8-8516D4C68E75) ]
 dispinterface IOBDASv
 {
  properties:

  methods:

   [id(1)] BSTR IGetEntityName(BSTR strParam);
   [id(2)] BSTR IGetParameterName(BSTR strParam);

   *[snip]*

 };

 //  Class information for COBDASvrDoc

 [ uuid(77A2D180-3491-11D0-8AC8-8516D4C68E75) ]
 coclass Document
 {
  [default] dispinterface IOBDASv;
 };

Quote:
};

----------------------------------------------------------------------------
--------------------------------------------------

Thanks,

Ron Franke-Polz



Mon, 02 Dec 2002 03:00:00 GMT  
 Need Help with OLE

Quote:

> Can I use either of these two files to create a client-side
> application (hopefully automatically)?

You can use the 'Interface to COM Type Library' wizard when creating a
new project. This will let you select the type library from a list or
browse. You'll probably want to browse and select the .tlb file.

One the 'generate stubs' page you'll probably want 'Dispatch Client
Interfaces' selected. Then go through the remaining wizard pages and
generate the DLL. When you compile it FD will automatically generate
the dylan code to access the COM objects in the type library.

As an example, I go through how to do this with the Microsoft MSXML
parser at:

http://www.double.co.nz/dylan/tips/usingmsxml.htm

Hope that helps,
Chris.
--
http://www.double.co.nz/dylan



Tue, 03 Dec 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Need Help with Ole

2. need help integrating with Crystal Reports via OLE

3. Help needed with OLE/OCX...

4. Help needed with OLE event handling

5. OLE - Help needed

6. Need Help - OLE/OCX connection to ODBMS

7. Need to pass OLE object to VB

8. Need OLE container control for C5ABC

9. Need ODBC or (better yet) OLE DB data driver/provider for CA-Realia ISAM data

10. ***HELP***HELP***NEED INFORMATION***HELP***HELP

11. HELP with OLE ???

12. Help!!! C5 OLE MSWord

 

 
Powered by phpBB® Forum Software