Squeak .Net

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

Squeak .Net

Boingo
Hello everyone,

I am looking for a few pointers in the right direction concerning the
Squeak-.Net-Bridge.  I am returning to Squeak after taking a few years
off, so I am a bit rusty, but it is coming back to me.  That being
said, I have never used the .Net bridge at all, so I am totally new to
it.

I have some code in VBS below, that works just fine.  I am looking to
try and use the same COM object in Squeak.  I have followed the
instructions at <http://wiki.squeak.org/squeak/459> for wrapping the
dll for .Net using tlbimp.exe and it seemed to work fine.  At least no
errors.  I then moved my new dll, "ProvideX.dll" to the Squeak folder.
 I then tried to print in a workspace:

DotNet Assembly loadFrom: 'ProvideX.dll'.

I got back:

ProvideX, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null

Which I assume is a good thing, but it could be a bad assumption on my
part.  At this point, I am stumped.  I have tried a bunch of things
and nothing seems to work.  I have even followed the example on that
site by trying the WSHShell example.  Everything works as described in
the example until I get to "shell := DotNet WshShellClass new." and
then I get an "Unknown Selector" on the WshShellClass.

I have included a snippet of some VBS code that accesses the original
(non-wrapped) COM component below. Hopefully you can shed some light
on what I might be doing wrong.  I
also have working sample VB, and C# code if that helps.

Incidentally, if someone knows a better way to access a COM object
from squeak, I am all ears.

----------------------------------------------------
Set oScript = CreateObject ("ProvideX.Script")
oScript.Init("C:\\Program Files\\Sage Software\\MAS 90\\Version4\\MAS90\\Home")

' Set the user for the Session
Set oSS = oScript.NewObject("SY_Session")
r = oSS.nLogon()
If r=0 Then
   ' Please remember to replace the usercode, password with valid info
   r = oss.nSetUser("xxx","xxx")
End If
-----------------------------------------------------

Thank you in advance for any help you can provide.  I really do appreciate it.