Hi,
I'm trying to get started with Visual C++ in Visual Studio 2008.
When I press the play button (start debugging), a console opens, but then immediately closes. How do I make this window stay open so that I can see my output?
...
I would like to know whether WinInet or WinHttp will get webpage contents quickly or is there any other quicker method for getting webpage content (less than 1 sec).
The programming environment which I am using is VC++
...
I'm having trouble with LoadLibrary() and getting an error that doesn't make sense to me:
::SetLastError(0);
m_hDll = ::LoadLibrary(szName);
if (m_hDll == NULL) // Failure to load the DLL.
{
DWORD err = GetLastError();
}
The error is 127 ("The specified procedure could not be found.") That doesn't make any sens...
When calling functions that always throw from a function returning a value, the compiler often warns that not all control paths return a value. Legitimately so.
void AlwaysThrows() { throw "something"; }
bool foo()
{
if (cond)
AlwaysThrows();
else
return true; // Warning C4715 here
}
Is there a way to tell the...
how i can add CWinAppEx class in vc++ 6.0 dialog MFC ,because i want to handle application state.How should i get this class.
...
Hi
Can anybody tell me how to increment the iterator by 2 times.
iter++ is available - I have to do iter+2 how can I achieve this.
...
Hi
I Have a list that contains dbfile,paths and i need to add them to a map inorder to get corresponding values.
my LIST contains items as like
star
e:\data\star.mdf
e:\data\star.ldf
kiran
e:\data\kiran.mdf
e:\data\kiran.ldf
hai
e:\data\hai.mdf
e:\data\hai.ldf
Now i need to insert them by populating a list as specified format
ma...
Hi all,
For my application (an MMC snap-in) I need to create a single native DLL containing strings that are localized into different languages. In other words, if you were to inspect this DLL with Visual Studio, you would see multiple string tables, each associated with a different locale but containing the same string IDs.
The approa...
Hi,
I've made a simple C++ program in VC++ 2008 Pro and it runs fine in the pc I used to develop it but when I run it in a pc without VC++ installed, it just gives me a
"This application has failed to start because the application configuration is incorrect"
error. I fixed this before by statically linking my project but now when I ...
I have this code here:
#include "windows.h"
#include "Tlhelp32.h"
#include "shellapi.h"
#include <wchar.h>
#include <fstream>
bool enumProcesses();
int main()
{
enumProcesses();
ShellExecute( NULL, L"open", L"log.txt", NULL, NULL, SW_SHOW );
return 0;
}
bool enumProcesses()
{
std::wofstream log("log.txt");
PROC...
I understand SetCurrentDirectory shouldn't be used in a multithreaded application since the current directory is shared between all threads in the process.
What is the best approach to setting the directory with this in mind.
It can mostly be avoided setting the directory by including the full pathname when opening files instead of firs...
Hey,
I want to convert 'System::String ^' to 'LPCWSTR'.
for
FindFirstFile(LPCWSTR,WIN32_FIND_DATA);
Please help.
...
Hi!
I just tryed the standard way for adding CToolbar to a dialog on the new CMFCToolBar. But it doesn't work. Befor I dip into the new implementation, I want to know if it actually possible?
...
We have an installer application.
In that we have one dll related to our application.
We created setup with all respective files.
We used "Install Shield 6.3" and created a setup file.
After created build. The build is working in xp, not working in 2000.
It is showing error message as Couldn't load .dll only in win2000.
What could be ...
I am trying to read a file which contains URLs and are 100 million in number. What I need to do is find out the different websites they are from. So, I am taking chunk of data in memory and reading it line by line. Also, I need to find out how many URLs does each website has in the file and what are those URLs. The way I figured it out i...
I have two maps:
map< string, list < string > > map1;
map< string, list < string > > map2;
I have populated map1, now I want to copy the map1 contents into map2. So I simply did:
I have some operation for that the map1 fills with
1. kiran, c:\pf\kiran.mdf, c:\pf\kiran.ldf
2. test, c:\pf\test.mdf, c:\pf\test.mdf
And now I have t...
Hi
Can anyone tell me how to create a process in VC++? I need to execute
regasm.exe testdll /tlb:test.tlb /codebase
command in that process.
...
On my .NEt projects I'm used to the tool called ReSharper but my current project is c/c++ and I so miss my loved ReSharper any one know of a tool with at least kinda the same capabilities for c/c++ (Especially refactoring and dead code analysis)
...
Hello,
I formed class template that represent two dimensional array :
template<class T>
class Array2D {
protected:
public:
T *data;
const unsigned rows, cols, size;
Array2D(unsigned r, unsigned c) : rows(r), cols(c), size(r*c) {
data = new T[size];
}
~Array2D() { delete data; }
void...
I have a Windows Mobile 6 Professional native project that runs ok on Win Mobile devices. Now I need a version that runs on Windows Embedded CE 6.0 RC2. What is the best path for this conversion? Can I just change few project settings / add new platform with configuration manager OR I have to start with new smart device project and impor...