forum.alglib.net
http://forum.alglib.net/

Calling alglib2.dll without directly (without interface)
http://forum.alglib.net/viewtopic.php?f=2&t=396
Page 1 of 1

Author:  crotundo [ Mon Jul 04, 2011 8:55 am ]
Post subject:  Calling alglib2.dll without directly (without interface)

Hi,

In the thread viewtopic.php?f=2&t=145&p=848&hilit=minbleic#p848
we implemented a COM-visible interface, in order to call the underlying minBLEIC functionality and that worked fine. Unfortunately, my colleagues have another Windows version and are not very into COM/.Net technology.

Is it also possible to call the alglib2.dll's methods directly i.e. without COM registration etc., via e.g. the declare statement in VBA?

for instance something of the type:

public declare minbleicsetbc lib "alglib2" (...)

Is it alternatively possilble to use the VBA statement CreateObject("ALGLIB") creating an instance of an ALGLIB object?

Author:  Sergey.Bochkanov [ Mon Jul 04, 2011 8:09 pm ]
Post subject:  Re: Calling alglib2.dll without directly (without interface)

I don't know much about VBA-dotNet interfacing, it is quite an esoteric area. And, in fact, calling managed code from unmanaged code seems to be very sparsely documented by MS. More common scenario (calls to native functions from .NET program) is much more better documented and discussed in the network. So I can't give you any recommendation about your specific way of using ALGLIB.

But maybe it is better to use C++ version of ALGLIB? VBA is relatively good at calling native functions. You have to write code which passes complex data structures like multidimensional dynamic arrays, but at the very least you have good documentation.

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/