Try declaring a variable that (in some .cpp file) you'll define & initialise to the IID of the interface, like this:
class ITest ;
externconst IID ITest_IID;
That correctly forward declares ITestPtr so you can a) use a reference to it without needing the definition of ITest or ITest_IID, but b) can use the thing referred to once ITest and ITest_IIDhave been defined.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
I created a ATL project with a modeless dialog. The ATL dll is called by a Delphi program. When the Delphi program invokes modeless dialog, it also creates a model dialog itself, so my modeless dialog in alt dell is insulated by the delphi model dialog in message sending.
I have ATL web service Written in C++ long back.
We have already C++ web client using soap toolkit.
Now we need C++ web client Without Soap .
What are the solutions ?
Is it possible without .Net interface. That is it should work with old Vc++
6.0 IDE also.
I have two vectors holding different classes. The first class contains only data of integer/double type. I can create a vector of the first class, access it, manipulate it, no problems.
The second class contains a combination of data and several pointers to allocated storage space. The space is allocated on the fly as needed. The destructor of the class frees the space. The problem arises when adding new instances of the class to the vector. If there isn't enough space in the vector, the vector class clones itself, adds space, and the erases the old vector. Unfortunately in erasing "old" vector, it frees the storage space and the program crashes because the storage pointers are invalid.
Creating a vector of pointers to the class solves the problem but would involve a massive re-write of code.
Anyone have any suggestions how to handle this? Is there a graceful way to handle pointers inside the class when you don't know when the class will be destroyed by the container?
Wow, that explains a lot of the weird performance issues. Constructing large vectors (200-500) entries is what's taking up so much time. I am going with the vector of pointers because de-referencing them is fast compared to copying what can turn into very large classes. I am also reserving enough space so they won't constantly be copying themselves.
Thanks very much for the code example, it was very illuminating.
Constructing large vectors (200-500) entries is what's taking up so much time
Large? That's not large
I've tended to use vectors of Boost.SharedPointers[^] in the past, so I don't need to worry about deallocation (and also, it's easier to create indices into that vector, as you can just copy and re-sort the vector of smart pointers). That's been good for vectors with upwards of 10000 elements.
I need to show one small "Please Wait.." image screen whenewer some back end processing is in progress.
For e.g. whenever user changing his ip adress and port, before going checking and establishing the connection, I want to show a "Please wait ..." image.But while going for connection browser gets hangs because of connection and after connection checking is completed. It goes for next page.
I am using IWebBrowser2 interface through which, I am getting pointer of browser.Then I am using IHTMLELement through which I am getting pointer of current html content.After that I am using IHTMLImageElement to add one img tag inside current html page for please wait screen.
Please give me some suggestions.
Waiting for the positive reply