JSON-RPC from Visual Basic 6?

590 views
Skip to first unread message

Cameron Taggart

unread,
Jan 19, 2007, 6:30:34 PM1/19/07
to Jayrock
Our application is written in Java and we have C and Visual Basic 6,
and C# .NET clients. I've been looking at JSON-RPC as a possible
communication method, but I can't find anything for VB6. Not being too
familiar with the Microsoft stack, can .NET be called from VB6? Can
Jayrock be used from VB6? If not, any other suggestions?

cheers,
Cameron

Atif Aziz

unread,
Jan 22, 2007, 8:27:55 AM1/22/07
to jay...@googlegroups.com
> can .NET be called from VB6?

Yes it can. There are two options, namely COM interop and hosting the runtime. Before you go down that route, you might want to consider a solution I hinted in the JSON group some time ago that does not require a version of the .NET Framework at all:

http://tech.groups.yahoo.com/group/json/message/117

For more information on Microsoft Script Control eluded to in the message above, check out:
http://msdn2.microsoft.com/en-us/library/ms974586.aspx

Let's say you're using Jayrock to expose a JSON-RPC service. It wouldn't be too hard then to imagine how the JavaScript proxy that is automatically supplied for a service in Jayrock to be leveraged from VB6. See the small bit of VB6 code that I've attached here to illustrate this in action. I leave the rest of what you can do with this as an exercise for your imagination. :)

- Atif

JayrockClientDemo.vbp

Atif Aziz

unread,
Jan 22, 2007, 8:33:36 AM1/22/07
to jay...@googlegroups.com
Sorry, attached the project file only in the last reply. This time, I've also included the actual BAS file that contains the code of interest.
Main.zip
Reply all
Reply to author
Forward
0 new messages