|
I'm in trying to run a application(vc++)....the exe generated is absolutely running fine in DEBUG version...but when ever i try to rrun in Release version, it's not working properly...this is really a strange problem....
Cud anybody tell me the remedy of this problem?
kamalesh
|
|
|
|
|
kamalesh82 wrote: I'm in trying to run a application(vc++)....the exe generated is absolutely running fine in DEBUG version...but when ever i try to rrun in Release version, it's not working properly...this is really a strange problem....
Cud anybody tell me the remedy of this problem?
Reading this[^] article by Joseph should help.
Nibu thomas
A Developer
Programming tips[^] My site[^]
|
|
|
|
|
Generally, You have some trouble with optimizations. You have to switch on the release version, and then to REBUILD ALL the code. During the compilation and/or linking process, You have to watch carefully at the bottom of the dev. studio, where the warnings/error messages will be shown. Try to make changes the compiler suggests. If the code doesn't work again, try to switch off as many optimizations as You can. After that, rebuild the code again. You can hope that the code will work OK without any optimization. If the problem disappears, You can try to switch on the optimizations one-by-one, and then rebuild the project any time, searching the bug this way. Anytime, watch on the warnings carefully. By the way, as I know, the stack under debug version has some predefined limit. Try to find the stack settings under the release version, and adjust the value - for example, 1MB or more.
D. Senic, Belgrade
|
|
|
|
|
Are you using MFC and custom message handling (ON_MESSAGE, ON_REGISTERED_MESSAGE) at all?
If so, check that your handler functions for those messages are declared
afx_msg LRESULT funcname(WPARAM,LPARAM)
and not anything else. This is a common cause of "works in debug, crashes in release".
Alternatively, modify your link properties to generate debugging information, and run the release version under the debugger. You can do this without turning off optimisations. This might help you find the area that's at fault.
Steve S
Developer for hire
|
|
|
|
|
Hi, I've to write a code to solve this problem:
"The packets form A has been received by B but the packets need to be assemble at B. Write a programming in C/C++ to reassemble the packets at B."
Can somebody help me...
Hi, I'm new in programming. Can somebody help me . . .
|
|
|
|
|
Hello,every body,
please help to tell me how to save XML as string, (I use VC++ to develop)Pug XML Parser.thanks!!!
regards
angus
angus
|
|
|
|
|
You mean Pug located here at Code Project? Did you try reading the documentation?
"Just about every question you've asked over the last 3-4 days has been "urgent". Perhaps a little planning would be helpful?" Colin Angus Mackay in the C# forum
led mike
|
|
|
|
|
thank for your help!I use pug XML parser to set something into XML content,now I want to save the XML content as string or Blob,than I can save it in database.
i have try to use method:outer_xml(),but may be some steps wrong,please tell me the right method,thanks!
angus
|
|
|
|
|
|
In My dll, I use SetWindowHand(HWND hWnd) to get the exe program window's HANDLE, but in SDI program, when dll sendmessage to view window of exe program, the view can't recieve the message. in Dialog program, it runs well, but in SDI, it has that question, why??????
~~~
|
|
|
|
|
R u setting the windows handle from the view class? Some times the Frame wnd in the SDI app might have got the message. did u trried catching the message there?
nave
|
|
|
|
|
i try to catch the message in both view and Frame, but nothing was caught,
what's the matter???
~~~
|
|
|
|
|
What message r u sending?A userdefined one?
if ur using WM_USER + messages, try creating a message with RegisterWindowMessage() funtion...
nave
|
|
|
|
|
it can't work even;
is there any other idea???
~~~
|
|
|
|
|
I want to change the position of the button when the window size change.
How to write the code?
if (m_button)
{
m_button.SetWindowPos(NULL,intWindowWidth - 147, 11, intWindowWidth - 179, intHeight - 59, SWP_NOMOVE);
}
????
|
|
|
|
|
mimimimilaw wrote: SWP_NOMOVE
??
Do the chickens have large talons?
|
|
|
|
|
this way
m_button.SetWindowPos(NULL,intWindowWidth - 147, 11, intWindowWidth - 179, intHeight - 59, SWP_NOZORDER);
or
m_button.MoveWindow( intWindowWidth - 147, 11, intWindowWidth - 179, intHeight - 59 )
nave
|
|
|
|
|
You can use MoveWindow in wm_size
whitesky
|
|
|
|
|
i have access detail for ODLserver current API program as follow : user,acount,password,and the port no.
Now i want to make connection with server.
I have created a vc6 dialog based application which include activex control in that...now i am able to add active x in my dialog box...
My confusion is how to write a code which make connection with ODL server
|
|
|
|
|
How can we insert a new item to another program's ListCtrl control?
I do this:
LVITEM lvi, *_lvi;
char item[512], *_item;
unsigned long pid;
HANDLE process;
GetWindowThreadProcessId(myHwnd1, &pid);
process=OpenProcess(PROCESS_VM_OPERATION|PROCESS_VM_READ|PROCESS_VM_WRITE|PROCESS_QUERY_INFORMATION, FALSE, pid);
_lvi=(LVITEM*)VirtualAllocEx(process, NULL, sizeof(LVITEM), MEM_COMMIT, PAGE_READWRITE);
_item=(char*)VirtualAllocEx(process, NULL, 512, MEM_COMMIT, PAGE_READWRITE);
lvi.cchTextMax=512;
lvi.iSubItem=1;
lvi.pszText=_item;
// WriteProcessMemory(process, _lvi, &lvi, sizeof(LVITEM), NULL);
// ::SendMessage(myHwnd1, LVM_GETITEMTEXT, (WPARAM)0, (LPARAM)_lvi);
// ReadProcessMemory(process, _item, item, 512, NULL);
lvi.iItem = 1;
lvi.iSubItem = 0;
lvi.pszText=_item;
WriteProcessMemory(process, _lvi, &lvi, sizeof(LVITEM), NULL);
i = (int)::SendMessage(myHwnd1, LVM_INSERTITEM, (WPARAM)0, (LPARAM)_lvi);
But there is problem when execute above, memory violate....
Who can help me??please!!!
Who can help me??please!!!
|
|
|
|
|
Hi All,
I created one MFC extension dll and loaded the exporated function in another sample
MFC SDI application on click of the toolbar events.This application is almost looks
simmilar to paintbrush where the exported functions are having the implementaion of
painting methods.The MFC sample EXE is just to call the extention DLL and call each
exported fucntion(in .DEF file of MFC Extension DLL) to test whether the actions are having or not but for one function i am getting runtime error while excuting the MFC
sample EXE i.e. "Debug Assertion Failed".
Program path of the sample MFC SDI exe......
File : wingdi.cpp
Line : 1054
I am giving following code snippets....
HDC hdc = NULL;
UINT uIntRect = 0;//RECTANGLE;
HWND hwnd = NULL;
BOOL uReturnVal= FALSE;
LPFNDLL_drawShape lpfndll_drawRectangle;
HMODULE hModule = LoadLibrary("D:\\FancyViewer\\Notebook_13July2006\\Notebook\\Debug\\Notebook.dll");
if(hModule)
{
lpfndll_drawRectangle = (LPFNDLL_drawShape)GetProcAddress(hModule,"drawShape");
if (!lpfndll_drawRectangle)
{
AfxMessageBox("GetProcAddress() method is failed");
FreeLibrary(hModule);
return;
}
else
{
CRect rect;
GetClientRect(rect);
CPaintDC dc1(this);
CDC dcMem;
dcMem.CreateCompatibleDC(&dc1);
hwnd = (HWND)dc1.GetWindow();
hdc = dc1.Detach();
uIntRect = RECTANGLE;
// call the function of drawShape method for rectangle of Notebook.dll
uReturnVal = lpfndll_drawRectangle(hdc,uIntRect,hwnd);
ASSERT(uReturnVal == TRUE);
char buffer[65];
MessageBox(_itoa(GetLastError(),buffer,10),NULL,MB_OK);
return;
}
}
else
{
AfxMessageBox("Load library failed");
return;
}
GetLastError();
|
|
|
|
|
|
Is it possible to use an inherited class (CIosDialog : CDialog) as the base class in ClassWizard (instead of seeing CDialog as the base class, CIosDialog as the base class)?
Thanks.
John P.
|
|
|
|
|
jparken wrote: Is it possible to use an inherited class (CIosDialog : CDialog) as the base class in ClassWizard (instead of seeing CDialog as the base class, CIosDialog as the base class)?
Add the class as a generic class and then type in the base class name in the New class dialog.
Nibu thomas
A Developer
Programming tips[^] My site[^]
|
|
|
|
|
Hello,
I am curious to know if there exist a built-in Regular expressions algorhythm in C++ that can search patterns in a file and display them on the screen?
Thanks
|
|
|
|
|