Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Friday, August 29, 2025 
 
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!
 Architect Forums - SalesLogix Scripting & Customization
Forum to discuss writing script in Architect plugins for SalesLogix & general SalesLogix customization topics (for Windows client only). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Scripting & Customization | New ThreadView:  Search:  
 Author  Thread: Reference External DLL / API Functions
Guy Barrett
Posts: 63
 
Reference External DLL / API FunctionsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 23 Jun 09 10:56 AM
Hi All,

I am wanting to intergrate Saleslogix with the QAS Rapid Pro API (Quick Address). This would usaully be simple, if the API was in a COM enabled DLL.

It's not, the DLL was compiled in the late 90's by the looks of it, the damned thing is expecting you to be able to reference the DLL with VB style...

Declare Sub QAInitialise Lib "QARUIEB.DLL" (ByVal vi1 As Long)
Declare Sub QAErrorMessage Lib "QARUIEB.DLL" (ByVal vi1 As Long, ByVal rs2 As String, ByVal vi3 As Long)
Declare Function QAErrorLevel Lib "QARUIEB.DLL" (ByVal vi1 As Long) As Long
...etc...

... to expose the functions available in the DLL. Is there an equivalent of this that I can use in VBScript in Saleslogix 7.2 (SP2)? Please let me know, I'm dreading having to write a separate COM wrapper for it to open up the functions so please bring good news!

Thanks in advance!
[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: Reference External DLL / API FunctionsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 23 Jun 09 11:12 AM
For better or for worst, Legacy VB Scripts are still somewhat functional....
And I used to do a lot of Declares back in the days using them with very good results.

That being said, it may be much simpler to create a COM wrapper for it unless you are only needing to make 1 or 2 calls ....
[Reply][Quote]
Guy Barrett
Posts: 63
 
Re: Reference External DLL / API FunctionsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 23 Jun 09 11:55 AM
Thanks for the info. Do you have any examples of how to reference DLL's using the Legacy Script (I think it was Cypress Script based wasn't it?).

I thought the Legacy stuff still relied on CreateObject("xyz.xyz") just like the VB Script, as such a COM interface would be required.

Let me know if you can. I really want to avoid the COM wrapper route as it is another dll / executable that needs to be place on every client machine for the integration to work.
[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: Reference External DLL / API FunctionsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 23 Jun 09 12:05 PM
Sorry, I don't have any examples handy as it has been quite a while since I did that, but my recollection is that it would work pretty much the same way as doing Declares within VB6.

I was able to copy most Declares API Viewer and they would work, sometimes there would be issue with special types (such as APIs returning pointers to C Structures, but even those I got to work with a moderate amount of effort).


Again, my approach if present with the same challenge would be to go with the COM wrapper. I am not sure how much longer the Legacy scripts will remain functional within SalesLogix, but for a quick one or two call integration, by all means give it a try.



[Reply][Quote]
Guy Barrett
Posts: 63
 
Re: Reference External DLL / API FunctionsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 23 Jun 09 12:08 PM
Hmm.

Wrapper it is then

Thanks for your help Raul. Saleslogix is officially off my Christmas card list.
[Reply][Quote]
Leon Gort
Posts: 127
 
Re: Reference External DLL / API FunctionsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 24 Jun 09 12:30 AM
Don't know if this is what you are after but we use cardscan which has a legacy script calling their DLL's. Below is some of the code:

' --------Initialization functions--------------------------
' Initialize the library and register the client application
Declare Function CRTKInit Lib "cssdk32.dll" Alias "CRTK_Init" ( _
ByRef lphRTK As Long _
) As Long
' lphRTK - address to receive RTK handle

' Unregister the client application and close the library
Declare Function CRTKTerm Lib "cssdk32.dll" Alias "CRTK_Term" ( _
ByVal hRTK As Long _
) As Long
' hRTK - valid RTK handle

' --------Scanner functions---------------------------------

' Check for a card in the scanner
Declare Function CRTKScanCheckForCard Lib "cssdk32.dll" Alias "CRTK_ScanCheckForCard" ( _
ByVal hRTK As Long _
) As Long
' hRTK - valid RTK handle

' Calibrate and configure the business card scanner
Declare Function CRTKScanConfigure Lib "cssdk32.dll" Alias "CRTK_ScanConfigure" ( _
ByVal hRTK As Long, _
ByVal hWndOwner As Long _
) As Long
' hRTK - valid RTK handle
' hWindOwner - Owner window for Scanner Setup dialog

' Scan a business card
Declare Function CRTKScanAcquire Lib "cssdk32.dll" Alias "CRTK_ScanAcquire" ( _
ByVal hRTK As Long, _
ByVal dwTimeout As Long _
) As Long
' hRTK - valid RTK handle
' dwTimeout - time in 1/10th of sec to wait for user to insert card
[Reply][Quote]
john
Posts: 34
 
Re: Reference External DLL / API FunctionsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 24 Jun 09 3:04 AM
Dont go down the COM wrapper route - use a .net extension instead - then let SLX do the deployment for you!
[Reply][Quote]
Guy Barrett
Posts: 63
 
Re: Reference External DLL / API FunctionsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 24 Jun 09 3:45 AM
Thanks Leon, that's pretty much standard for referencing DLL's, it's just a shame you can't use the same method in the VB script.

John, .net extensions are a little beyond me. I know where to start when writing a wrapper, but .net extensions? You may as well be talking Chinese
[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: Reference External DLL / API FunctionsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 24 Jun 09 9:46 AM
Another advantage of the COM wrapper is that you could reuse it on other applications if needed, whereas the .Net Extension would be somewhat SLX Exclusive.

You may even choose to do the COM Wrapper and then an SLX .Net Extension to further wrap it around for SalesLogix, but I do think that may be overkill, however, the advantage of the extension as pointed out was that SLX would handle the deployment of the DLL.

On the VB6 days, I would do typically build the COM wrapper into an OCX, then attach the control onto a Form which would then cause SLX to handle the deployment as well.
[Reply][Quote]
john
Posts: 34
 
Re: Reference External DLL / API FunctionsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 25 Jun 09 2:43 AM
I disagree - a .net solution can have multiple interfaces, so could be exposed to SLX, COM and .net, if required. I often build my .net extensions as standalone .net libraries first, then integrate them into SLX by adding an SLX compatible interface.
[Reply][Quote]
 Page 1 of 1 
  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!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2025 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 8/29/2025 3:39:38 AM