i want to do part of program which save and load some data from registry. Saving is succefuly working. I have function GrabPrivilage to grant some privilegies to my thread.
i grant SE_RESTORE_NAME and SE_BACKUP_NAME to my thread and after that i call RegRestoreKey(HKEY_LOCAL_MACHINE, TEXT("C:\reg.txt"), REG_FORCE_RESTORE ); and it always...
Hello All,
I'm using BoundsChecker9.1 with visual c++. I have a class
class Sample{
public:
vector<AnotherClass> x;
};
When I run my program the BoundsChecker tool reports all push_back() calls such as S.x.push_back(AnotherClass()) as memory leak.. Wouldn't all the elements in vector x will always be deallocated when the Sample clas...
I am developing a project in VC++2008. The project uses the OpenCV library (but I guess this applies to any other library). I am working with the Debug configuration, the linker properties include the debug versions of the library .lib's as additional dependencies. In VC++ Directories under Tools|Options i set up the include directory, t...
say I built an application called App1 with a lot of classes in a single project. And I decide that I want to build another project called App2 and I want to use those same classes so I decide to turn App1 into a lib file. Must I remove the WinMain function to do so or can I leave it and the compiler will ignore the winMain in the lib fi...
I've been reading a few gaming books. And they always prefer to create the engine as a static library over dynamic link. I am new to c++ so I am not highly knowledge when it comes to static libraries and dynamic link libraries. All I know is static libraries increase the size of your program, where DLL link libraries are loaded as you ne...
Few hours back I was fiddling with a Memory Leak issue and it turned out that I really got some basic stuff about virtual destructors wrong! Let me put explain my class design.
class Base
{
virtual push_elements()
{}
};
class Derived:public Base
{
vector<int> x;
public:
void push_elements(){
for(int i=0;i <5;i++)
...
There are some new integer types in the Windows API to support Win64. They haven't always been suppoprted; e.g. they aren't present in MSVC6.
How can I write an #if condition to detect if these types are supported by <windows.h>?
(My code needs to compile under many different versions of Microsoft Visual C++, including MSVC6. So I ne...
Well, that's pretty much the question: Is Serialization of Objects threaded in Visual C++ 6.0? I've got a nasty bug that would be explained if this is the case, and I haven't found any documentation about it.
...
Problem:
I'm trying to use a library named DCMTK which used some other external libraries ( zlib, libtiff, libpng, libxml2, libiconv ). I've downloaded these external libraries (*.LIB & *.h files ) from the same website. Now, when I compile the DCMTK library I'm getting link errors (793 errors) like this:
Error 2 error LNK2005: __e...
Possible Duplicate:
How to stop C++ console application from exiting immediately?
So im learning c++ and i was given this example and i wanted to run it. But i cannot get it to stay up, unless i change it. How do i get Microsoft visual 2010 to keep up the screen when it gets to the end of the program after I release it?
#incl...
I have a problem getting a character from the user in VC++.the function i want to use uses the char format so when i get the input using getch() it gives me an error that can't convert 'int' to 'char'.
could someone please help me how to get the input in char format please?
edit:
char key1[10];
key1=getch();
Main.draw_text(key1,120+(...
Hi,
I am developing a new application which have to write data to DVD. Is it possible to do with IMAPI2.
I read some help from MSDN but didnt get any startup material.
Can u provide some nice sample or link.
...
Depending on implementation, OMP can be quite useful to parallelize fairly arbitrary bits of code - e.g a parallel section inside a method that calls two independent methods - or it can be bad. It depends on how threads are created/cached, I think.
How does the VC++ 2008 implementation work? And is the 2010 implementation significantly ...
Hello,
I'm using DCMTK library for reading Dicom files (Image format used in medical image processing.) I'm having a problem in compiling this DCMTK source code. DCMTK uses some additional external libraries (zlib, tiff, libpng, libxml2, libiconv). I know that all libraries should be generated with same Code Generation Options.
I've do...
We have the following interface:
[object, uuid("uuidhere"), dual ]
interface IInterface : IDispatch
{
[id(1), propget] HRESULT CoolProperty( [out, retval] BSTR* result );
}
Now there's a minor problem. On one hand the parameter is "out" and so any value can be passed as input, the parameter will become valid only upon the successf...
Hi,
I got a crash dump (both mdmp and hdmp) for my application (written in C++) captured using dr. watson.
After analyzing the dumps through windbg, I concluded that the crash had occurred in the catch() itself :)
What I need to know is what exception caused the the failure in the first place i.e. I need that penultimate(last but one...
Hi
I'm trying to consume an axis web service in VS 2005 & unmanaged c++..
The inbuilt sproxy.exe in VS falls over with a namespace error as the input/output namespaces are different.. though if I consume the web service in c# it works fine..
i've investigated gSOAP as well as Axis C++ both seem rather complex for what I need
All the...
I'm facing this problem. So, I need to build the support libraries (zlib, libtiff, libpng, libxml2, libiconv) with "Multithreaded DLL" (/MD) & "Multithreaded DLL Debug" (/MDd) run-time options. But the problem is there is no direct way . I mean there is no *.sln / *.vcproj file which I can open in Visual C++ and build it.
I'm aware with...
So I'm using Visual C++ 6.0, and trying to compile some source code, but upon compilation I get this:
Linking...
LINK : fatal error LNK1104: cannot open file "Iphlpapi.lib"
Error executing link.exe.
I'm using the correct SDK, and the directories are correct. I've checked, double checked, and triple checked. The file is the specified d...
0
Hi! I have C++ project (VS2005) which includes header file with version number in #define directive. Now I need to include exactly the same number in twin C# project. What is the best way to do it?
I'm thinking about including this file as a resource, then parse it at a runtime with regex to recover version number, but maybe there...