User Profile
Collapse
-
I checked that, made sure Windows firewall was disabled. No other programs running (e.g. Symantec, McAfee). I have a test program that is written in VC6 that communicates fine using the CArchive across the network with different computers. -
VC6 and VC2008 Socket Compatibility
Hi,
I have an VC2008 (C++) app that reads data from a VC6 app using CArchives
over sockets using regular socket reads. On my local computer when I send
the packets to 127.0.0.1, it reads it with no issues. On a blank "test"
computer with .NET 3.5, VC++ redist, and both applications installed, the
local (127.0.0.1) test doesn't work. The VC6 app simply cannot detect the
open port of the VC2008... -
The main error right now are Access Violations in the ReceiveTCP() function during the concatenation of the string (the +=). I think I may have a race condition as previously mentioned. How do I check for that? I thought CriticalSection s prevented more than one thread from accessing a section...Leave a comment:
-
Ok,
Here's the code causing problems. I've cut out some of the repetitive parts to make it more concise. The code calls ReceiveTCP to append rx'd data to a CString buffer, then calls OnTcpip() to process the data. The error occurs during a CString destructor - FreeData call.
...Code:int CIrCamera::SendTCP() { _critSect.Lock(); int bytesSent = 0, nRet = 0; char toSend = 0; CString tempSendBuffLeave a comment:
-
mac11, I'm using XP and VC++ 6. I'm using CStrings so I think that is a self-managed entity. I add received data to a CString buffer, and delete it when I've processed it. I wasn't doing any explicit memory management.
RRick, I run the heap check function to check the status of the heap and it always returns ok. Is there a good/free memory checker tool you'd recommend? I'll try and post the errors and some code.Leave a comment:
-
Threading and Sockets
Hi,
I have a program that reads information from an IP device (camera). It establishes the Telnet connection and then via a thread, initializes the camera (runs a bunch of commands to get the camera's basic configuration). I keep getting the same two errors: "User called breakpoint at 0xXXXXXX" or Access violation. It seems that it always quits whenever I do a CString concatenation on the receive side. I'm using a CString... -
PowerPoint With C++ .NET
Hi,
I'm using VS2008 and added references to Office.dll (v12) and Microsoft.Offic e.Interop.Power Point (v12). The problem is that the TextRange object doesn't have a Text property - although the documentation indicates that it should. Any ideas? Thanks.
Vinoj -
I'm on the right track I think, but does anyone know how to set the text in a cell in a table on a powerpoint slide? This is what I'm doing...
PpApp = gcnew PowerPoint::App lication();
PpApp->Visible = MsoTriState::ms oTrue;
PowerPoint::Pre sentations ^PpPresSet = PpApp->Presentation s;
String ^val = WorkingDirector y + "\\wiips.po t";
PowerPoint::Pre sentation ^PpPres = PpPresSet->Open(val,...Leave a comment:
-
-
Dynamically Generate PowerPoint in C++ .NET
Hi,
Is there a way to dynamically generate a powerpoint file from scratch in C++ .NET? I'm running VS2008 and from what I've found supposedly Visual Tools for Office is already installed. The problem is I can't access any namespaces (e.g. PowerPoint, Microsoft.Offic e.Core, etc). Any ideas? Or do I have to create a generic powerpoint file and then populate it programmaticall y? Thanks. -
I don't know if this is the right way to do this, but instead of overriding a message, what you have to do is call a function that performs a BeginAccept. The BeginAccept takes a AsyncCallback function parameter that basically starts a "chain reaction" to BeginReceive and ReceiveCallback . There's a sample program in the msdn docs.Leave a comment:
-
-
C++ and .NET Sockets
Hi all,
I'm new to C++.NET (not so new to C/C++ or C#). Stupid question, but how can I be notified when data is available on a socket? I use the TcpListener class and accept a connection, but in VC6 I was able to override the OnReceive function to be notified. How do I do that in .NET? Thanks.
Vinoj -
I figured out what it was. During my form load, I had an open file dialog that ended up changing the working directory in memory. I would then open a file with a relative path and it would look somewhere else. Now I have to figure out how to keep the local directory...Leave a comment:
-
Now I get something really weird. I rearranged the order of the file to have the integers first, then the string (<int><int><str ing>). I use the FileStream class to read the bytes in and the order of the array is <string><int><i nt> - and the ints are wrong. I check the file outside the program using a binary viewer and the data is correct (not swapped). How could this happen?Leave a comment:
-
Hi nukefusion,
I've been out of the office for a few days. I haven't gotten any further. I know for sure that those two places are the only places where I'm accessing the file. I step through my form calls and I don't see any place where any problems could be caused. I'm almost out of options unless I try saving with another method, maybe using the filestream class.Leave a comment:
-
It's not hitting any exceptions in my test case. I'm debugging and stepping through it and that's how I'm finding the incorrect reads. Good catch on the IndexOf() line, that would've been an error in certain situations. Any other ideas?Leave a comment:
-
Do you know if there's a way to flush any buffers or stacks in VS? I'm using static methods to open/save the file so all the variables are local. On the open, the variables are initialized to zero. Also on the open, the data read from the disk is incorrect [string -ok][int - wrong][int-wrong]. Real bizarre.Leave a comment:
-
Sorry, I'm not trying to vague, I was trying not to innundate the thread with a bunch of code. The other "stuff" is setting the parameters of a form with the info from the config file, then opening the form, displaying information, then closing the form. The setup of the program is a form (Form1) with a config button and the "stuff" button. If I click the config button right after startup, it works (reads the config file properly)....Leave a comment:
-
Do you know if there's some Endian conversion that I should be concerned with with the GetBytes() or ReadAllBytes() methods? I'm on a Intel platform.Leave a comment:
No activity results to display
Show More
Leave a comment: