11/25/2024 4:38:29 AM
|
|
slxdeveloper.com Community Forums |
|
|
|
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
Forum to discuss SalesLogix legacy development including views, scripts, etc.. View the code of conduct for posting guidelines.
|
|
|
|
How do I pass (split Array) strings from VB6 DLL object into GlobalVeriable
Posted: 15 Jul 10 10:02 PM
|
Hi, I have a DLL object call TA_SL_Scripts.dll and it processes a VB function which splits a string and I need to pass the splited (Array) string back to SalesLogix. I am able to pass a single string using GlobalInfo via Saleslogix.ClientObix but I can't pass a Array String for some reason. I am guessing the globalInfo is not meant for Array strings-? (Please see the codes below for more detail.) Any help is very much appreciated!
----Here is the code in DLL -------------------------------------------- Option Explicit
'Since SLx does not have Split function we'll use VB6 DLL Public Function SplitString(StringToSplit As String, Argument As String) Dim oSLx As Object Dim aSplit() as string
MsgBox (StringToSplit) 'TEST if the string was passed from SL to DLL aSplit = Split(StringToSplit, Argument) 'Here we just splited our String from SalesLogix Set oSLx = CreateObject("SalesLogix.ClientObjix") oSLx.GlobalInfoSet "GBSplitResults", aSplit() 'Store the splited array in SL Global Veriable Set oSLx = Nothing End Function --------------------------------------------
--- Code in SalesLogix --- (Legacy Script) -------------------------------------------- Dim oTASL as object Dim SplitResults(10) Dim MyString() as string
set oTASL=CreateObject("TA_SL_Scripts.VBFunctions") 'Register/load Dllobject A="abc | Axxcxc" 'TEST string we'll split using the pipe oTASL.SplitString(A,"|") 'Pass strings to Dll object
GlobalInfoFor "GBSplitResults",MyString 'Retrieve Array Global Veriable, it fails here. But if I retrieve only a single string not array it works fine.
msgbox mystring End sub --------------------------------------------
Unless you know a proper way of passing a array string back to SalesLogix via Dll Object even better. I would rather NOT use GlobalVeriable.... I would rather use parameters.
Thank you H |
|
|
| |
|
Re: How do I pass (split Array) strings from VB6 DLL object into GlobalVeriable
Posted: 16 Jul 10 3:46 PM
|
Well, Thank you for the reply Raul. can You tell me one thing. Is there any reason why anyone would use Legacy Views / Basic etc. We are currently on version 6.2 if we wanted to move over to ActiveScript forms what kind of things do we need to watch out from-? I took over this firm that was all developed under basic all the views / forms everything. So now I am starting to wonder what is the reason behind it-?
Thank you H |
|
|
|
Re: How do I pass (split Array) strings from VB6 DLL object into GlobalVeriable
Posted: 19 Jul 10 9:56 AM
|
Legacy, as its name implies, is the old Forms and Scripting that SalesLogix used.
Why use Legacy? Only if you are supporting an Older Implementation with lots of Legacy code and you are making minor changes that would make no sense moving over to Active Forms. Otherwise, I would at least make sure any new functionality is built on Active Forms, and port any older components if they require extensive changes.
|
|
|
|
You can
subscribe to receive a daily forum digest in your
user profile. View the site code
of conduct for posting guidelines.
Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
|
|
|
|
|
|
|
|