hi, srod.
I'd like to suggest some fixes for using ADOMate with the Windows x64 compiler.
First, as I read in another topic, the EXCEPINFO structure is different in the x64 library so I'd suggest
a code in COMate like this one:
Code:
;The following structure is used in the iDispatch\Invoke() method call to receive detailed errors.
CompilerIf Defined(EXCEPINFO, #PB_Structure) = 0
CompilerIf #PB_Compiler_Processor = #PB_Processor_x64
Structure EXCEPINFO
wCode.w
wReserved.w
pad.b[4] ; Only on x64
bstrSource.i ;BSTR
bstrDescription.i
bstrHelpFile.i
dwHelpContext.l
pvReserved.i
pfnDeferredFillIn.COMate_ProtoDeferredFillIn
scode.l
pad2.b[4] ; Only on x64
EndStructure
CompilerElse
Structure EXCEPINFO
wCode.w
wReserved.w
bstrSource.i ;BSTR
bstrDescription.i
bstrHelpFile.i
dwHelpContext.l
pvReserved.i
pfnDeferredFillIn.COMate_ProtoDeferredFillIn
scode.l
EndStructure
CompilerEndIf
CompilerEndIf
Next, there is something wrong when the IDispatch\Invoke is called in the x64 version. There must be an additional error code for this version because every connection that should have caused an error returns "Okay.". I haven't tested it thoroughly but here's what I saw:
Replacing the first code with the second one should do the trick for every version:
Code:
; ADOmate_OpenDatabase method - Line 1099
If SUCCEEDED(*connection\connectionObject\Invoke("Open('" + connection$ + "', " + user$ + ", " + password$ +")"))
Code:
; ADOmate_OpenDatabase method - Line 1099
If *connection\connectionObject\Invoke("Open('" + connection$ + "', " + user$ + ", " + password$ +")") = #S_OK

I hope that helps. With the changes above my code is working great in x86 and x64 versions.
BTW, thank you for this wonderful library.
EDIT: After more time debugging I think the problem resides in a deeper level. The COMateClass_INTERNAL_InvokePlus method returns a negative error number in the x86 compiler while it returns a positive one in x64. That's why the SUCCEEDED macro above always returns TRUE.
Best regards,
Andre Guerreiro Neto