|
I'm sorry but i do not understand what to do.
Once I have the client and the server connected, how do i send the message to the server? It doesn't seem to send the data to the server. Is there something I have to pass between the two cpp files, or can i just connect and then instantiate a SOCKET object and send it to that?
Can someone possible give me some sample code...i looked at the tutorials on this site but i still can't get it to work.
Thanks in advance.
|
|
|
|
|
I have a few questions:
1. Can anyone tell me why a DLL may be loaded more than once by a program?
2. Can anyone suggest a good resource for learning more about how DLLs are loaded/unloaded by the Windows operating system?
3. Does anyone know what the clbcatq.dll contains?
Thanks!
|
|
|
|
|
1. as far as I know, you may 'load' it multiple times, but it will just increase some internal counter, in reality, you'll get just one dll in memory.
2. LoadLibrary is a good starter in MSDN, the Remarks section contains valuable hints and references.
3. sorry, no idea
|
|
|
|
|
Amity Binkert wrote:
1. Can anyone tell me why a DLL may be loaded more than once by a program?
How are you verifying this? If the DLL is implicitly loaded, it happens once. If the DLL is explicitly loaded, it is still only loaded once, but the reference count is incremented with each successive call to LoadLibrary() .
Amity Binkert wrote:
3. Does anyone know what the clbcatq.dll contains?
Are you sure the file isn't ~clbcatq.dll? Its presence indictaes that COM+ was not setup properly.
|
|
|
|
|
3. Run dependancy walker on the DLL. From having a look at that, and checking the product name ('COM Services') [edit] i guess [/edit] that it has to do with fundamental COM stuff.
If you can keep you head when all about you
Are losing theirs and blaming it on you;
If you can dream - and not make dreams your master;
If you can think - and not make thoughts you aim;
Yours is the Earth and everything that's in it.
Rudyard Kipling
|
|
|
|
|
3. It's part of the COM services (aka COM+) stuff.
Think it's part of the COM+ Catalog stuff (but not the admin interface)
Steve S
|
|
|
|
|
In a bit of a quandry here...
I have two constructors for a class:
CMatrix(unsigned int uiRows, unsigned int uiColumns);
CMatrix(unsigned int uiSize, bool bCreateIdentity);
Unfortunately when I call the constructor in the code:
CMatrix* aMatrix;
aMatrix = NULL;
aMatrix = new CMatrix(2,2);
The VS 6.0 compiler informs me:
<br />
error C2668: 'CMatrix::CMatrix' : ambiguous call to overloaded function<br />
Which, I suppose, leaves me with three solutions:
1.) Use BOOL in place of bool which
I wanted to avoid
2.) Use int instead of unsigned int which
would require changing alot of already existing code and which
is really not what I want to do (I prefer unsigned int )
3.) Add a 3rd dummy parameter to one of the constructors, but this
seems like a desperate hack
Has anyone run into this before and come up with a creative solution
they would be willing to share?
|
|
|
|
|
Does aMatrix = new CMatrix(2, 2U); help?
|
|
|
|
|
Ah, yes! Of course!
That's perfect. Thanks.
|
|
|
|
|
Actually, your use of the format specifier gave me
an idea. I tried this and it works also:
aMatrix = new CMatrix(2, static_cast<unsigned int>(2));
Unless this is safer, I prefer your solution - much shorter
and to the point.
Thanks again.
|
|
|
|
|
Just to comment on why you get this error... When the compiler sees the parameter 2 , it compares the parameter type (int ) with the param types of the available ctors. Since int can be implicitly converted, using language rules, to either unsigned or bool , the call is ambiguous. Changing it to 2U makes the parameter type unsigned , so the only possible choice is the ctor that takes an unsigned .
--Mike--
Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber
Latest art~!@#2rDFA#@(#*%$Rfa39f3fqwf--=
NO CARRIER
|
|
|
|
|
My situation is this:
I have made MFC program using CListView. Data
is listed very neatly, but now I would like
to be able to make reports of the data, maybe
print little bars & pies.
How can I open a new window with CScrollView
class as the view? I would also like to
be able to print the view.
I've tried a couple to things so far, but I
more or less lost. Would one possibility be to open
a window the same size as CListView, kind of like put
it on top of the CListView?
(Yes, I am a newbie
|
|
|
|
|
In a dialog based application I have to disable (lock) the enter-key until the dialog is closed. I think, using a keyboard-hook will be a good idea; does anybody have experiences concerning this method?
thanks in advance
|
|
|
|
|
You mean, you don't want your dialog to be closed when the user presses 'enter' ?
There is a much easier way to do that: just override the OnOk function: don't call CDialog::OnOk() !
(Create a button with id = IDOK and create a message handler)
Hope this helps
|
|
|
|
|
for my project , i have a CView contain a CTreeCtrl member. i want to cope with the tree notify message in the view.
for instance : msg: TVN_ITEMEXPANDED
CView::OnNotify(wParam , lParam , lpResult){
}
as far as i know wParam as idCtrl,
lParam as LPNMHDR strcut point.
but msdn says
TVN_ITEMEXPANDED
pnmtv = (LPNMTREEVIEW) lParam .
what really the lParam refer to??
help me.
love program
|
|
|
|
|
I'm not into MFC but pnmtv = (LPNMTREEVIEW) lParam means you're casting the lParam into a pointer to an NMTREEVIEW structure. That structure probably contains a TVITEM structure as well,. I would guess you need to examine the state of that TVITEM.
What's the difference between a C++ programmer and God? God knows he's not a C++ programmer :
anon
|
|
|
|
|
i see , as i digesting into the document. lParam is not only a pointer to NMHDR even more of that. we could change the type of it to proper struct pointer such as LPNMTREEVIEW.
thank you.
love program
|
|
|
|
|
Hi,
I have an MFC DLL plugged in to one of the exe.I have full control of the DLL.
My question is when i execute the exe can i pass command line arguments to the exe and access within the DLL.
Pls help
Thnks
|
|
|
|
|
Yes. If the EXE has a CWinApp -derived class, you can access the m_lpCmdLine member variable. If not, you can use the __argc and __argv global variables.
|
|
|
|
|
Hi,
thanks for reply but i don't have control on the EXE source.Its like a thrid party tool.I have full conrol of the dll. So in this case what to do.?Pls help
Thnks
|
|
|
|
|
You can still access the aforementioned objects from within the DLL.
|
|
|
|
|
HI everyone,
I'm working on a dialog box which I created without being really used to C++ :
my point is that I can't (or i don't know how to) use the char strings (and i'm not even sure there are characters...) i fill in the box.
Here is the kind of advice i'd like to get :
void CTestDlg::OnChangeEdit1()
The best thing would be to get a sample code using a dialog box. For instance, the box says 'enter your name' and depending on the name entered there woulde be a few code lines dealing about the name...
I hope i'm clear enough and that I'll get an answer !
Thank you very much to you all !!
|
|
|
|
|
Hari Seldon wrote:
Here is the kind of advice i'd like to get :
void CTestDlg::OnChangeEdit1()
This looks very much like an EN_CHANGE message handler.
Hari Seldon wrote:
I hope i'm clear enough
Yes and no. As I understand it, you want a dialog box with a label, an edit control and a few buttons. Yes?
+----------------------------------------------+
|Enter your name: ______________ +--------+ |
| | OK | |
| +--------+ |
| |
| +--------+ |
| | Cancel | |
| +--------+ |
| |
+----------------------------------------------+
|
|
|
|
|
You should buy a MFC programming book for beginners. The learning curve for MFC is about 6 months.
|
|
|
|
|
Hi everyone,
I'm brand nu with
|
|
|
|