I've got a char* buffer to hold a file that i read in binary mode. I know the length of the file is 70 bytes and this is the value being used to produce a buffer of the correct size. The problem is, there is 17 or 18 extra spaces in the array so some random characters are being added to the end. Could the be a unicode issue?
ulFLen stor...
The following piece of code is a reduced sample from the large project I'm trying to port from GCC/G++ to Microsoft Visual C++ 2010. It compiles fine with G++, but with MSVC++, it throws errors, and I'm having trouble understanding why.
template <typename A, typename B = typename A::C::D> // line 1
struct foo
{
typedef int type;
}...
Hi. I've narrowed down a problem.
I create a simple Dialog app with
VC++ 6.0.
I start a thread before the main
dialog DoModal() is called
I exit the application - sometimes
the app shuts down immediately,
other times it hangs for 10 seconds
or so
What causes this? I have tried _beginthread(), _beginthreadex() and AfxBeginThread(). T...
Currently the code here is using IE6's button icons. How can I point this button to use other image/icon that I create myself?
TBBUTTONINFO inf;
inf.cbSize=sizeof(inf);
inf.dwMask = TBIF_IMAGE;
inf.iImage = 1;
SendMessage(tmp, TB_SETBUTTONINFO, m_buttonID, (LPARAM)(&inf));
...
i had written code for creating hidden window, but in a dll & messages are not getting posted to the hidden window. my requirement is to post the messsages to the hidden window from the hidden window itself.
i'll just call start function of this hidden window then it will create & process the user defined message (this is my requirement...
Hi!
When I'm debugging something, I would like to store breakpoints/bookmarks related to bug* I'm currently working on. So when I switch to another bug*, I don't want every time to manually disable breakpoints/bookmarks related to previous bug, and create another one for the new bug. It would be great that is possible to tag breakpoint ...
Hi,
I compiled mfc program using vc2008 on windows server os. I tried to run exe on windows xp sp3. I am getting error as "This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem.". what do i do for solve this.
Thanks,
KAM
...
Hi All,
I am attempting to write a simple function using VC++6 to write to the event log. It must be in this version of studio because it is being added to a legacy application. The problem that I am having is that it writes the message similar to below. The only thing that is valid here is the "This is a test" string. I don't need this...
i have following code
#include <iostream>
using namespace std;
int main(int argc,char arg[]){
int a=arg[1];
int b=arg[2];
int c=a+b;
cout<<c<<endl;
return 0;
}
i am using windows 7 microsoft visual c++ 2010
how run it from command line?
...
Possible Duplicate:
The Definitive C++ Book Guide and List
Can somebody recommend me advance c++ book explaining RAII, autoptrs?
Thank you
...
I am working on creating an application which must interact with the user on the secure desktop (i.e. locked computer screen), but does not specifically provide authentication. From my research, it seems that the only way to get code running on the secure desktop is to use the Credentials Provider API. However, you can only write a crede...
I want to make my button to appear my own icon. But somehow, it still refers to IE6's icons. Help me... Here's the the code I am currently working on:
HINSTANCE module = _AtlBaseModule.GetResourceInstance();
HICON myicon = LoadIcon(module, MAKEINTRESOURCE(IDI_ICON1));
HIMAGELIST hImageList = ImageList_Create(16,16, ILC_...
Hi,
I'm using fstream to read a stream from a binary file. I use the method get().
fstream f1("Log.dat", ios::in | ios::binary);
char zMsgSize[MSG_SIZE];
zMsgSize[0] = '\0';
f1.get(zMsg, CHR_END);
CHR_END is a special terminating character that I have put in the file earlier. There are null characters in the file I'm reading, that'...
Visual Studio (2005/2008/2010) appears to create a response file containing flags for the C/C++ compiler, cl.exe. As soon as compilation finishes, the response file is deleted.
Is there a way to force Visual Studio not to delete the response file? Is there some other way to view the contents of the response file?
...
how to arrange dialogs programmatically in MFC in cascade format, other than simply using SetWindowPos based upon the position of the previous displayed window.
The Dialog position is to be loaded from the registry(in my app) so we use
SetWindowPos(NULL,x,y,cx,cy,SWP_NOZORDER); for the dialog , Ater then if we use CascadeWindows func...
I wish to develop applications which should work both on Windows and Linux Operating Systems. Please help me how to proceed.
...
I have created a member variable in class as
CComPtr<IXMLDOMDocument2> m_spXMLDoc;
XML document is created as
CoCreateInstance(CLSID_DOMDocument, NULL, CLSCTX_INPROC_SERVER, IID_IXMLDOMDocument2, (void**)&m_spXMLDoc));
Now when application exits ,exception is occurring.Callstack is pointing to p->Release()
~CComPtrBase() throw()
...
Hi All,
I'm working on a file sharing application in C++. I want to write console output into a separate file and at the same time I want to see the output in console also. Can anybody help me...Thanks in advance.
...
Hello All,
I want to static link mapi32.lib with my vc++ project in vs.net2005 project. I am using the following import statement inside my testdll.cpp project which is my entry point of the application.
#import "mapi32.lib"
I have put references for C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Lib path inside c/c++ -> ...
We have an number of old visual C++ 6 windows services that are currently running on a single server. The problem seems to be that all of the service seem to utilise only a single core. (There are 4 cores)
Isn't the multi core utilisation (on windows server 2003) supposed to be optimised by the OS?
...