Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Delphi - COM/OLE starting example needed

Tags:

dll

com

delphi

10 years have ellapsed since I used COM/OLE, and I forget 90% of them. Now we need to make a COM object to access some data from PHP/Python (this is specific thing, the php ODBC don't access the output params of a DataBase - like stored proc output), and my idea the I realize a minimal object with one method, and PHP/Python can call this to get the output...

procedure ExecSQL(Config, IP, Port, DBName, SQL, IDFieldName : variant) : output
output is [IDValue, ErrorMsg, HResult] 

Please help me a very little example, how to start it? I need only this, but I'm confused by many ActiveX/COM in the palette. What I need to use to make a simple COM DLL, and how to register my COM object with this DLL?

Thanks: dd

like image 857
durumdara Avatar asked Apr 13 '26 09:04

durumdara


2 Answers

  1. Select File\New\ActiveX Library - this creates ActiveX DLL project
  2. Select File\New\Automation Object - this creates the type library and implementation
  3. Using the type library editor, add methods/properties to the interface
  4. Write implementation code
  5. Select Run\Register ActiveX Server - this registers the COM server DLL
like image 199
Ondrej Kelle Avatar answered Apr 14 '26 22:04

Ondrej Kelle


For COM related applications in Delphi this link is usefull http://www.techvanguards.com/

like image 38
Bharat Avatar answered Apr 15 '26 00:04

Bharat



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!