ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Telemetry / Low Latency Messaging / Everyplace » MQe connection array problem

Post new topic  Reply to topic
 MQe connection array problem « View previous topic :: View next topic » 
Author Message
emilhampus
PostPosted: Wed Oct 01, 2003 4:42 am    Post subject: MQe connection array problem Reply with quote

Newbie

Joined: 19 Sep 2003
Posts: 2

Hi!

I'm trying to use the native C API mqeAdministrator_Connection_create to create a connection and then create a async remote queue

To do so a struct (MQeConnectionDefinitionParms) has to be set and sent as a parameter
In the struct there is a pointer to an array (hAdapterClass) which should contain the ipaddress and the port

My problem is that I try to do this from C# and I get an native exception (probably because of the array...?)
Exception code 0xc0000005

And so, what is the proper way of creating a hAdapterClass array in C#?
This is my attempt:
int[] address = new int[2] { hIPAddress, hPort };
IntPtr addressPtr = Memory.AllocHLocal(Marshal.SizeOf(address));
Marshal.Copy(address, 0, addressPtr, Marshal.SizeOf(address));
The I set hAdapterClass = addressPtr

These are the global variables values I use to set the struct
public const string MQE_CHANNEL_CLASS = "com.ibm.mqe.MQeChannel";
public const string MQE_HTTP_ADAPTER = "com.ibm.mqe.adapters.MQeTcpipHttpAdapter";
public const string MQE_HTTP_COMMAND = "?Channel";

Is it a way to send the ipaddress, port info without the array?
Along with the MQE_HTTP_ADAPTER perhaps? (something like "Network:111.222.33.444:8080")

I would very much appreciate any help

Thanks in advance
_________________
EH
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Telemetry / Low Latency Messaging / Everyplace » MQe connection array problem
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.