473,473 Members | 2,102 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

why invokemember doesn't set a ref parameter

3 New Member
i have the follow code:

Expand|Select|Wrap|Line Numbers
  1. Type objAddType = Type.GetTypeFromProgID("ClaseCOM");
  2.  
  3. object objAdd = Activator.CreateInstance(objAddType);
  4.  
  5. object mConnectionString = "CadenaConexion";
  6.  
  7. object[] myArguments = { Param1, Param2, mConnectionString, ParamReferencia, Param3, Param4, Param5 };
  8.  
  9. String[] nombreParam = { "Param1", "Param2", "ConnectionString", "ParamReferencia", "Param3", "Param4", "Param5 " };
  10.  
  11. ParameterModifier[] pmArray = new ParameterModifier[7]{ new ParameterModifier(1), new ParameterModifier(1), new ParameterModifier(1), new ParameterModifier(1), new ParameterModifier(1), new ParameterModifier(1), new ParameterModifier(1) };
  12.  
  13. pmArray[3][0] = true;
  14.  
  15. object retorna = objAddType.InvokeMember("NombreMetodoCOM", BindingFlags.InvokeMethod, Type.DefaultBinder,objAdd,myArguments,pmArray, System.Globalization.CultureInfo.CurrentCulture, nombreParam);


the problem is the variable ParamReferencia doesn't refresh it content
Mar 12 '12 #1
0 1372

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Robert May | last post by:
We have a VB6 COM component that I don't have control over. All of the values are returned from method calls using byref parameters. They frequently break binary compatibility, in fact, there are...
0
by: peter | last post by:
Hi all, In VB.net,using Type.InvokeMember to call a method of a class in COM dll,the method has a reference parameter,It seems that there is no way to return the changed value of that...
0
by: David | last post by:
Hi, I have a program in which I used invokemember to late bind to a component. In my code I use: SetupInfo setup; Object objTem = callLateBinding ("BackOfficeServer.BackOffice",...
1
by: Robert May | last post by:
We have a VB6 COM component that I don't have control over. All of the values are returned from method calls using byref parameters. They frequently break binary compatibility, in fact, there are...
1
by: George Lewis | last post by:
Hi, I am trying to invoke a method from a COM dll using InvokeMember which has the following signature: int GetStatus(ref byte scannedBytes, System.Int32 length); However when I try and...
3
by: Pat Ireland | last post by:
The following code shows what I am trying to do. The normal invocation of the CalcByRef produces the correct results, however, using the InvokeMember fails to correctly pass the single argument by...
4
by: Howard Kaikow | last post by:
I am trying to retrive some WMI properties using Option Strict On. This requires the use of InvokeMember. I know that there are alternative ways to get the values, but I want to learn how to...
3
by: Jim Andersen | last post by:
Just to let you know, and to help any future sorry sods who gets trapped in the same black hole...... You can't just copy/move a working sql-statement into a stored procedure. Working with a...
6
by: Gunnar Frenzel | last post by:
Hello, I have an application and dll both written in C#. The application uses methods and properties in the dll which works fine so far, but I wasn't able use out parameters in methods call. I use...
5
by: dig_dug_d | last post by:
Hello, I have been struggling with the SetValue method when trying to use indexed items. I can't figure out what needs to be done to create the "index As Object()" parameter. Juding from the...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.