Eat. Sleep. Code: The Computer Programming Thread, Ver. 010

If you’re trying to make windows phone development and you’re having trouble with a phone, why not just call microsoft? They might be willing to cut you a deal since you are trying to develop for their platform. There is a guy at Microsoft that came over to our school and did a presentation on windows phone apps; from the sounds of it they are more than willing to help you out.

Not sure if anybody here has any tips for me, but I’m in a really terrible situation.

Right now we use gSoap to handle our webservice calls (Visual Studio 2005 C++ MFC Application) and get the results. Turns out they don’t want to pay for a license, or they can’t pay for a license, or whatever. The deal is I need to replace it. So I’m using the build in microsoft soap stuff since it works just as well anyway. I’m doing it the automated way, which is to AddWebReference, have it detect the wsdl, and then auto generate a class for me based on the wsdl. Works fine, no sweat.

However, the include files it uses (atlsoap.h) used MSXML version 2 in the include code. The app we use already is using MSXML Version 3 in it. The result is the stepping on toes, where we get ambiguous types because it doesn’t know which version to use. For our code, no sweat I can just declare which version I’m using. I can’t really feasibly re-write all the microsoft includes because there are multiple developers and it’s just not a good way to go about it. I cannot change the atlsoap.h code in order to make it use the newer MSXML nor can I figure out a way to make sure it’s smart enough to actually just use the MSXML version 2 include it’s specifying.

So, the only way I can figure around it, is to drop the MSXML version 3 include in our app and rewrite all the stuff to version 2. The way it’s done is pretty annoying, as it’s not backwards compatible at all, I have to re-write all the classes to use CComPtr and all the functions we use don’t exist anymore (getNodeName() doesn’t exist, it’s now get_NodeName(bstr *name) where I have to pass in the variable as a parameter. Functions which had optional parameters now have to have them explicitly defined and passed in. It’s really annoying.

Does anybody know any ways to make it to where I can have msxml3 defined alongside msxml2 and have them behave? : (

you might be able to link the libraries separately on a per project basis if you keep them in separate projects within the same solution. If you don’t need the answer immediately I’ll share this with some people tonight and see if anyone has ideas.

edit: Hmm though that may give you double defines when linking the output from each project.

Yeah I thought about maybe splitting it out into its own DLL and keep it separated, but I’m not sure if that would end up working and it’d be a lot of wasted effort if it didn’t

So I got myself the Nokia Lumia 710 Windows phone today. When I put my game on it, it put a huge smile to my face. Looks so slick!

I think I worked out my problems. I basically moved anything dealing with the webservices to its own project that compiles into a DLL. That kept all the msxml2 stuff from stepping on the toes of my msxml3 code. I only needed to fix a few of the errors relating to ambigious calls (simple enough to append a :: to specify which namespace they were in) and then the errors in the atlsoap stuff gets to go away since it exists separately.

Since we were already including the gsoap stuff as a separate DLL, I can just gut the DLL of gSoap and replace it with my own stuff with the embedded microsoft way, and save myself a week of painfully recoding stuff to an older standard. Whew.

See kids, work smarter, not harder. And thanks Tolore for helping me go in that direction, I was worried that it was going to set me back if it didn’t work so I came here for other solutions, but I ended up just biting the bullet and trying it out anyway, and it did the trick. Sometimes some reassurance and another person having the same idea is all you need to get some confidence : )

glad I could help, I asked around last night and got about the same answer, no one was POSITIVE it would work but we were pretty sure it would.

Does anyone have a c++ book suggestion? I don’t need basic stuff because I’ve had 2 classes in java. I just need a book I can learn from.

Let me rephrase that, basic as in programming fundamental stuff. If its basic to c++ that would be good actually.

-trolls suck-

Webpages:
cppreference
cplusplus

I wouldn’t know, myself. At my university we only used our C++ book as a reference if we needed it, as the professors taught us straight from their own lectures.

Since you’re already experienced with Java, I would think that any high rated C++ book on Amazon would suffice for your needs. You could also use websites instead, if you wanted. Java to C++ isn’t a huge jump in syntax, but you will have to be a lot more careful when coding. It’s like playing with fire.

Out of curiosity, what are you wanting to use C++ for?

The biggest thing you have to learn coming from another language to C++ is pointers, which are pretty rough. Syntax, looping, recursion, functions, encapsulation, etc… are all in other languages as well but pointers are not(for the most part). I don’t remember the book I used when I was learning but I personally never found it that helpful compared to online tutorials/classes.

And then you get to function pointers and pointers to pointers and pointers to function pointers and functions that return pointers and function pointers that point to functions that return pointers so you go and have fun with them now.

LOL, yeah. I’m reading up on C++ books myself to refresh my knowledge, and pointers are spinning me around like Kabal right now. Everytime I think I got them down, or have an analogy that works, I find that… nope. Have to start from the beginning.

The moment you said that, I randomly thought of an analogy for pointers.

Imagine that you’re a real life Pokemon trainer. Which would you rather carry around on your back: A light backpack containing six Pokeballs with Charizards inside, or six Charizards strapped together by harnesses? Obviously, you’d rather use the Pokeballs because they are lighter and take up less space. Pointers in programming languages give a similar advantage - rather than having to carry, say, a large variable into functions or methods, you can pass in a memory address instead.

Pointers are useful for more than that, but that is an easy way to think of them starting out. They are great for decreasing overhead. Java and C# were implemented to use them by default, with the details of memory management hidden from the programmer.

Just to be able too. As I understand it, C++ and Java are fairly common in programming.

Do I have to worry about deconstructing in C++ for any small programs I create? I know java does that automatically.

Comparing pointers to pokemon. This is officially a nerd thread.

May wedgies befall all of you.

deconstructing like writing a deconstructor for your classes? absolutely, if you want to create data and have it usable outside a class you’re going to have to do it with pointers and you’re going to have to use new/malloc, and anything you new/malloc you have to delete/free.

It was already a nerd thread… xD

We are on a forum where people look at individual attack animation frames in video games and analyze their properties. Wedgies are a way of life for us.

The cool thing is if you do it correctly in C++, no matter how nested your classes get, the destructors will work it out for you automatically when you delete them, or especially if you use a STL (or common library) class,
C on the other hand…