|
Thank you Viorel!
If it is the compiler who inserts source codes implementation of an inline function into the place when we invoke the function, I think there should be compiling errors other than link errors in my situation, right? But why when I build the foo.cpp, foo.h, adapter.cpp and adapter.h into a static library (foo.lib), there is no error (I think at this time, the compiler should insert the source codes implementation of inline method into the places where inline methods are invoked)?
But the errors are reported when we link the static library into an executable file?
regards,
George
-- modified at 6:34 Monday 3rd July, 2006
|
|
|
|
|
I think when you are building the library file, since the Foo::operator = function was declared inline, the compiler does not generate an entry for it, i.e. this function is not exported. The compiler does not know that you are going to use it in another place. (I suppose the list of exported functions can be checked with dumpbin utility).
I think when compiler builds a file in which an inline function is called, but no body of this function is available, then the compiler treats this as a non-inline function, and expect it to be implemented somewhere. (Maybe it would be better to show a warning message here).
Because the linker was not yet invoked during compilation of your static library, no problems occur yet.
Errors occur later when the linker cannot link your module because of missing external function.
|
|
|
|
|
Thank you Viorel!
Viorel. wrote: I think when you are building the library file, since the Foo::operator = function was declared inline, the compiler does not generate an entry for it, i.e. this function is not exported. The compiler does not know that you are going to use it in another place. (I suppose the list of exported functions can be checked with dumpbin utility).
Why inline function is not treated as exported? I think foo.cpp exports the inline operator overloading function by the following statement (the first line of function definition),
<br />
Foo Foo::operator=(long value)<br />
Maybe I am wrong. Could you explain how (in what form) an function can be exported (in my previous comprehension, I think non-static function, which means not locally used function, like the above function, is exported automatically)?
Viorel. wrote: I think when compiler builds a file in which an inline function is called, but no body of this function is available, then the compiler treats this as a non-inline function, and expect it to be implemented somewhere. (Maybe it would be better to show a warning message here).
Do you mean the when the compiler builds foo.cpp or adapter.cpp or goo.cpp? Confused.
regards,
George
|
|
|
|
|
A function is "exported" from .obj or .lib binary files means that there is an address which points to the beginning of the compiled function. This address is used by linker to generate the CALL microprocessor instructions. If a function is marked as inline, then no such address is stored in the .obj or .lib file, because it is supposed that the body of the function will be entirely inserted by compiler instead of CALL instruction.
It seems that only non-inline and not-static functions are exported by .obj and .lib files.
George_George wrote: Do you mean the when the compiler builds foo.cpp or adapter.cpp or goo.cpp?
Yes.
|
|
|
|
|
Thank you Viorel!
Viorel. wrote: A function is "exported" from .obj or .lib binary files means that there is an address which points to the beginning of the compiled function. This address is used by linker to generate the CALL microprocessor instructions. If a function is marked as inline, then no such address is stored in the .obj or .lib file, because it is supposed that the body of the function will be entirely inserted by compiler instead of CALL instruction.
It seems that only non-inline and not-static functions are exported by .obj and .lib files.
I think in my case, in foo.cpp, since it includes foo.h, in which operator =() is declared as inline function, so it is not exported, right?
Viorel. wrote: George_George wrote:
Do you mean the when the compiler builds foo.cpp or adapter.cpp or goo.cpp?
Yes.
Confused. Do you mean them all or one of them? I think it should be adapter.cpp, right?
regards,
George
-- modified at 10:09 Monday 3rd July, 2006
|
|
|
|
|
George_George wrote: I think in my case, in foo.cpp, since it includes foo.h, in which operator =() is declared as inline function, so it is not exported, right?
Yes.
George_George wrote: Confused. Do you mean them all or one of them? I think it should be adapter.cpp, right?
Yes.
|
|
|
|
|
Cool, Viorel!
You have answered my question.
regards,
George
|
|
|
|
|
// the following function is created by (step 4) of the MFC AppWizard
// when you select Use split window from the Windows Style tab of the
// Advanced Options dialog
BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT /*lpcs*/,
CCreateContext* pContext)
{
return m_wndSplitter.Create(this,
2, 2, // TODO: adjust the number of rows, columns
CSize(10, 10), // TODO: adjust the minimum pane size
pContext);
}
i use this code but it does not show mw the split window plz help me how can i see split window
Ashish Dogra
MCA
Noida
|
|
|
|
|
ashish dogra wrote: i use this code but it does not show mw the split window plz help me how can i see split window
The split window is there, just that the default size makes it somehow hidden. Check the scrollbars in your window. Hover your mouse over the left edge (horizontal scrollbar) or top edge (vertical scrollbar) of the scrollbar and you should see your cursor changes. Now drag your splitted window out.
|
|
|
|
|
Hi,
I use a statically linked MFC exe load a statically linked MFC DLL, and careate a CDHtmlDialog in that DLL,
I already add below code to solved original when create CDHtmlDialog will crash problem successfully,
AFX_MANAGE_STATE(AfxGetStaticModuleState());
::OleInitialize(NULL);
AfxEnableControlContainer();
but now when I use it's member function, ex:GetDHtmlDocument
it'll crash,
I already add AFX_MANAGE_STATE(AfxGetStaticModuleState()); to the DLL's each function still have same problem
what else should I add?
Thanks!!
|
|
|
|
|
GetDHtmlDocument retrieves IHTMLDocument2 from html document now whats your problem
whitesky
|
|
|
|
|
Hi,
I have created a tab control. i have placed some controls on first tab page(TAB1). And some another controls on second tab page(TAB2). I want to send the data from tabpage1 to tabpage2.
How can do it. plz suggest any solution?
with regards,
Koti
|
|
|
|
|
Not sure what data you would want to send, but you can use pipes to exchange data. Otherwise if its globally stored data in variables you can update the variables then you can have your own user defined windows messages and send messages to and from each tab window as shown below.
#define UWM_TABPAGE1 WM_APP+1
...
SendMessage(tab1_hwnd, UWM_TABPAGE1, NULL, NULL);
|
|
|
|
|
HI,
I am getting Socket Notification Sink error, How can I eliminate this.
2ndly , when I use Spy++ to view Process I saw one process under my application node with text "Socnet Notifiaction Sink " why it is there
Thanks
Regards.
|
|
|
|
|
hi all
plz help me
i want to know that some time i make an application (SDI)
in which i use CView Class now i want to use csplitterwnd or other class then how i use those
as i want to make a splitter window
plz show me some example
Ashish Dogra
MCA
Noida
|
|
|
|
|
From MSDN:
<br />
BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT , <br />
CCreateContext* pContext)<br />
{<br />
return m_wndSplitter.Create(this,<br />
2, 2,
CSize(10, 10),
pContext);<br />
}
|
|
|
|
|
sir i have tried this what as it is sdi application when irun this it does not split that frame window
Ashish Dogra
MCA
Noida
|
|
|
|
|
try this:
BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
// TODO: Add your specialized code here and/or call the base class
BOOL res = m_splilter.CreateStatic(this,2,1);
m_splilter.CreateView(0,0,RUNTIME_CLASS(CsplView),CSize(0, 200), pContext);
m_splilter.CreateView(1,0,RUNTIME_CLASS(COtherView),CSize(200, 200), pContext);
return TRUE;
}
Where CsplView is a default view class generated by Wizard
and COtherView is class derived from Cview.
Hope these help.
|
|
|
|
|
Hi,
I'm trying to send an email using simple SMTP commands (currently via telnet, but eventually through a tool written in C++). I am able to authenticate successfully; however, at the end of the DATA part of my email, i get an 'administrative prohibition' response from the server:
C : EHLO
S : 250-genamics.blastula.net Hello [aaa.bb.ccc.dd]
250-SIZE 52428800
250-PIPELINING
250-AUTH PLAIN LOGIN
250-STARTTLS
250 HELP
C : AUTH LOGIN
S : 334 VXNlcm5hbWU6
C : [username@domain.blah - base64 encoded]
S : 334 UGFzc3dvcmQ6
C : [password - base64 encoded]
S : 235 Authentication succeeded
C : MAIL FROM:username@domain.blah
S : 250 OK
C : RCPT TO:myfriend@other.com
S : 250 Accepted
C : DATA
S : 354 Enter message, ending with "." on a line by itself
C : Body of email
C : More body
C : .
S : 550 Administrative prohibition
Any ideas as to why this is happening? Am I missing some steps? I've tried unsuccessfully to find an explanation from the oracle of truth (internet )
Thanks in advance for any suggestions.
Kanika
-- modified at 1:36 Monday 3rd July, 2006
|
|
|
|
|
|
Thanks for your response.
Sorry, I should have mentioned a couple of things:
1. Emailing works fine if I use Messaging ('Outlook' equivalent - I am on the PocketPC platform), with the same settings/user.
2. I have logged in and then out of the POP server before attempting to send an email as above, and that doesn't help either.
Cheers,
Kanika
|
|
|
|
|
For those who have come across the same problem:
The reason for my troubles was that the data that I was sending couldn't be just anything, it had to start with 'header' stuff:
DATA
From: kanika@solutions4smiles.co.nz\r\n
To: kanika.singh@trimble.co.nz\r\n
Date: Tue, 11 Jul 2006 11:18:55 +1200\r\n
Subject: Just a trial\r\n
\r\n
Testing smtp emailing\r\n
More blah-blah\r\n
\r\n
\r\n.\r\n
|
|
|
|
|
hi,
I have one clarification, I just want to know how to call stored
procedures in CDAO database.
After the submit button I need to call one stored procedure by name
STORE_FUNCTION with input parameters as
name,no,id,mark1,mark2
By using ADO I think we can use like this below. I just want to know how
to use in DAO.
With AdoComm
.CommandText = "{call PROEX.KPP_LFE.PPP_INSTPP_EMBARQUE_AUX(?)}"
.CommandType = adCmdStoredProc
Set AdoParamRet = .CreateParameter("Retorno", adBSTR, adParamInputOutput,
, vfRsEmb)
Call .Parameters.Append(AdoParamRet)
.Properties("PLSQLRSet") = True
Set vfRsEmbRet = .Execute
reply early
|
|
|
|
|
Hey guys,
I'm trying to use OpenThread however I get errors that its an undeclared identifier. I have included windows.h . I know OpenThread is defined in winbase.h however when looking within the header file I can see that the only close resembelence to this is OpenThreadToken which is not what I need. I am also using VC++ 6.0 btw.
Does that mean I would have to update my header files? If thats the case would anyone know where the most recent version
If I dont have to update my files, would anyone know a way to implement a function similar to OpenThread ?
Thanks,
Robbie
-- modified at 0:50 Monday 3rd July, 2006
|
|
|
|
|
Whats application type?
whitesky
|
|
|
|
|