Click here to Skip to main content
15,889,612 members
Home / Discussions / C#
   

C#

 
GeneralRe: VB.NET to C# Language converter Pin
RB@Emphasys2-Mar-04 5:03
RB@Emphasys2-Mar-04 5:03 
GeneralRe: VB.NET to C# Language converter Pin
Daniel Turini2-Mar-04 7:13
Daniel Turini2-Mar-04 7:13 
Generalwww.DNNCS.com for sale Pin
Anonymous2-Mar-04 0:02
Anonymous2-Mar-04 0:02 
GeneralExchange tracking with C# Pin
Anonymous1-Mar-04 22:40
Anonymous1-Mar-04 22:40 
GeneralRe: Exchange tracking with C# Pin
Heath Stewart2-Mar-04 2:55
protectorHeath Stewart2-Mar-04 2:55 
Generalhelp with threads Pin
Krisst K1-Mar-04 21:58
Krisst K1-Mar-04 21:58 
GeneralRe: help with threads Pin
Stefan Troschuetz2-Mar-04 0:23
Stefan Troschuetz2-Mar-04 0:23 
GeneralCOM Interop Pin
Ungi.1-Mar-04 21:28
Ungi.1-Mar-04 21:28 
I have the following problem:

I use an ocx that provides a method with following parameters (from documentation):
<br />
GetMasSysDataS (<br />
      long parArray(4), <br />
      String startTime,<br />
      String osInfo, <br />
      String sysName,<br />
      String prtNode(2))<br />


The COM interface is created as following:
<br />
short GetMasSysDataS(<br />
      long* parArray, <br />
      BSTR* startTime, <br />
      BSTR* osInfo, <br />
      BSTR* sysName, <br />
      BSTR* prtNode);<br />


I try to use this method in my C# application:
<br />
int[] parArray = new int[4] { -1, -1, -1, -1 };<br />
string startTime = "";<br />
string osInfo = "";<br />
string sysName = "";<br />
string[] prtNode = new string[2] { "", "" };<br />
<br />
// instance the wrapperclass<br />
m_MasDsp = new cominterop.MasDsp ();<br />
/* ... do some configurations ... */<br />
// get the data<br />
m_MasDsp.GetMasSysDataS(ref parArray[0], ref startTime, ref osInfo, ref sysName, ref prtNode[0]);<br />


Almost all data is passed correctly except of the parameters in the array with an index greater than 0.
The first element of the array is correct all other elements stay on initial value.

Has anybody a tip what the problem could be?

[edit]I forgot to post that I had no problems to call that method from a VB6 Application for testing purposes.[/edit]
GeneralRe: COM Interop Pin
killerslaytanic1-Mar-04 21:49
killerslaytanic1-Mar-04 21:49 
GeneralRe: COM Interop Pin
Ungi.1-Mar-04 21:53
Ungi.1-Mar-04 21:53 
GeneralRe: COM Interop Pin
killerslaytanic1-Mar-04 22:09
killerslaytanic1-Mar-04 22:09 
GeneralRe: COM Interop Pin
Ungi.1-Mar-04 22:17
Ungi.1-Mar-04 22:17 
GeneralRe: COM Interop - boxing fault? Pin
Ungi.1-Mar-04 23:29
Ungi.1-Mar-04 23:29 
GeneralRe: COM Interop - boxing fault? Pin
killerslaytanic2-Mar-04 18:58
killerslaytanic2-Mar-04 18:58 
GeneralRe: COM Interop - boxing fault? Pin
Ungi.2-Mar-04 19:07
Ungi.2-Mar-04 19:07 
GeneralProblem solved Pin
Ungi.4-Mar-04 20:15
Ungi.4-Mar-04 20:15 
GeneralDatagrid Rows Pin
Reinier van de Wetering1-Mar-04 19:13
Reinier van de Wetering1-Mar-04 19:13 
GeneralMethod &lt;Summary&gt; descriptions Pin
Reebop1-Mar-04 11:52
sussReebop1-Mar-04 11:52 
GeneralRe: Method &lt;Summary&gt; descriptions Pin
Meysam Mahfouzi1-Mar-04 17:45
Meysam Mahfouzi1-Mar-04 17:45 
GeneralRe: Method &lt;Summary&gt; descriptions Pin
Heath Stewart1-Mar-04 18:15
protectorHeath Stewart1-Mar-04 18:15 
GeneralRe: Method <Summary> descriptions Pin
Meysam Mahfouzi1-Mar-04 18:17
Meysam Mahfouzi1-Mar-04 18:17 
GeneralRe: Method &lt;Summary&gt; descriptions Pin
Reebop1-Mar-04 22:32
sussReebop1-Mar-04 22:32 
Generalfog in opengl Pin
shedid1-Mar-04 9:29
shedid1-Mar-04 9:29 
GeneralRe: fog in opengl Pin
Nick Parker1-Mar-04 9:36
protectorNick Parker1-Mar-04 9:36 
GeneralRe: fog in opengl Pin
shedid4-Mar-04 6:55
shedid4-Mar-04 6:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.