Hi,
I'm wondering if anyone knows how to calculate the upload speed of a Berkeley socket in C++. My send call isn't blocking and takes 0.001 seconds to send 5 megabytes of data, but takes a while to recv the response (so I know it's uploading).
This is a TCP socket to a HTTP server and I need to asynchronously check how many bytes of ...
Our application hosts the Windows Scripting Host JScript engine and exposes several domain objects that can be called from script code.
One of the domain objects is a COM component that implements IDispatch (actually, IDispatchEx) and which has a method that takes a script-function as a call-back parameter (an IDispatch* as a parameter)...
I'm writing two processes using C# and WCF for one and C++ and WWSAPI for the second. I want to be able to define the address being used for communication between the two in a single place and have both C# and C++ use it. Is this possible?
The closest I've come is defining the constant in an IDL, then using MIDL and TLBIMP to get it i...
I create my VBO like this:
glGenBuffersARB(1,&polyvbo);
glBindBufferARB(GL_ARRAY_BUFFER_ARB,polyvbo);
glBufferDataARB(GL_ARRAY_BUFFER_ARB,sizeof(GLfloat) * tempvct.size(),&tempvct[0],GL_DYNAMIC_COPY);
Then to update it I just do the same thing:
glBindBufferARB(GL_ARRAY_BUFFER_ARB,polyvbo);
glBufferDataARB(GL_ARRAY_BU...
I try to sendmessage to an IE rebar/toolbar, but it seems that my toolbar does not take the message effect. Can someone tell me where is the fault ?
HRESULT CButtonDemoBHO::onDocumentComplete(IDispatch *pDisp, VARIANT *vUrl)
{
m_hWnd = NULL;
SHANDLE_PTR nBrowser = NULL;
HRESULT hr = m_spWebBrowser2->get_HWND(...
How do I convert an unsigned long array to byte in C++? I'm developing using VS2008 C++.
Edit:
I need to evaluate the size of this converted number,I want to divide this long array to a 29byte array.
for example we have long array = 12345;
it should convert to byte and then I need its length to divide to 29 and see how many packet is...
I'm trying out scipy.weave to build a fast minimal spanning tree program in Python. Unfortunately, using scipy.weave with a C++ library that I found, STANN, is more difficult that I had assumed. Here's the link to the STANN library: http://sites.google.com/a/compgeom.com/stann/
Below is the Python with scipy.weave script that I wrote.
...
Im beginning to learn SDL and OpenGL to start off game programming. I can load sprites and stuff in SDL but I want to learn to use OpenGL to load sprites and make the sprites move. I cant seem to find a single tutorial on 2D OpenGL game programming. From what I've read there are many advantages to using 2D with OpenGL rather than strictl...
I found this in Ogre Framework
class _OgreSampleClassExport Sample_Character : public SdkSample {
...
...
and it's define like this
#define _OgreSampleClassExport
Why we want to have this macro variable?
...
Hi,
We have a windows mobile 6.5 gaming application which uses openGL . Now we planned to port it to WP7 (windows phone 7).
When I check the compatibility of native code C++ and openGL in WP7, they are telling that there is no support in the WP7. WP7 support only Silverlight, XNA and the .NET Framework.
So what we thought of use XNA....
First of all, thanks to everyone who helps me, it is much appreciated!
I am trying to store a string with spaces and special characters intact into MessageToAdd.
I am using getline (cin,MessageToAdd); and I have also tried cin >> MessageToAdd;.
I am so stumped! When I enter the sample input
Test
Everything works as intended. Ho...
Hello :)
I'd like to support something like C++'s #include mechanism in a boost spirit parser. Essentially, I have a script command that asks my parser to load a sub script from a file. I'd like to be able to report error messages as described in the tracking input position while parsing post, but they don't cover parsing for multiple i...
Since Microsoft is generally a bit bias toward Direct3D, would a scene using VBO's in Direct3D be faster than the same scene using VBO's in OpenGL, or would it be the same since it's up to the Graphics Card driver?
Thanks
...
Sorry for so noobish question but how can I do it with C++? I need to get country names and their 2-letter or 3-letter ISO codes (or whatever it's called) using a given IP address. Is there any way to do this easily?
The only two ways I found are to use GeoIP C library or to download a free database but is there something more dynamic?...
Is there any reason Google uses the cc extension instead of the standard cpp in their open source projects? Should I do that too?
...
I have a simple function in my program, when I was wanting to mess around with unicode and do stuff with it. In this function, I wished to display the code value of the character the user entered. It SEEMED possible, here's my function:
wstring listcode(wchar_t arg) {
wstring str = L"";
str += static_cast<int> (arg); //I tried (...
Is it posible to declare a global array of a struct, and add elements dynamically to it?
Thanks.
...
Hello :)
I've got this simple parser intended to parse VB style double quoted strings. Thus, the parser should turn something like
"This is a quoted string containing quotes ("" "")"
into an output of
This is a quoted string containing quotes (" ")
Here is the grammar I came up with for this:
namespace qi = boost::spirit::qi;
nam...
I'm attempting to access a function in a DLL in C# and C++.
C++ is working fine, as is C# on WinXP. However I'm getting the following error when attempting to access the function on a Win2k8 system:
Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other...
Every process can use heap memory to store and share data within the process. We have a rule in programming whenever we take some space in heap memory, we need to release it once job is done, else it leads to memory leaks.
int *pIntPtr = new int;
.
.
.
delete pIntPtr;
My question is, will the heap memory exist when the application/pro...