I just found that I had fopen()'ed the same file twice without fclose()'ing it between. The offending rename(,)'s now work OK. I am sorry to take up so much of your time.
I just now inserted into my program this instruction:-
I have downloaded IVT library ( Integrating Vision Toolkit), I made my app dependent on this library ( as DSP project in VC6.0) , I can partially compile the app because I get “permission denied” when I get to #include preprocessor statement. I have checked the directory permissions and I have grayed out “read only” checked in IVT directory. All of the sources I used so far said that such grayed out “read only” checked ( in XP) does not make any difference (?) when directories are involved. All of my app directories have that grayed out “read only” checked and I have no problem including other (OpenCV) libraries. I am tempted to recopy / re-download the IVT files , but would like to hear from the forum what is going on here. Appreciate any advise. Cheers Vaclav
Addendum Here is the real code snippet I must be doing something really stupid.
Do I have to create my own parent #include file ( such as stdafx.h) with all the other headers or is it a time to learn how to use CMake?
I'm not sure what you mean, the two are not connected. Using pre-compiled headers via stdafx.h merely helps to reduce the compile time of your source files, but you still need to #include all the individual header files. I have used make in the past and it is a good system, but I don't think it offers any advantages when you are creating Windows applications. Using the VS build system will do all you need.
One of the bygone useful features of the ancient days before DOS programming vanished, was ability, when I wanted to calculate something quickly, to quickly write a program where control started at the beginning and ran down the text like in a knitting pattern and and I did not have to catch Windows messages and events. A short example follows at the end of this message. Please, how can I use Visual C++ to write and run such a program, and how to run it? (I have Windows Vista).
I am writing a Visual C++ program, using features from an from an older Visual C++ program which I wrote. How can I (for example) get the compiler to use the version of the standard function GetFileName(.....) which needs a char* parameter rather than the version which needs a WCHAR* parameter?
is there a Article about CFormView, CView, CListView etc. for Beginners?
I always work with dialog based Applications, so i don’t have any experience with this Classes.
Any help would be great for me.
Here i like to thanks to all who help me before in my problems .
I am trying to compile libexif. Basically I have a requirement to read exif data from jpg.
In the README-win32.txt it is written as: "hack yourself a build system somehow. This seems to be the Windows way of doing things."!
I installed MinGW and Msys. I am able to get the Msys prompt. It ends up in a "$" prompt. I tried changing directory to where I have the libexif code from within this prompt unsuccessfully. My compile system is Win 7. msysCORE version is 1.0.11.
I have a C++ MFC static library dll file. I have a VB.Net program that acts as the GUI and C++ does the grunt work.
I have just taken over this program, but never had an opportunity to do any debugging for the C++ part until today. Whenever I place a breakpoint in the cpp file and run the main program (VB) the breakpoint I placed in the cpp will not be hit according to the compiler.
I am wondering why that is? In the past I have been able to do so on different programs but I believe that was because the C++ dll was created as a COM dll. I am not familiar with MFC so I am at a loss.
By the way I have been searching but could not find any documentation on how to do this. Maybe there is so if you can point me in the right direction I would greatly appreciate that.
Can the MFC static library be able to be debuggable from within a VB app? If not, can anyone offer any debugging suggestions as to some how "step" through the C++ code?
If you need me to clarify anything or go into more depth I will gladly do so.
By the way before I forget the C++ functions are called within VB using the following formula.
DeclareFunction FunctionName Lib"DLL_Name.DLL" (parameters) As DataType
DLL stands for Dynamic Link Library, it is by definition not static. Also, you state below that it is a COM component, are you sure it is built with MFC classes? You also need to check that the final component was built with DEBUG on so that the debugger can match the object code with the source file. You could test this further by setting a breakpoint in the VB code at the point where it calls one of the C++ functions and see if you can single step into the DLL.
One of these days I'm going to think of a really clever signature.
It seems that I may need to clarify a few things. That is my fault. My original message may have skimmed over a few details.
The reason why I wrote MFC static library was because under the C++ properties page I have the following...
Configuration Type: Dynamic Link Library
Use of MFC: Use MFC in a Static Library
Use of ATL: Not using ATL
I have not have had a chance to work with MFC and because of that I am at a loss. What I have worked on in the past (completely different program) is the use C++ to create COM objects and that way make it aware in other programming environments such as VB. But this particular C++ program is not a COM object. Every time I try to load the DLL file in VB using the Add Reference it tells me this is neither a valid COM object or assembly.
I have not been in this situation before so this is left me scratching my head saying how do you debug this? Do you have any suggestions?
This is what I am attempting to do. I have my main VB program and I add the C++ solution to the main project. I place break points in the C++ program and when I step through the main (VB) program it does not halt within the C++ cpp file. Upon mouse over the breakpoint the compiler tells me "The breakpoint will not be currently hit. No symbols have been loaded for this document."
I made sure in the Configuration Manager that all the programs or solutions are defaulted to "Debug" setting.
One thing you could try is to set the C++ DLL as the start up project in your solution, get the VB program running, then attach the debugger to it. I have had success in the past doing that with C# and C++ DLLs.
Every time I try to load the DLL file in VB using the Add Reference it tells me this is neither a valid COM object or assembly.
So you are not even at the point of being able to debug anything yet, since you cannot get to the library. In order to use a C++ DLL from VB.NET you need to make that library into a COM component, or provide a pure Win32 interface which you can then access via the Platform Invoke feature[^].
One of these days I'm going to think of a really clever signature.
"Whenever I place a breakpoint in the cpp file and run the main program (VB) the breakpoint I placed in the cpp will not be hit according to the compiler."
When debugging managed code that calls unmanaged code, there's a setting (in Properties | Debug) called "Enable unmanaged code debugging". If this isn't checked, the debugger won't step into the unmanaged code.
I am creating an application in which m sending data to printer for printing using COM and LPT port.Now, I want to do same using USB port.
For COM and LPT port,am setting port first by using fn CreateFile which Gives me handle of COM and LPT port.To createFile fn,first parameter is name of port that is COM1,COM2.. And then sending data to that port and Its working fine.
Now,For USB, I tried GetRawInputDeviceList but its not returning me any HID device.
Or there any other way to detect USB device?