|
The first point to get an answeer is to post a answerable question.
We all suspect that you have a file tha on its 72th line calls the haed of the stack you post, passing a wrong paramenter or a paramenter carrying wrong values.
But the only way for us to know abuit it is to see that line and at least the 10 liens before it.
2 bugs found.
> recompile ...
65534 bugs found.
|
|
|
|
|
During the conversation n fighting session i got the answer to my pbm..
Thanks For the info.
Regards,
KDevloper
|
|
|
|
|
Why you down voted naveen's replies ??
To satisfy your ego ??? Down voting will not give answer to your problem
Regards,
Sandip.
|
|
|
|
|
Thanks for the vote pal..
|
|
|
|
|
kDevloper wrote: I dont think this is not the right way to answer some one..
you f*ckin idiot. Is that better ?
so, you think coming and asking crap will bring you the solution to you problem, always ?
come on, be serious, and grow up a bit. Naveen wasn't aggressive at all. the point with super powers is that you just don't give us all the informations we need to understand what's going on at Line 72, and still you don't show it after request. What are you hoping man ?
kDevloper wrote: n e ways
that's not a proper way to talk on a forum either. you have to write full words, no SMS.
kDevloper wrote: u shud 1st read before answering some one
I believe YOU should read the answers and be more modest instead of being rude with someone with much more experience than you.
If he asked you what was on Line 72, it's because he read all your huge errors report pasted (which I personnally didn't bother to read entierely at first), don't you think ?
kDevloper wrote: How to get an answer to your question by Chris Maunder
again, it's something YOU should read AND understand. Also, try to put on our place. would you be able to help someone asking for help if he brings a crappy error report without any code sample to analyze ?
|
|
|
|
|
Hi,
I am getting the following error when I login as a Standard User. I have created as DSN under System DSN section so that it is common to all the users. But still I am unable to connect to database when I login as a standard user..
ERROR: --------------- Database Error Information ---------------
ERROR: Server (wwlbs-03) Database (master) ODBC Data Source (u1)
ERROR: ODBC ( Data source name not found and no default driver specified )
ERROR: ODBC ( State:IM002,Native,Origin:[Microsoft][ODBC Driver Manager] )
ERROR: Unrecognized ODBC RETCODE = -1
ERROR: Dataset Name -- d1 -- not found
I am using VC++ . Any help would be appreciated.
Thanks,
Venkat
|
|
|
|
|
Hello,
I have written a client server application using sockets.
In this application, server will send data to client. I have used CSocket(MFC) for this purpose.
Server side application is working fine but problems start as soon as i had intoduced threading inside it.
Below is my code:
///////////////////////////////////////////////////////////
UINT __cdecl ThreadProc( LPVOID pParam ); // Signature of thread proc
AfxSocketInit(NULL);
CSocket sockSrvr;
sockSrvr.Create(PORT);
BOOL bListen = sockSrvr.Listen();
while (1)
{
CSocket sockRecv;
sockSrvr.Accept(sockRecv);
AfxBeginThread(ThreadProc, &sockRecv);
Sleep(5000);
}
///////////////////////////////////////////////////////////
I pass address of CSocket as parameter of 'ThreadProc' and as soon as control enters 'ThreadProc'
iget a debug assertion faliure from sockcore.cpp at the following line:
ASSERT(pState->m_hSocketWindow != NULL);
Can anybody of you please help me i am not able to understan wats wrong to this code?
Thanks in Advance!!
Regards
Tony
|
|
|
|
|
tony_udz wrote: while (1)
{
CSocket sockRecv;
sockSrvr.Accept(sockRecv);
AfxBeginThread(ThreadProc, &sockRecv);
Sleep(5000);
}
I think problem is you are creating sockRecv on stack.
As soon as you create the thread it will go out of scope and destructor will be called and connection will close. Try this
CSocket *sockRecv = new CSocket();
dont forget to delete the socket in the thread after the operations are complete.
I hope it helps.
I did not know that we can not use the worker thread with the CSocket
See Roger's Reply
Regards,
Sandip.
modified on Thursday, September 4, 2008 4:56 AM
|
|
|
|
|
You cannot use a worker thread for MFC sockets, you have to use a UI-thread with a message pump. Read more here[^].
When it comes to CSocket it's virtually useless when developing anything other than toy applications. Mostly because it is blocking when both reading and writing.
Use CAsyncSocket instead and you probably won't even need a secondary thread.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
Roger Stoltz wrote: You cannot use a worker thread for MFC sockets, you have to use a UI-thread with a message pump. Read more here[^].
Thanks for the update about CSocket I was not aware of this.
Regards,
Sandip.
|
|
|
|
|
SandipG wrote: Thanks for the update about CSocket I was not aware of this.
You're welcome Sandip.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
Really thankful for your solution
|
|
|
|
|
Dear All,
My project requirement is MFC application need to create setup package and deployment.Im Using Visual Studio 2005.
It will be much helpful to me to give some advice on this..
Thank you very much,
Yours,
Anitha
|
|
|
|
|
|
Hi,
Will it support for Visual Studio 2005?
Thanks & Regards
Anitha
|
|
|
|
|
You did not even click on the link provided, did you? Inno works as a stand alone utility and has nothing to do with VS 2005.
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
Thanks..... now i got it.
|
|
|
|
|
hi i have written the following code to receive data from mobile using bluetooth through serial communication.
but it is not working
<code>
#include <stdio.h>
#include <conio.h>
#include <windows.h>
#include "stdafx.h"
#include "bluetoothConnection.h"
bool BluetoothConnection::openPort(char *portNum)
{
if (portNum != NULL)
{
hcomm = CreateFile((LPCWSTR)portNum, GENERIC_READ | GENERIC_WRITE, 0, 0, OPEN_EXISTING, NULL, 0);
if (hcomm == INVALID_HANDLE_VALUE)
{
return false;
}
else
{
return true;
}
}
else
{
return false;
}
}
bool BluetoothConnection::initPort()
{
dcb.fOutxCtsFlow = false;
dcb.fOutxDsrFlow = false;
dcb.fDtrControl = DTR_CONTROL_DISABLE;
dcb.fOutX = false;
dcb.fInX = false;
dcb.fRtsControl = RTS_CONTROL_DISABLE;
//time settings
timeouts.ReadIntervalTimeout = 20;
timeouts.ReadTotalTimeoutMultiplier = 10;
timeouts.ReadTotalTimeoutConstant = 100;
if (!SetCommTimeouts(hcomm, &timeouts))
{
return false;
}
else
{
return true;
}
}
void BluetoothConnection::ReadPort()
{
memset(chRead, '\x91', 250);
Sleep(1000L);
ReadFile(hcomm, chRead, 250, &dwRead, NULL);
}
void BluetoothConnection::display()
{
printf("%s\n", chRead);
}
int main()
{
BluetoothConnection *bth1 = new BluetoothConnection();
if (bth1 != NULL)
{
if (bth1->openPort("COM4"))
{
if (bth1->initPort())
{
bth1->ReadPort();
printf("the data from com4 is ....\n");
bth1->display();
}
else
{
printf("fail in init\n");
}
}
else
{
printf("unable to connect\n");
}
}
else
{
printf("unable to connect failed in initial state\n");
}
Sleep(1000L);
return 0;
}
</code>
its failing in CreateFile function coz its returns 0xffffff..
can this code be used for bluetooth coz i found such code for serial port comm and infrared.
is there any configurations between mobile and pc before running this application if there please provide me the steps..
|
|
|
|
|
First, are you sure the COM4 port exist ? Are you developping for winCE ? If yes, then if I remember well, you have to append a ':' after the port name (thus "COM4:"). Not sure anymore, try it and tell me if it works.
|
|
|
|
|
iam not using for windows CE its PC to mobile VC++ 2005 and appending of : has not solved, plz give me some soln..
|
|
|
|
|
Does this port exist at least ? Did you try to open it with hyperterminal ?
|
|
|
|
|
no i am a begginer and i used AT command to test a while long back but now i dont remember it plz.. which is the command to type in and check for the status... and one thing when i open hyperterminal and select com4 and try to type some thing then my mobile disconnects the bluetooth connection...
|
|
|
|
|
Hello everyone,
In ATL wizard to create a coclass, under COM category there is an item named "Type", for example, if we assign the short name under C++ category to "aaaa", the value of "Type" is "aaaa Class".
My question is, what is the function of the so-called "Type" and how will client or COM server use this value?
thanks in advance,
George
|
|
|
|
|
Hi all,
I m using a static text.
i want it shows like a link and open a dilog box on its click event.
please tell me how can i do this.
thanks in advance.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
See here[^]
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|