Archived

This forum has been archived. Please start a new discussion on GitHub.

Very weird "Access Violation"

I am trying the inputsream and outputstream APIs.

Here is my code
	XMLMMSCConfInfo x;
	x.Element = 10;
	x.Depth = 1;
	x.MMSCLISTENPORT = 8801;
	x.CLIENTLISTENPORT = 8902;
	x.MMSCFROMADDR = "+8613821113111/TYPE=PLMN";
	x.MMSCIPADDR = "172.16.65.187";
	x.MMSCROOT = "/";
	x.MMSCPORT = 9000;
	x.MMSCLOGINNAME = "nan";
	x.MMSCLOGINPWD = "whuang";
	x.MMSCVASPID = "999999";
	x.MMSCVASID = "9999";
	x.MMSSUBMITREPEATTIME = 3;

	Ice::CommunicatorPtr ic = Ice::initialize();
	Ice::OutputStreamPtr sout = Ice::createOutputStream(ic);

	x.ice_write(sout);

	vector<Ice::Byte> data;

	sout->finished(data);	

It crashed at the last line! what was wrong?

Comments

  • dwayne
    dwayne St. John's, Newfoundland
    You need to give us some more information. What version of Ice are you using? What OS/compiler are you using? If you are using Windows the most likely cause is this.

    Dwayne
  • I found the problem.

    As it's a debug project, I have to use:

    iced.lib iceutil.lib
  • dwayne
    dwayne St. John's, Newfoundland
    You should use iceutild.lib as well for a debug project.