Page 19 of 23

Re: COMatePLUS version 1.2

Posted: Thu Sep 27, 2012 11:40 am
by sec
Hi there,

Does this work with last PB version?

Re: COMatePLUS version 1.2

Posted: Thu Sep 27, 2012 1:56 pm
by falsam
sec wrote:Hi there,Does this work with last PB version?
Hello. I compiled my utilities running ComatePlus and I do not have problem.

Re: COMatePLUS version 1.2

Posted: Mon Jan 21, 2013 10:01 am
by Sveinung
I'm trying to list user data using LDAP and ComMate pluss. But I can't get it to work. I have found a lot of very Nice examples here on the Board, but when I try to use a MSDN c++ example, it will not execute rigth.

My querystring

Code: Select all

String$ = "<GC://" + DefaultNamingContext$ + ">;(&(objectCategory=Person))(objectClass=user));cn,distinguishedName,subtree"
Whole procedure

Code: Select all

Procedure.s LDAP_GetGroupInfo(DefaultNamingContext$, Group$) 
    Result$ = ""
    objConnection.COMateObject
    objCommand.COMateObject
    objRecordSet.COMateObject
    objConnection = COMate_CreateObject("ADODB.Connection")
    objCommand = COMate_CreateObject("ADODB.Command")
    ;objRecordSet = COMate_CreateObject("ADODB.RecordSet")
    If objConnection And objCommand ;And objRecordSet
        objConnection\SetProperty("Provider='ADsDSOObject'")
        If objConnection\Invoke("Open('Active Directory Provider')") = #S_OK
            String$ = "<GC://" + DefaultNamingContext$ + ">;(&(objectCategory=Person))(objectClass=user));cn,distinguishedName,subtree"
            If COMate_GetLastErrorCode() = #S_OK
                objCommand\SetProperty("ActiveConnection = " + Str(objConnection) + " as COMateObject")
                objCommand\SetProperty("Properties('Page Size') = 100")
                objCommand\SetProperty("CommandText = '" + String$ + "'")
                Debug String$
                objRecordSet = objCommand\GetObjectProperty("Execute()")
                Debug objRecordSet
                ;err$ = COMate_GetLastErrorDescription()
                ;If objRecordSet
                 ;   rcount.l = objRecordSet\GetIntegerProperty("RecordCount")
                 ;   If rcount > 0
                 ;       For counter.l = 1 To rcount
                 ;           Debug "JADA"
                 ;           objRecordSet\Invoke("MoveNext")
                 ;       Next
                 ;   EndIf
                 ;   objRecordSet\Invoke("Close")
                ;EndIf    
            EndIf
        EndIf
        ;objRecordSet\Release()
        objCommand\Release()
        objConnection\Release()
    Else
        Result$ = "Error - ADO not available"       
    EndIf
    ProcedureReturn Result$
EndProcedure
I hope someone can help me solve this.

Regards
Sveinung

Re: COMatePLUS version 1.2

Posted: Tue Feb 05, 2013 7:46 am
by leodh
Hi srod,

I am having problems runnig COMatePLUS with PB 5.1 B5

I get an error :
Line 89, Native types cant be used with Pointers.

Line 89 = *vTable.i

is there anything that I need to setup differently to run in PB 5.1 ?

Re: COMatePLUS version 1.2

Posted: Tue Feb 05, 2013 7:50 am
by ts-soft
@leodh
remove the .i from *vTable.i

Re: COMatePLUS version 1.2

Posted: Tue Feb 05, 2013 7:53 am
by IdeasVacuum
Hi Leo. In PB5, the use of native types for pointers is banned.

So *vTable.i should be *vTable

If the type of value being pointed to needs to be obvious, the var can be named to suit e.g. vTable_i or ivTable etc

Re: COMatePLUS version 1.2

Posted: Tue Feb 05, 2013 8:09 am
by leodh
@ts-soft
@IdeasVacuum

I have tried that but it did not fix the problem. That seemed to be the simplest solution, I now suspect that there is something wrong with the includes I will reintall COMatePlus and try again.

Thanks

Re: COMatePLUS version 1.2

Posted: Tue Feb 05, 2013 8:26 am
by ts-soft
You have to change all pointers with native type:

Code: Select all

Line 89
from: *vTable.i
to:   *vTable

Line 98
from: *vTable.i
to:   *vTable

Line 143
from: *Vtbl.i
to:   *Vtbl

Re: COMatePLUS version 1.2

Posted: Tue Feb 05, 2013 9:27 am
by leodh
@ ts-soft

Yep changed them all. It seems to be PB 5.1 B5 that is the issue, just tried reinstalling both PB and Comate and it works now.( Maybe to many versions of PB on the PC is the problem )

Thanks for your help

Leo

Re: COMatePLUS version 1.2

Posted: Tue Feb 05, 2013 10:47 am
by srod
Have uploaded a new version which runs fine with PB 5.1 beta 4. Haven't checked beta 5.

Re: COMatePLUS version 1.2

Posted: Tue Feb 05, 2013 10:54 am
by ts-soft
srod wrote:Haven't checked beta 5.
Hi stephen,
we are on beta 6 upload 2 :lol:
but this should not a problem.

Greetings - Thomas

Re: COMatePLUS version 1.2

Posted: Tue Feb 05, 2013 11:08 am
by srod
Ah, I'm always at least 2 steps behind everyone else these days and 1 step equates to 1 beta!

:)

Re: COMatePLUS version 1.2

Posted: Wed Feb 13, 2013 2:18 pm
by Polo
http://www.purebasic.fr/english/viewtop ... 13&t=53368

Can anyone give me some starting point to use that library? I'm a bit desperate!

Re: COMatePLUS version 1.2

Posted: Fri Mar 15, 2013 10:10 pm
by Peyman
im try to use a component and use its drag n drop events. this component have RegisterDragDrop method but when i call it i got OUTOFMEMORY error. i search in msdn and find this note :
Note If you use CoInitialize or CoInitializeEx instead of OleInitialize to initialize COM, RegisterDragDrop will always return an E_OUTOFMEMORY error.
http://msdn.microsoft.com/en-us/library ... 85%29.aspx

so i use OleInitialize_(0) and everything is ok, i want know it is not better to use OleInitialize instead of CoInitialize in COMatePLUS ?

Re: COMatePLUS version 1.2

Posted: Sat May 25, 2013 3:44 pm
by IdeasVacuum
dige wrote:I use COMate to send Emails via COMate_CreateObject("Outlook.Application").
Does anybody knows if its possible to use also other Email clients than Outlook,
eg. Thunderbird?
Did you ever get anywhere using other email clients dige?