Click here to Skip to main content
15,919,567 members
Home / Discussions / C#
   

C#

 
GeneralDial Modem & Use Default Internet Connection Pin
Simon Wren2-Mar-04 4:09
professionalSimon Wren2-Mar-04 4:09 
GeneralRe: Dial Modem & Use Default Internet Connection Pin
Mazdak2-Mar-04 4:25
Mazdak2-Mar-04 4:25 
GeneralVB.NET to C# Language converter Pin
RB@Emphasys2-Mar-04 3:28
RB@Emphasys2-Mar-04 3:28 
GeneralRe: VB.NET to C# Language converter Pin
joan_fl2-Mar-04 4:10
joan_fl2-Mar-04 4:10 
GeneralRe: VB.NET to C# Language converter Pin
joan_fl2-Mar-04 4:17
joan_fl2-Mar-04 4:17 
GeneralRe: VB.NET to C# Language converter Pin
Heath Stewart2-Mar-04 4:38
protectorHeath Stewart2-Mar-04 4:38 
GeneralRe: VB.NET to C# Language converter Pin
RB@Emphasys2-Mar-04 4:41
RB@Emphasys2-Mar-04 4:41 
GeneralRe: VB.NET to C# Language converter Pin
Heath Stewart2-Mar-04 6:31
protectorHeath Stewart2-Mar-04 6:31 
GeneralRe: VB.NET to C# Language converter Pin
tgoggin2-Mar-04 5:42
tgoggin2-Mar-04 5:42 
GeneralRe: VB.NET to C# Language converter Pin
joan_fl2-Mar-04 4:43
joan_fl2-Mar-04 4:43 
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 

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.