Using Visual C++ 2008 Express Edition. I'm linking my application with an import library (.lib) for a DLL that might or might not be present on the target system. Before you ask: I cannot distribute the DLL with my application.
If the DLL is not present, as soon as I call a function from the DLL (but not sooner!), I get a message like
...
This works fine:
std::vector<int> v;
v.push_back(123);
but this throws a std::length_error:
std::vector<uint32_t> v;// or vector<unsigned __int32>
v.push_back(123);
It seems to be triggered by resizing, because
std::vector<uint32_t> v;
v.reserve(2);
triggers a debug assertion "iterator not dereferencable".
This occu...
Seems like both COM_INTERFACE_ENTRY_IID and COM_INTERFACE_ENTRY2_IID are for the case when the class is derived from two or more classes each derived from a common interface. Like this:
class CMyClass : public IPersistFile, public IPersistStream {
};
(both IPersistStream and IPersistFile derive from IPersist).
Looks like I'm free to...
Hi,
I know this has been asked twice before but both had no proper replies and are dated so in case someone has found something in these days, I'm asking again!.
Any one knows any good tutorial for MSHTML or some open source project which can be read to understand how various operations can be done in MSHTML - MFC?
Thanks
...
how can i use ffmpeg functions with my Microsoft VS? i know i have to use MSYS and MingGW, but there is any document show the steps.
...
I would like to enable the IntelliSense 'auto' feature (like the Visual Studio C# 2008 Express) but I am using Visual Studio C++ 2008 Express Edition and in the Tools > Options > Text Editor > C/C++ (there is no option 'IntelliSense' (like Visual C#). How do I get this feature enabled? I know I can get a shortcut in place (CTRL-space etc...
Say I have an array
array<double>^ buffer = gcnew array<double>(100);
And I want a function that does something like:
void foo(array<double>^% buffer)
{
Array::Resize(buffer, 10);
}
but that don't allocate and/or move &buffer[0] when you want to trim the array.
...
Hi guys,
I'm trying to write a small program which will search a binary file for a few bytes and replace these with another bunch of bytes. But everytime I try running this small app I got message about *istream_iterator is not dereferenceable*.
Maybe someone have a suggestion how to do this in another way (iterators are a little bit a...
I am in the process of automating the build of a legacy product and have hit a wall...
I have a .idl file that is compiled in VC++ 6.0 using midl to generate a .tlb, .h and .c file that has a manual build step to add:
struct StructDef;
Just ahead of an MIDL_INTERFACE in the generated .h file. The rest of the .h file uses the definit...
/*********************************************************************
*Program Name : CSC 110 - 003 Store Unknown Number of Values
*Author : Anthony Small
*Due Date : Nov\17\09
*Course/Section : CSC 110 - 003
*Program Description: Store Unknown Number of Values in an Array
*
*BEGIN Lab 7 - CSC110-003 Store ...
I don't get what this article on R6034 says. Looks like it states that every application dependent on VC++9 runtime must have a manifest.
Now we have a DLL that we ship to customers, that depends on VC++9 runtime and has a manifest embedded. Does every application using our DLL also need to have a manifest embedded?
...
Whenever I put my component into COM+ and call CoCreateInstance() on the client the following happens:
the runtime instantiates the objecs (calls IClassFactory::CreateInstance())
the runtime calls QueryInterface() for the interface specified in teh CoCreateInstance() call
the runtime calls QueryInterface() for IdentityUnmarshal interfa...
The title says it all.
It never happened to me. In Visual Studio, I have a part of code that is executed 300 times, I time it every iteration with the performance counter, and then average it.
If I'm running the code in the debugger I get an average of 1.01 ms if I run it without the debugger I get 1.8 ms.
I closed all other apps, I re...
I am doing a tutorial on C++ (learning it). The best way to learn is by example. I have little .cpp files with not much in them. I am using the best C++ IDE (Visual C++). Is there a way where I can have a project called "Tutorial Guide" and make my .cpp and .h files, BUT when I run them, it only runs the current file. I have heard that t...
Hi all,
In C++, on this site: http://msdn.microsoft.com/en-au/visualc/bb985511.aspx
I downloaded the code sample and went to Debug and it came up with a messagebox with 2 textboxes in it and told me to specify the executable file to debug. So I did, and then I clicked browse, but there is NO executable because the stupid thing hasn't c...
Hi,
I have a windows NT service (Maths.exe) created in VC++ 6.0.
I don't have the source code or Visual studio 6.0 installed on my machine.
Can anyone please let me know the command using which I can install the service in Service Control Manager (invoked using service.msc).
I want to control (start, stop) the service manually.
Thanks i...
I have a LNK2019 problem when trying to use some DLL in my project.
Details:
I have a DLL project called dll1; that compiled just fine (using __declspec(dllexport)) in order to export the class inside dll1 (for dll2 usage).
I have another DLL project dll2 that uses dll1's functionality. I specified the *.dll1.lib file path inside the...
I'm trying to convert the string produced from the __DATE__ macro into a time_t. I don't need a full-blown date/time parser, something that only handles the format of the __DATE__ macro would be great.
A preprocessor method would be nifty, but a function would work just as well. If it's relevant, I'm using MSVC.
...
The default icon in Vista is listed under:
HKEY_CLASSES_ROOT \ Unknown \ DefaultIcon
As:
%SystemRoot%\System32\shell32.dll,0
I want to load a 48x48 version of that Icon in C++. I have tried:
hIcon = (HICON)::LoadImage(hmShell32, MAKEINTRESOURCE(0), IMAGE_ICON, 48, 48, LR_DEFAULTCOLOR);
However I get back a NULL hIcon and when I ...
I have a Windows application made in Visual C++. It runs well on an Intel Proccesor but it crashes on another system with an AMD processor (both systems have Windows XP installed).
Any suggetions?
...