|
Could anyone plz tell me how to ( Programmatically ) terminate / release / kill .... ( whatever ) a dll, so that one program doesn't hold on too the thing the whole time.
Plz
Thanx
Programm3r
|
|
|
|
|
Isn't enough with "FreeLibrary"?
Marc.
... she said you are the perfect stranger she said baby let's keep it like this... Dire Straits
|
|
|
|
|
|
Search for FreeLibrary function in your/online help files.
Marc.
... she said you are the perfect stranger she said baby let's keep it like this... Dire Straits
|
|
|
|
|
if this dll was loaded using LoadLibrary, then FreeLibrary should do the trick.
if this dll was loaded by the exe (the compilation was with the lib) , then when the exe unloads the dll.....
hope this helps
Yaron
Interface basics click here :
http://www.codeproject.com/com/COMBasics.asp
don't forget to vote
|
|
|
|
|
Use FreeLibrary function
see MSDN for more information
SaRath.
"Where I am from, there is no plan B. So, take advantage of today becuase tomorrow is not promised. - 50 Cent"
<blink>My Blog | Understanding State Patte
|
|
|
|
|
|
Programm3r wrote: My bad .... Thanx
what?
SaRath.
"Where I am from, there is no plan B. So, take advantage of today becuase tomorrow is not promised. - 50 Cent"
<blink>My Blog | Understanding State Patte
|
|
|
|
|
thanks in advanced
Yaron
Interface basics click here :
http://www.codeproject.com/com/COMBasics.asp
don't forget to vote
|
|
|
|
|
I ran into a problem with the getline, which is a known bug in Visual C++ 6.0 and found the solution was to change the system header file string, so I'm trying to figure out how to make the change take effect (I suppose I have to recompile it somehow, but I'm having a lot of trouble figuring out just how to do that). If someone could tell me where to look to make the change take effect, I would appreciate it!
Thanks!
Richard Alley
Student/Software Engineer
|
|
|
|
|
What you are attempting is very risky, and hardly ever necessary. Even if you did manage to recompile the MFC DLLs, they would be incompatible with those on the target machine. Why don't you just derive a class from whatever class getline() belongs to? Then you can override the getline() method.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
He isn't talking about the MFC dlls. He is referring to the old bug in the standard header file.
I don't recommend editting it yourself. You can download the patched library (it is just header files) from Dinkuware's site that fixes that issue and several others. Additionally, you should try to use the string file instead of string.h (which is marked as deprecated).
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
Zac Howland wrote: Additionally, you should try to use the string file instead of string.h (which is marked as deprecated).
Well, I have "#include string" (with string in the angled brackets), so I guess that's really the string file instead of string.h ....I never really thought there was a difference.
And could you give me a link to that site?
Richard Alley
Student/Software Engineer
-- modified at 9:49 Thursday 6th July, 2006
|
|
|
|
|
You should try to use #include <string> instead of #include <string.h> because the latter has been deprecated.
http://www.dinkumware.com/
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
Zac Howland wrote: He isn't talking about the MFC dlls.
My bad. I somehow read that into the problem.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
CMas07 wrote: I ran into a problem with the getline, which is a known bug in Visual C++ 6.0 a
if it C++ what about Function Overloading!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
If I have two processes connected via TCP (blocking), if one process writes data to the socket and then closes its end of the socket connection without any kind of handshake from the other process, will the other process still be able to read the data sent by the first process? Or will the data be thrown away when the first process closes the socket (in other words, is a handshake required)? In my situation, process A sends a large amount of data (perhaps a megabyte) and then needs to close to service other requests. Process B will always have a blocking read on the socket at the time that process A sends, but the read is specifically for a smaller number of bytes than the total number that process A sent. Process B has to read the header of the data to determine how long the rest of the message is, but by the time process B figures this out and posts another read, presumably process A will have closed its end of the socket.
It appears to me that process B is always getting all the data, but I cannot find any documentation that says that this is the expected behavior. I don't want it just to be a coincidence.
|
|
|
|
|
http://www.freesoft.org/CIE/RFC/1122/99.htm[^]
4.2.2.13 Closing a Connection: RFC-793 Section 3.5
"The normal TCP close sequence delivers buffered data reliably in both directions."
"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
|
|
|
|
|
You are the best. Thanks.
|
|
|
|
|
Hello people,
I have a problem with Smartgraph,you can see the article about it here: http://www.codeproject.com/atl/SmartGraph.asp
I have added the object of Smartgraph and I wrote the lines that mentioned in the article:
<br />
m_Graph.SetParentWnd(this->m_hWnd);<br />
<br />
m_Graph.SetPlotType(0);
m_Graph.put_xLable("Time");<br />
m_Graph.put_yLable("Amplitude");<br />
m_Graph.put_Title("Graph Test");<br />
in the BOOL CMyGraphsDlg::OnInitDialog()
CMyGraphDlg is the general class of my dialog.
When i'm trying to build and run my project I'm getting the error i'll link you now:
http://img69.imageshack.us/img69/7199/untitled5xo.jpg
How can I fix it?
Thank you all for the help!
SnaidiS(Semion)
|
|
|
|
|
The error message in the task list should be descriptive enough... you are supplying the wrong data type to the function.
It should be
m_Graph.SetParentWnd(this);
Edit: I just looked at the article and I realised that you have failed to cut and paste properly as CWnd doesn't have a SetParentWnd() function and only has SetParent() and that SetParentWnd() belongs to the component...
m_Graph.SetParentWnd(this->m_hWnd);
-- modified at 9:38 Thursday 6th July, 2006
|
|
|
|
|
Thank you man!
SnaidiS(Semion)
|
|
|
|
|
I haven't understood one thing: How can I manage/control/edit the function of the graph?
for instance :line graph or Parabola?
SnaidiS(Semion)
|
|
|
|
|
|
here:
http://www.codeproject.com/miscctrl/pgllib.asp[^][^]
There are an instructions:
1 Install GDI+ (part of Microsoft SDK).
2 Download Gdiplus.dll and make sure it is in the path,
3 Recompile the source, it will build .lib in the lib directory and the .dll in the bin directory
4 Add the directory with PGL binaries to your path. (by default it is C:\Program Files\PGL\bin)
5 Add the include directory and lib directory to Visual C++ include/lib directories.
6 Make sure the headers are available
I dont really understand them
I downloaded the GDI dll but I dont understand which path(in 2).
which source(in 3)?
How can I recompile him?
4 I dont understand too 5 and 6
After that they want me to make the variable ULONG_PTR m_ulGdiplusToken; in the CWinApp-is this class is the Dialog class?
I mean if I made a dialog based project.
Because when I have tried to find this class I haven't found..
Thank you all for your wonderful answers!
SnaidiS(Semion)
|
|
|
|