Hi i have a vb.net generated Dll with Com interop enabled. in my Vc++ 6.0 project i have included the .tlb and tried to create object for the class but it is failing for me.
CoInitialize(NULL); //initialize COM library
HRESULT hresult;
CLSID clsid;
hresult=CLSIDFromProgID(__uuidof(SHandler), &clsid); //retrieve CLSID of component
SHa...
What is the best way to analyze crashes on Linux?
We expect to build the software and deliver a release version to testers. The testers may not be able remember how to reproduce the crash or the crash may be totally intermittent. They also will not have a development environment on their machines. The software is written in C/C++ and c...
Hi, I have a problem with inserting data into SQLite database using QSqlTableModel. The table is created like this:
QSqlQuery createTblSMS("CREATE TABLE sms_tbl("
"isRead BOOLEAN NOT NULL,"
"readTime DATETIME,"
"arrivalTime DATETIME NOT NULL,"
"sender TEXT NOT NULL,"
"receiver TEXT NOT NULL,"
...
A namespace-scope declaration or definition of a non-inline function template, a
non-inline member function template, a non-inline member function of a class
template or a static data member of a class template may be preceded by the export
keyword. If such a template is defined in the same translation unit in which it is
de...
This is the code to create a thread_group and execute all threads in parallel:
boost::thread_group group;
for (int i = 0; i < 15; ++i)
group.create_thread(aFunctionToExecute);
group.join_all();
This code will execute all threads at once. What I want to do is to execute them all but 4 maximum in parallel. When on is terminated, ano...
I'm trying to get a simple example working using gSoap, for VS2008.
I've done the following:
wsdl2h -o Init.h http://myservices/InitalisationService.asmx?WSDL
And then this:
soapcpp2 -I "C:\3pSDK\gsoap-2.7\gsoap\import" -i -C -limport Init.h
which produces many files. My project folder looks like this:
// generated files
Init.h
...
In a C++ program, I have two reference counted objects: King and Heir. Heir needs to block until King is destroyed. King is a reference counted object which will be destroyed when it's reference count goes to zero. If Heir holds a reference to King, then King's reference count will never go to zero. How can have Heir block until King...
It's possible to interleave a C++ source file with an HTML document:
//<![IGNORE[
/*]]>
<html>
<head>
<title>Example</title>
</head>
<body>
<p>Example</p>
</body>
</html>
<![IGNORE[*/
#include <iostream>
int main(int argc, char** argv) {
std::cout << "Hello, world!\n";
}
/*]]>
<![IGNORE[*/
//]]>
This leaves a stray // at th...
Hello, as I briefly surfed over the web it appears there are no tutorials for C++ programing on Win mobile platform, except three or four sample applications on Ms pages. Does anyone know if there is something else anywhere? It seems there are just C# articles...
...
I have recently begun writing unit tests (using GoogleTest) for a C++ project. Building the main project is fairly simple: I use GCC's -MM and -MD flags to automatically generate dependencies for my object files, then I link all of the object files together for the output executable. No surpirses.
But as I'm writing unit tests, is the...
An application's virtual bytes grow 2-times the private bytes.
does this indicate memory leak? bad application design?
OS is 32Bit
any thoughts are welcome.
application is stream database.
...
Hi,
I'm working on a c++ app and I'm facing a problem:
I have a class B derived from the abstract class A that has some event handling methods. A third class C is derived from B and must reimplement some of B methods. Is there a way to implicitly call B's method before calling C's one?
Class diagram:
class A
{
virtual void OnKeyPr...
I have a program that uses GLUT for its OpenGL rendering. Now I need it to be inside of a MFC project so that it can work with another program component.
I've followed this tutorial: 1/Setting-Up-OpenGL-in-an-MFC-Control.htm">http://www.codeguru.com/cpp/g-m/opengl/openfaq/article.php/c10975_1/Setting-Up-OpenGL-in-an-MFC-Control.htm
I ...
I am trying to execute a file with parameters using the "system()" function in C++ on Windows, and it works as long as there are no whitespaces in the filename. For parameters, putting double quotes around the string works, but when I try the same with the executable itself, I get the following error:
"the filename,directory name, or vo...
I only need to know which angle (x,y,z vector) my cursor is pointing at. So i can shoot any particle in the direction i am pointing at.
I cant use depth testing, so the typical picking methods are not an option.
Is this possible with pure math only? if i know the view port aspect ratio and perspective etc?
Edit: I need to get the coor...
I get a character string and the encoding charset, like iso_8859-1, utf-8 etc. I need to scan the string tokenizing it to words, as I'd do using isspace() and ispunc().
Are there character test functions that take charset into account? Also, are there iterators that advance the correct number of bytes?
Note:
I know I can convert the st...
Hello,
What is the fastest way to read the Left-Most bit from unsigned int ?
Thanks,
SW
...
I searched StackOverflow but couldn't find the answer to this question.
Suppose I have a std::vector<Day *> vector_day - that is - a vector of pointers to Day object. Now I push_back to vector_day many elements:
vector_day.push_back(new Day(12));
vector_day.push_back(new Day(99));
vector_day.push_back(new Day(71));
...
Now at some po...
I learned today about the term invalidation in context of C++ containers. Can anyone explain what it means?
It seems like you're not allowed to modify elements of a container in some way when looping over the container. But what way exactly?
Please help me understand this topic.
Thanks, Boda Cydo.
...
Hello,
I have a C++ file like this
#ifndef _MOVE_H
#define _MOVE_H
class Move {
int x, y;
public:
Move(int initX = 0, int initY = 0) : x(initX), y(initY) {}
int getX() { return x; }
void setX(int newX) { x = newX; }
int getY() { return y; }
void setY(int newY) { y = newY; }
};
#endif
And to my amazement, all ...