|
good point!
heck even a crash dump will help learn how to take a dump....lol it's potty training time!!! ...brings tears to my eyes, lil-jr is growing up
you can always load the dump into your debugger of choice and work backward that way too!
Yours Truly, The One and Only!
|
|
|
|
|
I have created a small program that creates a 5 byte TCP packet to a server then the server sends it back. I'm unsure of how the wisock send and recv functions work exactly, does it just poll the connection until there is something in the buffer or is there an interrupt. I'm suppost to setup an interrupt, so any info you know or a good place I could find this info would be great!
Thanks
Simon
|
|
|
|
|
Interrupt handling will happen in the device driver level, not in Winsock or in the transport service provider that implements the TCP/IP protocol.
|
|
|
|
|
Default behavior of send(...) & recv(...) is blocking on the call till requested operation is finished.
Not aware of how this wait is internally implemented.
As an application programmer, I assume that you want to model your application so that it doesn't block on such calls and utilize the CPU cpu cycles for other tasks. If that is correct, you need to explore which I/O strategy we want to use:
http://tangentsoft.net/wskfaq/articles/io-strategies.html
Translating the "interrupt" to be the case where instead of blocking you want the program to be notified when data is there to read,
WSAAsyncSelect() can be an easy path to go as your app/window is notified through message loop.
-- Soyuz
|
|
|
|
|
Thanks for the information helped me alot!
|
|
|
|
|
I create SDI project that derive from CEditView (it look like NOTEPAD).
Then I create dialog project with some function that can open text file as well as show data of file in first project.I use ShellExecute() as
ShellExecute(NULL,"open","firstproject.exe","C:\\New Folder\\Text.txt","",SW_SHOW );
My problem is I can't open text file if that file keep in folder that the name including space charactor.
for example the above code
If the "Text.txt" keep in folder name is "NewFolder"(No space)it can open.
but if the folder name change to "New Folder" it will show Messagebox
"Access to C:\\New was denied".
Please give me some idea for solved this problem
|
|
|
|
|
Try this
ShellExecute(NULL,"open","firstproject.exe", "\"C:\\New Folder\\Test.txt\"","",SW_SHOW );
|
|
|
|
|
Thanks you but after I try
I got the Message "C:\New Folder\Test.txt was not found"
|
|
|
|
|
Have you actually checked that there is actually a file there with that name?
|
|
|
|
|
What about if I use variable for keep string?
<br />
void function(TCHAR m_szFile)<br />
{<br />
ShellExecute(NULL,"open","Firstproject.exe",m_szFile,"",SW_SHOW );<br />
}<br />
because m_szFile I get from DragQueryFile() function
DragQueryFile ( hDrop, 0, m_szFile, MAX_PATH ) )
|
|
|
|
|
You will still have to wrap quotes around the contents of m_szFile because it is a path that contains spaces.
|
|
|
|
|
Thanks a lot.
The problem already solve.
|
|
|
|
|
There's nothing wrong with the ShellExecute() statement. Look at how firstproject.exe is handling command-line arguments.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Can you tell me more about this sentence
"firstproject.exe is handling command-line arguments"
|
|
|
|
|
Such as?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I use App wizard create first project.exe, I don't know how the program work when I call it to open file.
|
|
|
|
|
Hi,
I have a doc/view app, main menu (IDR_MAINFRANE) and another menu (IDR_POPUPMENU1).
What i'm trying to accomplish is adding menu IDR_POPUPMENU1 as submenu to one of the
menu item in main menu.
I'm doing it in following way in OnUpdate() :
<br />
CMenu csm;<br />
csm.LoadMenu(IDR_POPUPMENU1);<br />
<br />
VERIFY(pCmdUI->m_pMenu->CreatePopupMenu());<br />
pCmdUI->m_pSubMenu=&csm;<br />
and needless to say, it doesn't works...
can anyone help me out?
Thanks...
|
|
|
|
|
I use code from here[^] to merge two menus.
But I do TrackPopupMenu() with the result. This may be different, though the code claims it can handle top-level menus..
Failure is not an option - it's built right in.
|
|
|
|
|
Hi all,
I am having a dll with Dialog as a Resouce. I have created a Class for that Dialog also.
for example :
if Dialog Class is "one"
in the DLL Function
DLL Function()
{
one o;
o.DoModel(); // Here not populating the Dialog.
}
I then start debug the DLL. It is giving error in
BOOL CDialog::Create(LPCTSTR lpszTemplateName, CWnd* pParentWnd)
{
...
...
#ifdef _DEBUG
if (!_AfxCheckDialogTemplate(lpszTemplateName, FALSE)) --> here is the Error
{
ASSERT(FALSE); // invalid dialog template name
PostNcDestroy(); // cleanup if Create fails too soon
return FALSE;
}
#endif //_DEBUG
}
I am not able to Load the Dialog in the DLL. Please help me out.
Uday kiran
|
|
|
|
|
before calling the function to display, you need to call the method AFX_MANAGE_STATE( AfxGetStaticModuleState();
|
|
|
|
|
Did you this code on the first line of your function
AFX_MANAGE_STATE(AfxGetStaticModuleState());
|
|
|
|
|
Hi all,
at a certain place of my code i test the controls of my view on the RuntimeClasses.
If they are CEdit i make a special operation ...
At the View i send the variables (as value, not as pointer) to this function,
the function is MyDDX_Control which executes some operations before the variable of type CEdit or CStatic goes to the real DDX_Control-Function.
Already before i send the CStatic variables (in my case CFontStatic) to MyDDX_Control i check them
via the Watching-Tool
the first Label is correctly of type CFontStatic,
the second Label (also declared as CFontStatic) is as value of type CFontStatic and if i check
it as pointer with the watcher, the type is CCustomerView ( The Class-name of the view where the control is located ...
I've nothing changed into the source code appart some definitions.
I put into the class-header a blank-definition of classes which appears in this class and the include of the real header of the pointers into the .cpp
class xxx;
public class yyy
{
public: xxx *var;
}
but appart of these changings i've nothing changed.
Is it possible that those changings provokes errors like this?
Big thanks !!
|
|
|
|
|
I saved the source code and restored old ones.
With the old source codes it works...
Now i have a lot of checks to do :S
|
|
|
|
|
ya I see your problem!!!
your class xxx is too explicitly rated and class yyy has denied it access, as she wants to be wined and dined first, and talked to like how was your day dear....no wham bam thank-you ma'am.....no sir class yyy is too classy for that!!!
-- modified at 16:10 Thursday 12th July, 2007
Yours Truly, The One and Only!
|
|
|
|
|
I have developed a server and client application for lan monitoring.The problem is that I have to change the permissions of of my client application for all users, but changing permissions in all the computers is hectic task(when we have a large no. of computers connected to server). so I want to cahnge permissions from server only without going to all computers.
Is there any application to do this.
please help urgently
|
|
|
|