It made no difference. I also tried running the program as Administrator, but still the same. Remember that my console application worked fine though, so I doubt that it is permissions ...
od ananzi co za
Posts
-
Weird ::CopyFile problem -
Weird ::CopyFile problemI have now also tried SHFileOperation as follows, but it also copies the file into the sub folder : SHFILEOPSTRUCT sMove = {GetSafeHwnd(), FO_MOVE}; sMove.pFrom = strSource + _T("\0"); sMove.pTo = strTarget + _T("\0"); sMove.fFlags = FOF_NO_UI; SHFileOperation(&sMove);
-
Weird ::CopyFile problemIt sometimes returns TRUE , but still copies the file into the empty sub-folder It sometimes returns FALSE, but still copies the file into the empty sub-folder, GetLastError then returns 5
-
Weird ::CopyFile problemI have an application that upon startup does an automatic software update. It checks a folder if it contains any files, and if found, copies those files over to their respective target folders. Now suddenly this updating does not work anymore. It copies the file to the target folder, but the result is not a file in the target folder, but a sub folder with it's name as the source file's name. Ex. I have a file in my upgrade folder: C:\Program\Upg\Logo.jpg This file needs to be copied to C:\Program So my program does CopyFile(strSource, strTarget, FALSE) with strSource = "C:\\Program\\Upg\\Logo.jpg" strTarget = "C:\\Program\\Logo.jpg" After the copy I end up with a sub-folder in C:\Program called Logo.jpg\ which is empty, instead of a file called Logo.jpg in C:\Program I then hard coded the paths like: CopyFile("C:\\Program\\Upg\\Logo.jpg", "C:\\Program\\Logo.jpg", FALSE); but it does exactly the same I then made an empty new console application with the hard coded CopyFile call as above and it works fine, ie. Logo.jpg is copied from the Upg folder to C:\Program I tried playing with the project settings, stack/heap sizes, etc, but my application does not copy the file ! Any ideas ?
-
MS ActiveX Browser Popup ProblemI have a CFormView class that hosts a Microsoft WebBrowser ActiveX control. I use the control to browse to various HTML pages. Some of these pages create pop-up pages, through some JavaScript buttons. Now when I browse to the site through IE, and the pop-up windows are created, they work fine and display their contents. When I browse to the site through my app, the pop-up windows are created, but I get a script error saying "A security error has occurred". I can then continue by clicking on the "Yes" button, but nothing further happens. In my application I browse to the pages through Navigate2("http://username:password@site.blah"), thus passing some security credentials to the page. Could this be the problem ? How do I pass these credentials on to the popup (of which I have no control) ? Any other ideas as to what the problem could be ? Thanks ! OD
-
XamlXmlReader in Framework 4I eventually managed to solve my problem; it turned out to be a namespace problem. The XamlXmlReader and XamlReader classes I tried using existed in the System.Xaml namespace. I should have used the classes in the System.Windows.Markup namespace. The solution thus was: return System.Windows.Markup.XamlReader.Load(new XmlTextReader(new StringReader(xaml))) as FlowDocument; Works like a charm ! OD
-
XamlXmlReader in Framework 4Hi All, I am trying to load a XAML string and convert it into a FlowDocument object as follows: return XamlXmlReader.Load(new XmlTextReader(new StringReader(xaml))) as FlowDocument; It seems that the Load function has not been implemented (yet?) in the Beta 2 of Framework 4. According to all documentation that I can find it should be there, or at least XamlReader.Load How can I convert a XAML string to a FlowDocument otherwise ? Thanks OD
-
Failing Debug vs Working Release ?Thanks, but as you expected I have no arguments specified there !
-
Failing Debug vs Working Release ?Hi Souldrift, Where in the project properties would I see that ? I looked through all the settings, but could not quite see where you can pass arguments to main.
-
Failing Debug vs Working Release ?Guys,I know this question has been asked ad-nausem, but I have the exact opposite problem. My release build works fine, my debug build does not ! I have an application that starts a whole lot of threads for processing multiple feeds of video and audio. In my release build all threads start successfully, but in my debug build some threads fail to start, AfxBeginThread returns NULL and GetLastError return 0. I am assuming that some or other resource has to be increased for my debug build to work. I've increased my stack sizes (in project properties) to 10x what it was without making a difference. What other properties/resources can I try to set for my debug build to work ? Any other reason why some of my threads won't start in debug build ?
modified on Monday, August 3, 2009 8:27 AM
-
Resource Leak [modified]Hi Guys, I've managed to track down the "leak". The application uses a mailslot to send some frequent statistical data to another process for display. The receiving program was receiving the data a lot slower than the sender was transmitting it, so eventually the Mailslot IPC ran out of shared memory and from there all the problems started.
-
Resource Leak [modified]I have a resource leak that I have thus far been unable to track down. I am using Process Explorer and Task Manager and am monitoring every counter that they are able to monitor. All counters are stable, ie there are no memory leaks, handle leaks, etc that I can detect. However, after my program has run for an hour or so all applications and Windows start giving a whole range of errors, but all of them are related to lack of resources. The only thing so far that is interesting is the Virtual Size value in Process Explorer. It stands at about 1,2GB, while my process's Working Set and Private Bytes is less than 70MB. All other resources are 100% stable after my application started up. I have enable Microsoft Application Verifier and set GFLAGS to enable all the Heap functions for my process. Alas, no errors. I've also tried Memory Validator, but it gives 100's of errors of uninitialized variables, all in MS code, nothing else really that matters. Are there other utilities that will enable me to track the actual resource that is leaking ? Any other suggestions maybe as to what type of "undetectable" leak I am experiencing ? Thanks OD
modified on Friday, July 31, 2009 3:47 PM
-
Control outgoing TCP/IP connectionsHi All, I want to attempt to block a specific program from establishing outgoing TCP/UDP connections. Thus as the (external) app attempts to make a socket connection, I want to receive notification of the event and have the ability to allow or deny the connection attempt. (I know this is basic firewall functionality I am referring to here, but there is no firewall on the market that can do exactly what I want, when I want, and how I want it for this specific program) I have seen the packet filtering API that is provided by Windows, but that only seems to filter on IP's and Ports. I want to filter on application ! Can anybody please point my nose in the right direction here. Thanks OD VC++ .NET 2002 on Windows XP and above ...
-
Socket Ping vs Connect PerformanceHi All, We have quite about 30 clients connecting to about 200 servers on our WAN. Currently we are experiencing extremely slow connection establishment times, in the order of 15-20 seconds. However, a ping from a client to the same server responds in 1-2 seconds. The client and server applications are based on WSASocket. I have traced the client and server side applications to death and it seams that the delay is in the receiving of the FD_ACCEPT event. Once the event has been received and the connections established, all seems fine, but it takes an unusually long time for the event to be received (through WSAEnumNetworkEvents). Are there any reasons for the connection establishment to take SOOOO long, while a ping goes through quite quickly ? Thanks OD
-
Network PerformanceSorry, forgot to mention. I'm actually connecting to 127.0.0.1 already. I rarely use any hostnames, especially not when the client/server are running on the same pc. I have an application layer running on top of the socket to reassemble the sent data at the receiver end. this layer has not changed over the last two year, so I'm fairly confident that the problem is elsewhere. But where ??
-
Network PerformanceI have started debugging the apps when on the network and most of the crashed do occur within the sockets/socket handler classes. The crashes are totally random at this stage ... Is there an easy way to monitor the network for saturation and collissions etc ? (We do not have any measuring hardware) ...
-
Network PerformanceHi Guys, A have a client/server application using sockets (TCP/IP) for all the IPC needs. I came across a very interesting problem the other day and is still quite stumped by it: When the apps are running on a local pc with the network cable not connected, then the apps run fine and the performance is as expected. However, when the pc is then connected onto the lan the apps suddenly start behaving eratically. They will crash for no reason, or the data transfers between the client and server will become very slow, or timeout and all weird things happen. I then unplug the cable and voila, all is fine again. I have tested lots of other network apps on that same pc and they all seem to work fine. Does anyone have any idea as to what may be wrong or where I can start looking for the problem ? Thanks
-
ICCompress key frames on MP42Hi All, I'm compressing a range of bitmaps using the VCM and the ICCompress function that has been opened on the MP42 codec (Microsoft Mpeg4 V2). The compression of the bitmaps work just fine, but I am battling to set when the next keyframe should be delivered from the compression.
DWORD dwInFlags = 0, dwOutFlags = 0; if (various check to set a key frame) dwInFlags = ICCOMPRESS_KEYFRAME; m_lFrameCount++; DWORD dwSuccess = ICCompress(m_hIC, dwInFlags, (LPBITMAPINFOHEADER)m_pVideoOut, m_pFrame, (LPBITMAPINFOHEADER)m_pVideoIn, pFrame, NULL, &dwOutFlags, m_lFrameCount, 0, 0, NULL, NULL); if (dwSuccess == ERROR_SUCCESS) { if (dwOutFlags & AVIIF_KEYFRAME) { m_lFrameCount = 1; TRACE("\nKEYFRAME %d", m_pVideoOut->bmiHeader.biSizeImage); } // etc, etc, etc
Any ideas as to what may be wrong in my code, or is there another way to accomplish that ? Thanks ! -
FD_ACCEPT event very slow (sometimes)Err, which link would that be ?
-
FD_ACCEPT event very slow (sometimes)Hi Moak. I'm out of ideas as well, except that I can now confirm that this problem does not occur when the application are running on a "pure" lan, i.e. no gateways/breakouts/links/etc to our VPN. It is only when I run the applications on PC's that are connected to the VPN that this problem occurs. But my most technical response to the problem no is: Go Figure !