COMatePLUS version 1.2

Developed or developing a new product in PureBasic? Tell the world about it.
sec
Enthusiast
Enthusiast
Posts: 789
Joined: Sat Aug 09, 2003 3:13 am
Location: 90-61-92 // EU or ASIA
Contact:

Re: COMatePLUS version 1.2

Post by sec »

Hi there,

Does this work with last PB version?
User avatar
falsam
Enthusiast
Enthusiast
Posts: 630
Joined: Wed Sep 21, 2011 9:11 am
Location: France
Contact:

Re: COMatePLUS version 1.2

Post 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.

➽ Windows 11 64-bit - PB 6.0 x64 - AMD Ryzen 7 - NVIDIA GeForce GTX 1650 Ti

Sorry for my bad english and the Dunning–Kruger effect.
User avatar
Sveinung
Enthusiast
Enthusiast
Posts: 142
Joined: Tue Oct 07, 2003 11:03 am
Location: Bergen, Norway

Re: COMatePLUS version 1.2

Post 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
leodh
Enthusiast
Enthusiast
Posts: 164
Joined: Sun Nov 06, 2005 6:07 am
Location: Perth Western Australia

Re: COMatePLUS version 1.2

Post 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 ?
Regards
Leo
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: COMatePLUS version 1.2

Post by ts-soft »

@leodh
remove the .i from *vTable.i
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.
Image
IdeasVacuum
Always Here
Always Here
Posts: 6425
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: COMatePLUS version 1.2

Post 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
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
leodh
Enthusiast
Enthusiast
Posts: 164
Joined: Sun Nov 06, 2005 6:07 am
Location: Perth Western Australia

Re: COMatePLUS version 1.2

Post 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
Regards
Leo
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: COMatePLUS version 1.2

Post 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
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.
Image
leodh
Enthusiast
Enthusiast
Posts: 164
Joined: Sun Nov 06, 2005 6:07 am
Location: Perth Western Australia

Re: COMatePLUS version 1.2

Post 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
Regards
Leo
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Re: COMatePLUS version 1.2

Post by srod »

Have uploaded a new version which runs fine with PB 5.1 beta 4. Haven't checked beta 5.
I may look like a mule, but I'm not a complete ass.
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: COMatePLUS version 1.2

Post 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
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.
Image
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Re: COMatePLUS version 1.2

Post by srod »

Ah, I'm always at least 2 steps behind everyone else these days and 1 step equates to 1 beta!

:)
I may look like a mule, but I'm not a complete ass.
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Re: COMatePLUS version 1.2

Post 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!
Peyman
Enthusiast
Enthusiast
Posts: 203
Joined: Mon Dec 24, 2007 4:15 pm
Location: Iran

Re: COMatePLUS version 1.2

Post 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 ?
Sorry for my bad english.
IdeasVacuum
Always Here
Always Here
Posts: 6425
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: COMatePLUS version 1.2

Post 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?
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
Post Reply