|
Hi ,
What do u mean by explicit linking ? I am using standard MFC libraries .
And using SQL Server with CRecordset and CDatabase clases.
I will be really grateful if anyone could help me out here.
Thanks in advance
ZINC
|
|
|
|
|
zinc_z wrote: What do u mean by explicit linking ?
As opposed to implicit linking.
Implicit linking: static load or load-time dynamic linking.
Explicit linking: dynamic load or run-time dynamic linking (e.g., LoadLibrary() ).
"The words of God are not like the oak leaf which dies and falls to the earth, but like the pine tree which stays green forever." - Native American Proverb
|
|
|
|
|
Hi ,
No I m not using any explicit linking .
I read somewhere on web that If you select "USE MFC IN STATIC Library" option in Project Settings menue , you dont need to copy dlls explicitly but i have tried this one too buts its not working also.
I will really appreciate if you could provide me any alternative solution .
Regards,
ZINC
|
|
|
|
|
zinc_z wrote: I read somewhere on web that If you select "USE MFC IN STATIC Library" option in Project Settings menue , you dont need to copy dlls...
True, because all of the code has been mashed into the single .exe file.
Is your application compiled in Debug or Release mode?
"The words of God are not like the oak leaf which dies and falls to the earth, but like the pine tree which stays green forever." - Native American Proverb
|
|
|
|
|
My Code is in Release mode , there is no external dependcies , Its a multithreaded socket based database application.
Now is there any way that I could run it on MS Server 2003 without installing MS VIsual C++6.
I have already tried by copying all Dlls(with help of Dependency Walker ), and also by setting option 'MFC IN Static Library', and by running REDIST package of microsoft and also by making project through InstalShield .
Any other solution ??????
ZINC
|
|
|
|
|
With your application running, you need to make a note of each of the DLLs that have been loaded into its address space. Use Process Explorer for this.
"The words of God are not like the oak leaf which dies and falls to the earth, but like the pine tree which stays green forever." - Native American Proverb
|
|
|
|
|
hi!
I cannot make my ftp client to work through my socks server. I use smartFTp, in its preferences I chose socks5 proxy without auth. For http connections (through IE) and ICQ socks server works good. I tried to use ftp client both in passive and active modes. My suspicion is that something wrong with the main relay's loop:
Code:
<code>
char swapBuffer[4096*16];
int iSendResult, iRecvResult;
tv.tv_sec = 2;
while (true)
{
memset(swapBuffer,0,sizeof(swapBuffer));
FD_ZERO(&fds_read);
FD_SET(s, &fds_read);
FD_SET(tunnelSock, &fds_read);
iSocketsSet = select(0, &fds_read, NULL, NULL, &tv);
if (pThis->m_bStopMainThread || iSocketsSet == SOCKET_ERROR )
Error();
if (iSocketsSet > 0)
{
if ( FD_ISSET(s, &fds_read) )
{
printf("Receiving data from source client\n");
iRecvResult = recv(s, swapBuffer, sizeof(swapBuffer), MSG_PEEK);
if (iRecvResult == 0)
Error();
else
{
iRecvResult = recv(s, swapBuffer, sizeof(swapBuffer), 0);
swapBuffer[iRecvResult]=0;
}
if (iRecvResult != SOCKET_ERROR && iRecvResult > 0 )
{
iSendResult = send(tunnelSock, swapBuffer, iRecvResult, 0);
}
else
Error();
}
if ( FD_ISSET(tunnelSock, &fds_read) )
{
printf("Receiving data from target server\n");
iRecvResult = recv(tunnelSock, swapBuffer, sizeof(swapBuffer), MSG_PEEK);
if (iRecvResult == 0)
Error();
else
{
iRecvResult = recv(tunnelSock, swapBuffer, sizeof(swapBuffer), 0);
swapBuffer[iRecvResult]=0;
}
if (iRecvResult != SOCKET_ERROR && iRecvResult > 0 )
{
iSendResult = send(s, swapBuffer, iRecvResult, 0);
}
else
Error();
}
}
}
</code>
Thanks for attention.
|
|
|
|
|
Hi Guys
Can anybody Explain What is Socket Notification Sink ?
With Rgds
Girish
Software Developer
|
|
|
|
|
Hi,
that is the dummy window created by MFC when working with CSocket or CAsyncSocket. This window is used to dispatch the events, like OnReceive, OnAccept and sorts ...
codito ergo sum
|
|
|
|
|
But Then Why it is showing me Terminating Window[Socket Sink Notification]
How can i Avoid that
Girish
Software Developer
|
|
|
|
|
Something blew up the internal messaging system.
This could hapen due to a few errors like:
- Multithreaded access to the same socket
- Blocking issues
- to many events on the message pump
the real issue here is that almost nobody (including me )
what the real problem is, so its hard to solve this error.
I had the same problem in my application, so i cleaned up
the code of the communication part in that way it only needs
to collect the data and not processing it. It resolved into a
stable part.
If you google for this you will see that many others experience
the same problem.
codito ergo sum
|
|
|
|
|
Thanks for ur Suggestion, hope so it will also solve mine problem
With rgds
Girish
Software Developer
|
|
|
|
|
I have inherited class someclass : CFormView
but now i don;t know hot to show someclass on screen
vc doesn't allow me to use constructor so i can't use create.
|
|
|
|
|
you can create a sdi app with View derived from CFormView with the appwizard,
if you aren't aware of it.
MVP
|
|
|
|
|
Hi,
I am stuck in a situation. Actually i have to make a windows service to gracefully shut down an Application (if any running process gets killed or hanged, then shutdown all the processes gracefully).
This application consists of four processes (running exes). All these four processes are multithreded processes.
Out of the four processes we have code of only two processes which are actually wrapper of the other two.
While other two are from other company..
Can you please tell some approach for this situation. The real problem is to gracefully shutdown the proccesses without code.
Plz help !!
Thanks,
Rajni
|
|
|
|
|
Hi all,
Could anybody help me to customize a combo box?
I would like change the appearance of the button that used to dropdown list.
Thank you.
- NS -
|
|
|
|
|
|
Thank you...
It's fine. I could manage color for list box and edit box in the combo. But how could I change the selection color? Also the scroll bar should be customized.
- NS -
|
|
|
|
|
If i have a base class and a derived class the
destrutor of the base class is not virtual & i
use a Base ptr to point to Derived Object.
An error occures and the base destructor is not called .Why??
class Base<br />
{<br />
public:<br />
Base() {<br />
cout << "Constructor: Base" << endl;<br />
}<br />
<br />
~Base(){<br />
cout << "Destructor : Base" << endl;<br />
}<br />
};<br />
<br />
<br />
<br />
class temp<br />
{<br />
public:<br />
temp() {<br />
cout << "Constructor: temp" << endl;<br />
}<br />
<br />
~temp(){<br />
cout << "Destructor : temp" << endl;<br />
}<br />
};<br />
<br />
<br />
<br />
class Derived: public Base ,virtual temp<br />
{<br />
public:<br />
Derived(){ <br />
cout << "Constructor: Derived" << endl;<br />
}<br />
<br />
~Derived(){<br />
cout << "Destructor : Derived" << endl;<br />
}<br />
};<br />
<br />
<br />
int main(void)<br />
{<br />
Base *Var = new Base();<br />
delete Var;<br />
return 0;<br />
}
Vikas Amin
Embin Technology
Bombay
|
|
|
|
|
What error is generated ? Please, when you have errors, crashes and things like try to be as complete as possible. This will help people to understand better your problem.
vikas amin wrote: i
use a Base ptr to point to Derived Object
It is not the case in your sample code. In your code, you just use the base class.
vikas amin wrote: class Derived: public Base ,virtual temp
Also, what has this virutal temp to do there ?
If you are using a base pointer that has been allocated as an derived class (Base* ptr = new Derived; ), if you don't specify that your destructor is virtual, then only the destructor of your base class will be called thus this may result in memory leaks (and other problem if you have specific clean-up code in the destructor of your Derived class)
|
|
|
|
|
Cedric Moonen:
What error is generated ? Please, when you have errors, crashes and things like try to be as complete as possible. This will help people to understand better your problem.
Ok will try to take care from next time , post the error also with the code.
thanx
Vikas Amin
Embin Technology
Bombay
|
|
|
|
|
use a Base ptr to point to Derived Object
so when deived class is instantiated,first base class constuctor will be called then the derived.llarly when the memory allocated to derived object gets cleaned up the reverse should takes place first the destructor of derived must be called and then base destructor.
so if cleaning takes place via base pointer the destructor must be made virtual.
but i suggest u to always make base destructor virtual if u want to derive class form the base class
never say die
|
|
|
|
|
I am creating the installer package for MFC app with InstallShield. Now I want while installing the user should not be able to select the subfeatures twice in the Customed installation. He should be able to select the sub feature only once. for the second time he will not be allowed. How can i do that?
|
|
|
|
|
Hi
Im just learning how to wrap a window procedure and i am following this tutorial from stromcode.
I am wondering why would I have to create an object of the class first and then store it as pointer variable (Win32WrapperClass* pWnd)?
Is there a reason why this has to be done, because i thought that if i create a Win32WrapperClass object now it would have no relation to the Win32WrapperClass i would create in my main.cpp
<br />
<br />
LRESULT CALLBACK Win32WrapperClass::stWinProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)<br />
{<br />
<br />
Win32WrapperClass* pWnd;<br />
<br />
if (uMsg == WM_NCCREATE) {<br />
SetWindowLong(hWnd, GWL_USERDATA, (long)((LPCREATESTRUCT(lParam))->lpCreateParams));<br />
}<br />
<br />
pWnd = (Win32WrapperClass *)GetWindowLong(hWnd, GWL_USERDATA);<br />
<br />
if (pWnd) return pWnd->WinProc(hWnd, uMsg, wParam, lParam);<br />
else return DefWindowProc(hWnd, uMsg, wParam, lParam);<br />
any help on this would be great
cheers
|
|
|
|
|
Doing so allows you to write object oriented code and at runtime can easily manage the state of the window because you can always retreive the object associated with the window using the GWL_USERDATA given the window handle.
Vipin - MVP
|
|
|
|