|
Great !
almost correct, but it must be cArrayType[20]
and now it works like I want it to.
thanks
|
|
|
|
|
Sorry, I assumed you knew what I meant. Try this:
typedef char MyArrayType [50];
MyArrayType myArray [20]; /ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
All-
I just joined this site, because when I get error messages I am often pointed to it during a search. But, I am a virgin when it comes to code. I am getting an error "cannot initialize ressource.dll". I have not installed anything but have lost most of my right-click menu and that error will appear ONCE during every DIFFERENT action. For example: Drag & Drop error, click close and Drag & Drop works without a problem. But, if I get that error with another action AFTER Drag & Drop, then it will reappear the next time I try to drag & Drop.
I do not have ressource.dll on my system and wouldn't know what program it belongs to.
I want to "ease" my way into being able to do simple debugging and I hope this will be the place.
Thanks in advance Mike Mc
|
|
|
|
|
Problem Solved. I had a shell compression program called Iceows (formerly ARJ Folder). I had disabled the commands and that was what caused ALL of my problems.
But, here's the kicker. The error was "Cannot Initialize ressource.dll" and this program doesn't install it.
Now, I should be able to just uninstall the p[rogram completely.
Then I can lurk and learn. My 4th system and I cannot keep up with the latest codes.
Mike Mc
|
|
|
|
|
I got a sample Dialog based MFC program. I made some modifications to it, one of them is: when F1 is pressed, show the HTML help file. But when I run it, after the HTML help file was shown, a message box pop up with caption of "Windows Help", and the message itself is:
"Cannot find the S:\TRANSFER\lwang\Antialiasing\Debug\ASIST3D.HLP file. Do you want to try to find this file yourself? Yes No".
It seemed to me that the default function for accelerator key "F1" is still being invoked somewhere in the program. How can I get rid of it?
Thank you very much for any hint!
|
|
|
|
|
Have you checked the message map? Probably that - unless that's how you made your mod?
Dylan Kenneally
London, UK
|
|
|
|
|
hmm, there is a default function for ID_HELP in the App class. Getting rid of that line solves this problem. Thanks!
|
|
|
|
|
MFC translates F1 into ID_HELP command. You're invoking Html help in response to what event?
Tomasz Sowinski -- http://www.shooltz.com
"Yields falsehood when preceded by its quotation" yields falsehood when preceded by its quotation.
|
|
|
|
|
Thanks for the fast response. I'm invoking Html Help in response to menu item File->Keys. And I assign F1 as the accelerator key to this menu item.
I add the following lines to my dialog cpp in its message map declaration:
ON_COMMAND(ID_HELP, OnFileKeys)
And remove the line for ID_HELP in the App class.
Thus solved the problem.
Thank you very much again!
|
|
|
|
|
is it possible to use the RASDial Function without knowing the
szEntryName + password + username, and just connect with the
default settings to redial a lost Modem connection .
thanks
|
|
|
|
|
|
According to my experiences and some sources on the net the MFC class CSocket does not seem to be very thread-safe.
Creating the sockets (listen sockets & accepted sockets) in the main-thread and using them in another thread gives troubles...
So I tried to create all sockets in the thread function.
After calling AfxSocketInit() in the thread function (I don't know if this is correct ...) Everything seems to be fine, But the virtual functions OnAccept(), OnReceive(), ... are not called.
The attach/detach trick is not an option, because both mainthread and other thread use the sockets.
How should I handle this problem ?
Any help appreciated.
Greetings,
Niko
|
|
|
|
|
Why can you not use Attach/Detach? I use this in a multi-threaded socket app.
e.g. I have a thread that uses a socket that listens on a port. When an incoming connection arrives it creates a new thread and passes the thread the socket handle:
void CListenSocket::OnAccept(int nErrorCode)
{
CSocket socket;
Accept(socket);
CAcceptThread* pThread = (CAcceptThread*)AfxBeginThread(
RUNTIME_CLASS(CAcceptThread),
THREAD_PRIORITY_NORMAL,
0,
CREATE_SUSPENDED);
pThread->m_hSocket = socket.Detach();
pThread->ResumeThread();
}
BOOL CAcceptThread::InitInstance()
{
m_pSocket = new CServiceClientSocket;
m_pSocket->Attach(m_hSocket);
}
Faith. Believing in something you *know* isn't true.
|
|
|
|
|
We don't want to use many thread, because there will be some 10.000 connections on that server. The accepted connection is added to a pool.
1 thread polls all connections and performs some actions on the sockets.
On the same time the main thread is also able to do some interaction on some sockets.
I guess using attach/detach everytime when needed wouldn't be good idea.
|
|
|
|
|
one of my costumers has the problem that my program
is crashing when he starts up the program. he has
send me the cpu/memory adresses of the standard
warning window when a program is crashing.
how do i find the problem causing the program to crash
on his maschine with the information i have now ?
Regards
mario
|
|
|
|
|
|
|
fheyn wrote:
check the dll's
My dll's are fine, thanks.
Tomasz Sowinski -- http://www.shooltz.com
"Yields falsehood when preceded by its quotation" yields falsehood when preceded by its quotation.
|
|
|
|
|
1) Copy Dependency Walker (Depends.exe) to a floppy.
2) Find out his OS version.
3) Go to a computer with that OS and your application installed.
4) Copy Depends.exe to that machine and run it.
5) Open the app that caused the error (MyApp.exe caused an invalild page fault...) in depends
6) In the bottom panel, find the base address of the module the error occured in
7) In calc.exe, subtract the base address from the memory address of the error
8) Sort column 2 row 2 panel in depends by the Entry Point column
9) Find the closest match to your calculated result in #7 in the entry point column
10)This address should correspond with the function your error occured in (look in the function column)
Its not perfect, but it works most of the time.
Jason Henderson quasi-homepage articles "Like it or not, I'm right!"
|
|
|
|
|
thanks a lot, i will try this!
|
|
|
|
|
Who have the source code about chart of the stock?
Please help me! Thanks a lot!
|
|
|
|
|
How can I runtime change the height of the vertical scrollbar.
For example, so that the size of a thumb corresponded to the ratio of the all lines to the quantity seen on the screen.
Best regards,
Eugene Pustovoyt
|
|
|
|
|
Use SetScrollInfo. nPage member of SCROLLINFO controls the size of proportional scroll thumb.
Tomasz Sowinski -- http://www.shooltz.com
"Yields falsehood when preceded by its quotation" yields falsehood when preceded by its quotation.
|
|
|
|
|
Thank you, very much!!!
Best regards,
Eugene Pustovoyt
|
|
|
|
|
I have a member function which needs to return a CString& , and within that function I have the return value in a CString object. Can anyone tell me how I can return my CString as a CString& ?
Dylan Kenneally
London, UK
|
|
|
|