Solved

function parameter return with ActiveX exe

Posted on 1998-12-04
1
118 Views
Last Modified: 2012-05-04
How can a method used in a VB client connecting to an VB 5.0 Automation server get back a changed parameter?
I defined e.g. in the  Server where Version is passed ByRef:
Public Function GetVersion( Version As String) As Long
  .. changes Version  ...
call in the Client:
MyAppl.GetVersion ( Version )

but Version is not changed !
0
Comment
Question by:philipdesmet
1 Comment
 

Accepted Solution

by:
GeddyWaring earned 200 total points
ID: 1448252
Hi Philip

The problem is in your calling convention.

The MyAppl.GetVersion(Version) is passing the parameter By value even though your function declares it By Reference.
Change the call to either "MyAppl.GetVersion Version" or "Call MyAppl.GetVersion(Version)"

Ged

0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Use closed file on desktop in vba 6 57
DIR issue 7 47
JSON Response and request in VB6 application 11 141
VBA filters 2 39
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now