Load COM dll library from VA smalltalk 6.0.1

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Load COM dll library from VA smalltalk 6.0.1

Stefano Lupatini
Hi,
i have a old .net dll com library developed last year for testing.

Unfortunally today I have try to recall this library via PlatformFunction like this:

(PlatformFunction
 callingConvention: 'c'
 function: 'MyFunction'
 library: 'comdll.comclass'
 parameterTypes: #()
 returnType: #int32
) call 

The code is the same, but the enviroment changed. VA Smalltalk launch this error : "Primitive failed calling 'comdll.comclass'':MyFunction from PlatformFunction>> #call due to OS error126'

Seems that library is not registered, obviously i have register dll via regasm.

Everyone have some idea?



--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Load COM dll library from VA smalltalk 6.0.1

Instantiations mailing list
Hi Stefano,

does the dll reside in the same path like your abt.icx?
If not, try to copy the dll into that same path and see if that might help.
In additions to that. Are you sure that all the referenced dlls of your dll are available and registered in the environment?

You may want to try the free tool DependencyWalker. Open your dll with it and see if there are conflicts mentioned.

Sebastian


Am 01.09.2014 08:29, schrieb Stefano Lupatini:
Hi,
i have a old .net dll com library developed last year for testing.

Unfortunally today I have try to recall this library via PlatformFunction like this:

(PlatformFunction
 callingConvention: 'c'
 function: 'MyFunction'
 library: 'comdll.comclass'
 parameterTypes: #()
 returnType: #int32
) call 

The code is the same, but the enviroment changed. VA Smalltalk launch this error : "Primitive failed calling 'comdll.comclass'':MyFunction from PlatformFunction>> #call due to OS error126'

Seems that library is not registered, obviously i have register dll via regasm.

Everyone have some idea?



--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Load COM dll library from VA smalltalk 6.0.1

Richard Sargent
Administrator
In reply to this post by Stefano Lupatini
On Monday, September 1, 2014 8:29:16 AM UTC-7, Stefano Lupatini wrote:
i have a old .net dll com library developed last year for testing.

Unfortunally today I have try to recall this library via PlatformFunction like this:

...
The code is the same, but the enviroment changed. VA Smalltalk launch this error : "Primitive failed calling 'comdll.comclass'':MyFunction from PlatformFunction>> #call due to OS error126'

Seems that library is not registered, obviously i have register dll via regasm.

You should also look at this example: https://groups.google.com/d/msg/va-smalltalk/TiqvoECYh3I/NyC3-SJfeCMJ
He talks about determining what caused the load to fail. It's proven itself very helpful to me.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Load COM dll library from VA smalltalk 6.0.1

Randy Nelson-2
First thing to try is get "Depends.exe", (I have no connection - just a user). It will tell you the exact dll missing in the long a sordid dll chain. Second, if this is on XP, you may be out of luck as COM now requires dlls that will not run under XP.

Anyway, "Depends" will tell all.

Hope that helps


On Mon, Sep 1, 2014 at 4:12 PM, Richard Sargent <[hidden email]> wrote:
On Monday, September 1, 2014 8:29:16 AM UTC-7, Stefano Lupatini wrote:
i have a old .net dll com library developed last year for testing.

Unfortunally today I have try to recall this library via PlatformFunction like this:

...
The code is the same, but the enviroment changed. VA Smalltalk launch this error : "Primitive failed calling 'comdll.comclass'':MyFunction from PlatformFunction>> #call due to OS error126'

Seems that library is not registered, obviously i have register dll via regasm.

You should also look at this example: https://groups.google.com/d/msg/va-smalltalk/TiqvoECYh3I/NyC3-SJfeCMJ
He talks about determining what caused the load to fail. It's proven itself very helpful to me.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Load COM dll library from VA smalltalk 6.0.1

John O'Keefe-3
In reply to this post by Stefano Lupatini
Stefano -

The secret to your problem is revealed when you say ".net dll com library". PlatformFunctions are not designed to access .NET DLLs nor COM DLLs. If you want to access COM objects you need to use the OLE support in VA Smalltalk.

John

On Monday, September 1, 2014 11:29:16 AM UTC-4, Stefano Lupatini wrote:
Hi,
i have a old .net dll com library developed last year for testing.

Unfortunally today I have try to recall this library via PlatformFunction like this:

(PlatformFunction
 callingConvention: 'c'
 function: 'MyFunction'
 library: 'comdll.comclass'
 parameterTypes: #()
 returnType: #int32
) call 

The code is the same, but the enviroment changed. VA Smalltalk launch this error : "Primitive failed calling 'comdll.comclass'':MyFunction from PlatformFunction>> #call due to OS error126'

Seems that library is not registered, obviously i have register dll via regasm.

Everyone have some idea?



--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.