Home Help Center

Very weird "Access Violation"

ablmfablmf Member Peter CaiOrganization: Vimicro.comProject: Iris
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

  • dwaynedwayne St. John's, NewfoundlandMember Dwayne BooneOrganization: ZeroC, Inc.Project: Internet Communications Engine
    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
  • ablmfablmf Member Peter CaiOrganization: Vimicro.comProject: Iris
    I found the problem.

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

    iced.lib iceutil.lib
  • dwaynedwayne St. John's, NewfoundlandMember Dwayne BooneOrganization: ZeroC, Inc.Project: Internet Communications Engine
    You should use iceutild.lib as well for a debug project.
Sign In or Register to comment.