In my application I have two threads
a "main thread" which is busy most of the time
an "additional thread" which sends out some HTTP request and which blocks until it gets a response.
However, the HTTP response can only be handled by the main thread, since it relies on it's thread-local-storage and on non-threadsafe functions.
I'm l...
Can I link a member function like this in some way?
redeclaring the method as a member and get it call the Mmsystem.h method to not have to wrap it?
#include <windows.h>
#include <Mmsystem.h>
namespace SoundLib {
public class CWave
{
public:
// WaveIn call
external UINT waveOutGetNumDevs(VOID);
};
}
...
So we have some filter for DS. It works - uses standard win dll's.
We want to convert that filter to some sort of non-using DS program. So we want it to call dlls in write order, do all what DS is doing but not be in any way dependable on DS - only on filter dll's.
So... How to convert DirectShow Filter to C++\C#?
...
Is there any way to use the signals without MOC and without the connecting via names? My one problem with Qt is that you have something like
this->connect(this->SaveBtn, SIGNAL(click()), SLOT(SaveClicked()));
And there is no error detection to tell that is wrong other then finding out the button doesn't work or searching through their ...
Hi,
Our company has a set of 3d modeling softwares written in c++ with qt based gui. We are planning to offer these applications to customers to try them from a web browser. I mean to say, we need to create web interfaces for native c++ codes. Please suggest me which technology, languages should be used. If possible please give some...
How can I programatically detect any changes that occur to Microsoft's Active Directory?
...
Turns out many innocently looking things are undefined behavior in C++. For example, once a non-null pointer has been delete'd even printing out that pointer value is undefined behavior.
Now memory leaks are definitely bad. But what class situation are they - defined, undefined or what other class of behavior?
...
I am looking for a C++ library, and I am dealing with convex objective and constraint functions.
...
When I go to use OGRE with SDL (as described in this article), I seem to be having trouble with a second window that appears behind my main render window. Basically, the code I'm using is this:
SDL_init(SDL_INIT_VIDEO);
SDL_Surface *screen = SDL_SetVideoMode(640, 480, 0, SDL_OPENGL);
Ogre::Root *root = new Ogre::Root();
root->restoreC...
I have the following python 3 file:
import base64
import xxx
str = xxx.GetString()
str2 = base64.b64encode(str.encode())
str3 = str2.decode()
print str3
xxx is a module exported by some C++ code. This script does not work because calling Py_InitModule on this script returns NULL. The weird thing is if I create a stub xxx.py in the sa...
We have 3 different libraries, each developed by a different developer, and each was (presumably) well designed. But since some of the libraries are using RAII and some don't, and some of the libraries are loaded dynamically, and the others aren't - it doesn't work.
Each of the developers is saying that what he is doing is right, and ma...
I want to calculate the balance factor of a node in avl tree without using any recursive procedure. How can i do that? Please tell me method or provide C++ code snippet.
...
hi
As IPV6 address has 16 bytes and their is no data type to store it in c++,
i wanted to store the IPV6 address, and do some comparisions between to IPv6 address,
please let me know how to do it
...
Hi,
I want to dynamically allocate a C struct:
typedef struct {
short *offset;
char *values;
} swc;
Both 'offset' and 'values' are supposed to be arrays, but their size is unknown until runtime.
How can I dynamically allocate memory for my struct and the struct's arrays?
...
Suppose I have:
void function1( Type* object ); //whatever implementation
void function2( Type& object )
{
function1( &object );
}
supposing Type doesn't have an overloaded operator &() will this construct - using operator & on a reference - obtain the actual address of the object (variable of Type type) on all decently standard-c...
Since boost is forbidden in a company I work for I need to implement its functionality in pure C++. I've looked into boost sources but they seem to be too complex to understand, at least for me. I know there is something called static_assert() in the C++0x standart, but I'd like not to use any C++0x features.
...
In my code, I use QueueUserAPC to interrupt the main thread from his current work in order to invoke some callback first before going back to his previous work.
std::string buffer;
std::tr1::shared_ptr<void> hMainThread;
VOID CALLBACK myCallback (ULONG_PTR dwParam) {
FILE * f = fopen("somefile", "a");
fprintf(f, "CALLBACK WAS IN...
Going by gcc version 4.4.2, it appears that saying
typedef struct foo foo;
// more code here - like function declarations taking/returning foo*
// then, in its own source file:
typedef struct foo
{
int bar;
} foo;
is legal in C++ but not in C.
Of course I have a body of code that compiles fine in C++ by using the foo type but it ...
Hi, I'm quite new to the Windows API and would like to know how to peek at messages another process receives. As an example, I would like to get the HWND of, say, notepad and peek at all messages that are sent to this window. I code in C/C++.
Thank you
...
Hi. When I try to compile this:
#include <boost/fusion/container/map.hpp>
#include <boost/mpl/fold.hpp>
int main(int argc, char** argv)
{
typedef boost::fusion::map
<
boost::fusion::pair<int, const char*>,
boost::fusion::pair<long, char>
> FuMap;
FuMap fuMap("hello", 'w');
unsigned val = boost::mpl...