aXend's COMLIB
aXend's COMLIB
Does anyone happen to know where aXend went? I'd like to get a copy of his COMLIB done with the new tailbite so that it works with 3.93..
Thanks guys!
Thanks guys!
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Anyone know aXend personally?
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
The updated version can be downloaded from http://home.planet.nl/~aXend/purebasic/COMLIB_393.zip.
COMLIB is a library to work with COM from PureBasic. You can find the previous version - including documentation - at http://home.planet.nl/~aXend/purebasic/COMLIB_demo.zip or at PureArea.Net. You can find discussions about it elsewhere on this forum.
Hmm, just downloaded, no documentation with the link provided.aXend wrote:COMLIB is a library to work with COM from PureBasic. You can find the previous version - including documentation - at http://home.planet.nl/~aXend/purebasic/COMLIB_demo.zip or at PureArea.Net. You can find discussions about it elsewhere on this forum.
It has been updated to work with 3.93 -- just after I modified everything to work around not having it! 

-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
@Shanara: If you look at test_ado.pb you'll find explenation about COMLIB including an example to work with it. See the code below.
@Karbon: I hope you're happy to work with it again. 
Code: Select all
; --------------------------------------------------------------------------------------------------------
; This is a demo program to demonstrate the use of COM from PureBasic.
;
; The zip file contains 5 items:
; - COMLIB (library file, put it in the Userlibraries directory)
; - Variant_inc.res (resident file with definitions for VARIANTS, put it in the Residents directory)
; - Variant_inc.pb (the pb version, use as Includefile)
; - ADODB.pb (the Interface definitions for ADODB, use as Includefile)
; - test_ado.pb (this demo program)
;
; COMLIB is a small library that contains 4 procedures:
;
; CreateObject(ProgID.s) - creates an object from a ProgID, just like VB does
; ReleaseObject(Object.l) - release the object
; Uni2Ansi(Unicode.l) - converts a Unicode string to Ansi
; Ansi2Uni(Ansistr.s) - converts an Ansi string to Unicode
;
; This demo program demonstrates the functionality of COMLIB with ADODB.
; ADODB is a COM object to access databases
;
; Created by aXend, 2004.
; For questions: use the forum or mail to aXend@planet.nl
;
; --------------------------------------------------------------------------------------------------------
IncludeFile "ADODB.pb" ; Definitions for all the Enumerations and Interfaces
;IncludeFile "Variant_inc.pb" ; Definitions for VARIANTS (not used here, I use the resident version)
Global sSQL.s
; Create a Connection object using the _Connection Interface and the CreateObject procedure from COMLIB
oDatabase._Connection = CreateObject("ADODB.Connection")
; Define the connectionstring (may be you have to change the path settings)
conn.s ="PROVIDER = MICROSOFT.JET.OLEDB.4.0; DATA SOURCE = 'test_ado.mdb'"
; Open the database
If oDatabase\Open(Ansi2Uni(conn),#Null,#Null,-1) = #S_OK
; I copied one tabel from the Dutch version of Northwind.mdb
sSQL = "SELECT * FROM CUSTOMERS"
; Execute the query and create a Recordset object
If oDatabase\Execute(Ansi2Uni(sSQL),@affected.VARIANT,-1,@oRecords._Recordset) = #S_OK
; Get the EOF property
oRecords\get_EOF(@EOF.VARIANT)
; If there are records in the table then continue
If EOF\value = #VARIANT_FALSE
; Get the Fields object
If oRecords\get_Fields(@oFields.Fields) = #S_OK
; Get the number of fields
oFields\get_Count(@count.l)
Debug "Number of fields is "+Str(count)
; Loop through the fields. I use the index mode here, but you can also access a field by name.
For i = 0 To count-1
; Definitions for each field, you have to do this or else it gets stuck
item.VARIANT\vt = #VT_I4 ; this is the VARIANT type for the index
item\value = i ; this is the index
*item.pToVariant = item ; this cuts the VARIANT in 4 LONG values
; Get a Field object by passing the 4 LONG values
If oFields\get_Item(*item\a,*item\b,*item\c,*item\d,@oField.Field) = #S_OK
oField\get_Value(@Field.VARIANT)
oField\get_Name(@Name.l)
If Field\vt <> #VT_BSTR
Debug Uni2Ansi(Name) + ": " + Str(Field\value)
Else
Debug Uni2Ansi(Name) + ": " + Uni2Ansi(Field\bstrVal)
EndIf
; Release the Field object
oField\Release()
EndIf
Next
; Release the Fields object
oFields\Release()
EndIf
EndIf
; Release the Recordset object
oRecords\Release()
EndIf
; Close the Connection
oDatabase\Close()
EndIf
; Release the Connection object
ReleaseObject(oDatabase)
End

Does anyone have a current working example
Of using the comlib for PB4.. I downloaded it.. but I need touse it to open and search active directory and access..
Any help or code samples would be appreciated..
Any help or code samples would be appreciated..
I very seriously doubt this is something that has been updated for PB4. I haven't heard from aXend in a long time!
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
yes but, fortunately, the COMLIB source is provided.
see here - with a little surprise
http://www.purebasic.fr/english/viewtopic.php?t=16569
see here - with a little surprise

http://www.purebasic.fr/english/viewtopic.php?t=16569
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
here is my version without unicode2ansi, this function isn't required in PB4.
You can easy peek and poke to unicode
http://www.purebasic.fr/english/viewtopic.php?t=23651
You can easy peek and poke to unicode

http://www.purebasic.fr/english/viewtopic.php?t=23651
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Re: Thanks..
this link if still ok for a good ADO example (using COMLIB).blackborg wrote:the Ansi2Uni command clashes with Droopy's LIB.. but what I really need is a help file or some working ADO code.. any word on an official Fred COM or ADO Lib?
http://home.planet.nl/~aXend/purebasic/COMLIB_demo.zip
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer